In my submit handler - I invoke a service to first a) the save category and
then b) save the post.

I put a message into the feedback panel and add the feedback panel and the
drop down to the target.

It is off an AjaxFallbackbutton ... so, no, I don't think I've done anything
to explicitly detach the model. Is it such that when the original page is
initially rendered - the model would have attached and then detached. The
user then takes time to fill out the form - and upon submit, the model
attaches again where I currently get the form fields ... do some *work* ...
and then when I'm finished, detaches again?

New ground for me here ... should I explicitly invoke detach() at the
beginning of the submit handler ... and then attach() at the end so that the
render phase gets new data?

Thanks,

-Luther






On Tue, Jun 9, 2009 at 8:52 AM, Linda van der Pal <
[email protected]> wrote:

> 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