http://apache-wicket.1842946.n4.nabble.com/file/n4650788/aaa.bmp 

html:

                
                <select wicket:id="attrvalue"></select>


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<IBizRole>) 
attrBizRole.getChildBizRole();
                if (attrvalueBizRoles.size()>0) {
                        attrvalueBizRole=attrvalueBizRoles.get(0);
                }
                DropDownChoice attrvalueChoice = new 
DropDownChoice("attrvalue",new
PropertyModel<IBizRole>(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

Reply via email to