I have removed inner enclosure and its working fine. I am facing another
problem. This is my code:

ChoiceRenderer<SelectOption> choiceRenderer = new
ChoiceRenderer<SelectOption>("value", "key");
            SelectOption selectedOption = new
SelectOption(selectOption[0].getKey(), "Selected Value");
            final IModel<SelectOption> iModel = new
PropertyModel<SelectOption>(selectedOption.getValue(), "value");
            final DropDownChoice<String> postCategoriesDropDown = new
DropDownChoice("postCategories", iModel, Arrays.asList(selectOption),
choiceRenderer);

Select Option is :

public class SelectOption {
        
        private int key;
          private String value;

          public SelectOption(int key, String value) {
            this.key = key;
            this.value = value;
          }
/ getters and setters
}

Now here, drop down is being rendered in markup..

*<select wicket:id="postCategories">
                    </select>
*

But the as given in the code, I want a particular value to come as default
value. But the default one is coming out 'Choose One'. What is the issue??
But


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4565376.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to