History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1116
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Rainer Hermanns
Reporter: Rainer Hermanns
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

ww:select tag works only with string variables

Created: 24/Jan/06 06:58 AM   Updated: 24/Jan/06 07:10 AM
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.2.1


 Description  « Hide
Submitted by Eugene: http://forums.opensymphony.com/thread.jspa?threadID=14124&tstart=0

ww:select tag works only with string variables. I must to use code like this:
public String getType() {
return String.valueOf(type);
}

public void setType(String type) {
this.type = Integer.valueOf(type);
}


template
<@ww.form method="POST" validate="true" action="AddNews">
<@ww.select label="%{getText('type')}" name="type" list=r"#{0: 'type1', 1 : 'type2'}"/>
<@ww.textfield label="%{getText('title')}" name="title" size="50" required="true"/>
<@ww.textarea label="%{getText('text')}" name="text" rows="5" cols="40" required="true"/>
<@form.submit submitValue="%{getText('button.add')}" cancelValue="%{getText('button.back')}" cancelHref="News.jspa"/>
</@ww.form>

code:
public String getType() {
return String.valueOf(type);
}

public void setType(String type) {
this.type = Integer.valueOf(type);
}
works, but
public int getType() {
return type;
}

public void setType(int type) {
this.type = type;
}
does not work. Allways first option of select is selected

 All   Comments   Change History      Sort Order:
Rainer Hermanns - [24/Jan/06 07:10 AM ]
Eugene:
You can close 1116 issue. With new version - i haven't meet this bug...