I isolated the problem to the onComponentTag(final ComponentTag tag) method in our AjaxHandler. There we directly ajusted the componnent's attributemap. This, ofcourse, is not supposed to work because the map is often immutable. It does seem to work however, for textfields, and not for TextAreas. The normal sollution for this would be to use attributemodifiers (AM) instead.

-I tried doing this in onBind(), where I also use an AM to set the component's ID value, but I get an error that I can not use getCallbackURL() (which I definetely need for Ajax) because the component does not have a page yet... -I tried adding an AM in onComponentTag(), but it does not actually do anything, the attribute is not present in the generated HTML... -I even thought of using onComponentRendered(), but then it would be to late to add any attributes.

My question.....how can I solve this?

old method (not working for TextAreas, but working for TextFields)

public final void onComponentTag(final ComponentTag tag)
{
       final ValueMap attributes = tag.getAttributes();
       final String attributeValue =
"javascript:"+ componentId + "_validate('" + getCallbackUrl() + "', '" + formComponent.getInputName() + "', this);"; attributes.put(eventName, attributeValue); }

replacing code:

this.formComponent.add(new AttributeModifier(eventName, true, new Model("javascript:"+ componentId + "_validate('" + getCallbackUrl() + "', '" + formComponent.getInputName() + "', this);")));

where can I add this?

Marco
Ingram Chen wrote:

Hi,
I tried FX AJAX Validation and it works great with TextField. Thanks for the great job !

But I found that it does not work with TextArea (raise Unmodified related exception from ValueMap) .
Have any body tried ?


On 11/25/05, *Ruud Booltink* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi all,

    We're proud to anounce our first real contrib-dojo release :)
    This release contains:
    Dojo FX Decorators
    Dojo FX Tooltip
    FX ajax Validation
    FXFeedbackIndicator
    xdocs updated with new site
    Example applications

    You can check our release at
    http://wicket-stuff.sourceforge.net/wicket-contrib-dojo/

    Have fun with the release, and if you have any comments, please feel
    free to post them on the mailinglist :)

    Regards,

    Ruud and Marco




    -------------------------------------------------------
    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_id=7637&alloc_id=16865&op=click
    <http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
    _______________________________________________
    Wicket-user mailing list
    Wicket-user@lists.sourceforge.net
    <mailto:Wicket-user@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen




-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to