Okay I found the problem. I find it hard to believe that anyone is
using css_xhtml theme with this bug. It doesn't work in IE8 and it
does not work properly in any other browser.

problem
struts/css_xhtml/validation.js: function findWWCtrlNode needed to be rewritten.

function findWWCtrlNode(enclosingDiv) {
    var elems = enclosingDiv.getElementsByTagName("div");
    for(i = 0; i < elems.length; ++i ) {
        if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/))
            return elems[i];
    }

    elems = enclosingDiv.getElementsByTagName("span");
    for(i = 0; i < elems.length; ++i ) {
        if (elems[i].className && elems[i].className.match(/(wwlbl|wwctrl)/))
            return elems[i];
    }
    return enclosingDiv.getElementsByTagName("span")[0];
}


On Sun, Feb 21, 2010 at 7:28 AM, Stephen Ince <stephenpi...@gmail.com> wrote:
> Hi,
>  I am trying to do client-side ajax validation and I am failing. IE
> throws an error alert, "invalid argument".
> It seems that the error is really struts2. I also get weird behaviour
> with ff. The error message comes after the tag.
>
> I have a few questions.
> 1) How do you do client-side validation with the "css_xhtml"?  It
> seems that the template code is not correct if IE8  can not generate
> an error of FF shows the error after the field.
>
> 2) How can I manually generate my own fields so that client-side
> validation can work with "css_xhtml" theme?
>
> The following code is generated but does not seem to be correct.
>
>           <div id="wwgrp_scenario.name" class="wwgrp">
> <div id="wwctrl_scenario.name" class="wwctrl">
> <input type="text" name="scenario.name" size="20" value="test2r"
> id="scenario.name" dojoType="dijit.form.TextBox" trim="true"/></div>
> </div>
>
>
> Any help would be greatly appreciated.
> Steve
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to