You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ravi (JIRA)" <ji...@apache.org> on 2008/01/07 06:36:05 UTC

[jira] Commented: (WW-2403) ajax theme doesnt work for ajax validations

    [ https://issues.apache.org/struts/browse/WW-2403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42947#action_42947 ] 

ravi commented on WW-2403:
--------------------------

Thanks for looking into the issue.

True Newton. I had posted it incorrectly into another category. I commented in its comments also. 

> <s:checkboxList ..> ajax theme doesnt work for ajax validations
> ---------------------------------------------------------------
>
>                 Key: WW-2403
>                 URL: https://issues.apache.org/struts/browse/WW-2403
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Validators
>    Affects Versions: 2.0.9
>         Environment: IE 7
> Tomcat 5.5
> Struts 2.0.9
>            Reporter: ravi
>             Fix For: 2.1.1
>
>
> Create a checkbox list in the action class (i am using quizaction.java of struts-showcase)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
> public class QuizAction extends ActionSupport {
>     List<String> chkBoxList= new ArrayList<String>();
>     public QuizAction() {
> chkBoxList.add("c1");
> chkBoxList.add("c2");
> chkBoxList.add("c3");
> addFieldError("chkBoxList", "checkbox error");
> }
>     
>     public void validate(){
>      addFieldError("chkBoxList", "checkbox error");
>      System.out.println(">>>");
>     }
> ...
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
> the jsp page:
> ...
> <s:head theme="ajax" />
> ...
> <s:form method="post" validate="true" theme="ajax">
>     <s:checkboxlist list="chkBoxList" name="chkBoxList" ></s:checkboxlist>
>     <s:submit/>
> </s:form>
> ...
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
> the displayed checkbox list has the error message displayed by the checkbox-es when the page is displayed. Now say u check a box (c1) and clicked on the page (i.e. calling onblur()),
> 1. c3 is going as the parameter in the request
> 2. Field error is coming to the .js file but is not being displayed on the page

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.