Multiple issues with Ajax validation
James David <[email protected]> Tue, 26 Dec 2006 21:23:51 CST
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <13297866.1167189884905.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
Hi Guys - I'm trying to use Ajax validation on the page. The page has 2 text fields (one of them is required, one is optional) and 1 text area field [code] <%@ page contentType="text/html" %> <%@ taglib prefix="ww" uri="/webwork" %> <html> <head> <title>My Page</title> <link rel='stylesheet' type='text/css' href='./stylesheet/stylesheet.css'/> <ww:head theme="ajax"/> </head> <body> <ww:form method="post" namespace="default" action="MyAction" validate="true" theme="ajax"> <table align="center" width="800px"> <tr> <td> <ww:textfield label="Last Name" name="lastname" labelposition="top" required="true" requiredposition="left" maxlength="75" size="85"/> </td> </tr> <tr> <td> <ww:textarea label="About User" name="aboutuser" labelposition="top" rows="8" cols="86"/> </td> </tr> <tr> <td> <ww:textfield label="Location" name="location" labelposition="top" maxlength="75" size="85"/> </td> </tr> </ww:form> </body> </html> [/code] The validation all works fine - it comes back with the right error message. The issues are 1) Since I'm using labelposition="top" the message appears somewhere random between the label and the actual field. Is there a way I can display right underneath the field. Can the message be a html snippet from the validation.xml file 2) Since i'm using textarea - it automatically shows up the rich text editor for the "about user" field which i never wanted it to be. Not sure if this is a bug. Is there a way to turn it off 3) Any time I click on other optional fields - it always validates the "last name" field and comes back with the error again. It always appends to the original error message instead of clearing it out first and then displaying. In my case if I tab out of any field - the "last name is required" message apprears multiple times. Not sure what the issue is 4) Once the error is displayed - I always see a window pop-up that says "[object error]". Not sure what this means. Is it expecting any field on the page Thanks! --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=55532&messageID=110497#110497