-Igor
On 12/2/05, Davide Savazzi <[EMAIL PROTECTED]> wrote:
On 11/30/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> any feedback on this yet? if not, i guess i will polish it with its current
> feature set and that will be that.
I have a Map that contains List of choices, my code is:
Map choicesMap = getChoicesMap();
Select select = new Select("mySelect", new PropertyModel(myModel,
"propertyName"));
IOptionRenderer renderer = new IOptionRenderer() {
public String getDisplayValue(Object selection) {
return ((Selection) selection).getName();
}
public IModel getModel(Object selection) {
return new Model(new Integer(((Selection) selection).getId()));
}
};
select.add(new SelectOptions("group1", new Model((Serializable)
choicesMap.get("group1")), renderer));
select.add(new SelectOptions("group2", new Model((Serializable)
choicesMap.get("group2")), renderer));
When myModel.getPropertyName() is null I get a WicketException:
09:50:07,679 ERROR [RequestCycle] Select
[3:step1Form:section4Border:mySelect] contains a null model object,
must be an object of type java.lang.Ob
ject or java.util.Collection (in case of multi-valued select element)
In other dropdown menu when model is null there is a entry like
'Choose one', they don't throw an exception!
Am I using your extension correctly?
Cheers,
--
Davide Savazzi
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user