Thanks the toString override seems to work in that the correct values/ids that
I want do get posted back.Like you mentioned is this the right way to do
it?Even with this solution in response to the submit I still continue to get an
error back - which isn't making much sense to
me.http://localhost:8080/wicket/test/?wicket:interface=:5:DisplayPanel:PublishForm::IFormSubmitListenerWicketMessage:
No get method defined for class: class java.lang.String expression: idRoot
cause:wicket.WicketRuntimeException: No get method defined for class: class
java.lang.String expression: id at
wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:324)
at
wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:200)
at wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:88)
at wicket.markup.html.form.ChoiceRenderer.getIdValue(ChoiceRenderer.java:148)
at wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(Abstra
ctSingleSelectChoice.java:140) at
wicket.markup.html.form.FormComponent.getValue(FormComponent.java:583) at
wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:319)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:613).........................[Page
class = com.test.web.myaccount.MyAccount, id = 5]:
#
Path
Size
Type
Model Object
1
<auto>_header
481 bytes
wicket.markup.html.internal.HtmlHeaderContainer
2
DisplayPanel
6.5K
com.test.web.myaccount.AccountPublishDisplayPanel
3
DisplayPanel:PublishForm
9.5K
wicket.markup.html.form.Form> Date: Mon, 30 Jul 2007 12:15:36
+0200> From: [EMAIL PROTECTED]> To: wicket-user@lists.sourceforge.net> Subject:
Re: [Wicket-user] editable form> > Hi,> > On 7/29/07, Ed _ <[EMAIL PROTECTED]>
wrote:> >> > I am trying to create an editable form - this has a drop down
list. in it> >> > List ratingList = cfg.getContentRatingList();> >
DropDownChoice ratingChoice = new DropDownChoice("rating", new> >
PropertyModel(form, "category"), ratingList, new> > ChoiceRenderer("label",
"id"));> > I think what happens here is
form.setCategory(ratingList.get(chosenOne)).> That's why you see generic
toString output as the assigned value.> As a simple hack, you could override
the toString() method of the rating class.> For a semi-decent solution,
override the convertValue method of DropDownChoice.> I think what you really
need is to add a Converter to ratingChoice.> (but IConverter does not extend
IBehavior, so I don't know how to do> that properly)> > And in
an unrelated note, you could call this component "category"> instead of
"rating", and give a CompoundProertyModel to the form.> Saves a lot of typing
in the long run,> >
-------------------------------------------------------------------------> This
SF.net email is sponsored by: Splunk Inc.> Still grepping through log files to
find problems? Stop.> Now Search log events and configuration files using AJAX
and a browser.> Download your FREE copy of Splunk now >>
http://get.splunk.com/> _______________________________________________>
IMPORTANT NOTICE:> > This mailing list is shutting down. Please subscribe to
the Apache Wicket user list. Send a message to: "users-subscribe at
wicket.apache.org" and follow the instructions.>
_______________________________________________> Wicket-user mailing list>
Wicket-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wicket-user
_________________________________________________________________
Local listings, incredible imagery, and driving directions - all in one place!
Find it!
http://maps.live.com/?wip=69&FORM=MGAC01
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
IMPORTANT NOTICE:
This mailing list is shutting down. Please subscribe to the Apache Wicket user
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the
instructions.
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user