Re: how to get dropdownlist selected value

2012-07-27 Thread Fergal Keating
attrvalueChoice.getModelObject();

On 26 July 2012 10:15, lxw_first  wrote:

> http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp
>
> html:
>
>
> 
>
>
> code
> final ListView trView=new ListView("tritems", new PropertyModel(this,
> "attrBizRoles")) {
> private IBizRole attrvalueBizRole=new BizRole();
>
> @Override
> protected void populateItem(ListItem item) {
> attrBizRole = (IBizRole) item.getModelObject();
> item.add(new Label("lblattr", attrBizRole.getName()));
> // this list can get from attr
> attrvalueBizRoles = (List)
> attrBizRole.getChildBizRole();
> if (attrvalueBizRoles.size()>0) {
> attrvalueBizRole=attrvalueBizRoles.get(0);
> }
> DropDownChoice attrvalueChoice = new
> DropDownChoice("attrvalue",new
> PropertyModel(this, "attrvalueBizRole"), attrvalueBizRoles,new
> IChoiceRenderer() {
>
> @Override
> public Object getDisplayValue(Object object) {
> attrvalueBizRole = (IBizRole) object;
> return attrvalueBizRole.getName();
> }
>
> @Override
> public String getIdValue(Object object, int index)
> {
> attrvalueBizRole = (IBizRole) object;
> return
> String.valueOf(attrvalueBizRole.getId());
> }
> });
> item.add(attrvalueChoice);
> }
> };
>
> i want to get the dropdownlist selected value.how to get value?
> Can anyone tell me how to achieve this.
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-get-dropdownlist-selected-value-tp4650788.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fergal Keating
IT Senior Engineer
---
e. fergal.keat...@directski.com
p. NA
w. www.directski.com


how to get dropdownlist selected value

2012-07-26 Thread lxw_first
http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp 

html:





code
final ListView trView=new ListView("tritems", new PropertyModel(this,
"attrBizRoles")) {
private IBizRole attrvalueBizRole=new BizRole();

@Override
protected void populateItem(ListItem item) {
attrBizRole = (IBizRole) item.getModelObject();
item.add(new Label("lblattr", attrBizRole.getName()));
// this list can get from attr
attrvalueBizRoles = (List) 
attrBizRole.getChildBizRole();
if (attrvalueBizRoles.size()>0) {
attrvalueBizRole=attrvalueBizRoles.get(0);
}
DropDownChoice attrvalueChoice = new 
DropDownChoice("attrvalue",new
PropertyModel(this, "attrvalueBizRole"), attrvalueBizRoles,new
IChoiceRenderer() {

@Override
public Object getDisplayValue(Object object) {
attrvalueBizRole = (IBizRole) object;
return attrvalueBizRole.getName();
}

@Override
public String getIdValue(Object object, int index) {
attrvalueBizRole = (IBizRole) object;
return String.valueOf(attrvalueBizRole.getId());
}
});
item.add(attrvalueChoice);
}
};

i want to get the dropdownlist selected value.how to get value?
Can anyone tell me how to achieve this. 
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-get-dropdownlist-selected-value-tp4650788.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org