Any ideas from the wicket developers? In the end, this is a question about
how the architecture work.
-Doug
Doug Donohoe wrote:
>
> The issue isn't with Ajax - that part is working. The issue is when the
> form is submitted (normally, not via ajax) and redisplayed (e.g., if an
> error occurs like mismatch password).
>
> When wicket re-renders the entire page, the login form still has an
> AttributeModifier of 'display: none'. For some reason, if I disable that
> modifier or use the model approach you suggested, wicket ignores that.
>
> -Doug
>
>
>
> John Krasnay wrote:
>>
>> On Mon, Apr 21, 2008 at 02:11:01PM -0700, Doug Donohoe wrote:
>>>
>>> Hi John,
>>>
>>> Thanks for the suggestion, but that did not work. I suspect it didn't
>>> work
>>> for the same reason that my attempt to use setEnabled(true/false) on the
>>> AttributeModifier didn't work.
>>>
>>> It has to be with how wicket cache's pages. I still don't quite grok
>>> how it
>>> decides to re-render stuff...
>>>
>>> My code:
>>>
>>> public CurrentProfile(String id)
>>> {
>>> ....
>>>
>>> displayModel = new DisplayModel();
>>> loginPanel.add(new AttributeModifier("style", true,
>>> displayModel));
>>>
>>> ....
>>>
>>> Link link = new AjaxFallbackLink("loginLink", new
>>> Model(loginText))
>>> {
>>> @Override
>>> public void onClick(final AjaxRequestTarget target)
>>> {
>>> loginPanel.setVisible(!loginPanel.isVisible());
>>
>> I suspect your problem is in that last line. Once you've rendered a page
>> with an element that's invisible, you can't make it visible again via
>> AJAX unless you originally called setOutputMarkupPlaceholderTag(true) on
>> it, or you refresh a parent element that was always visible.
>>
>> jk
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/interesting-scriptaculous-usage-conundrum-tp16807943p16834725.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]