Did you explicitly detach the model?

Regards,
Linda

Luther Baker wrote:
Quick question regarding a blog engine I'm working on: my user is editing a
blog Post and gets to the "Category" section.

Category is implemented with a DropDownChoice and LoadableDetachableModel.
For convenience - I also have a simple TextField that, when filled out,
implicitly creates a new Category and attaches it to the current Post. For
now, I only allow 1 Category per Post. The Category TextField takes
precedence over the DropDown. IE: if the user types anything in the Category
TextField, that (String) will be looked up, inserted if missing and attached
to the Post as a Category.

Question: after submitting this entire form (ala AjaxFallbackButton) - I
intentionally stay on this page. The Category is added and the Post has been
saved ... but I need the Category DropDown to refresh. Since all of this
happens ala AjaxFallbackButtons - the process works except, the
LoadableDetachableModel attached to the DropDownChoice (obviously) doesn't
fire the load method when I add the DropDown to the target (in the submit
handler).

To clarify, in my submission, I just added a Category and saved the Post and
ostensibly, redrawn the DropDownChoice (ie: I've set the OutputMarkupID on
the DropDownChoice and attached it to the target in the ajax submit handler)
... but the underlying model isn't actually reloading. Is there something
like a 'refresh' method on the LoadableDetachableModel ... or, should I
attach it to the target as well?

Thanks in advance for any suggestions,

-Luther

------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.59/2165 - Release Date: 06/09/09 05:53:00



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

Reply via email to