hey!

you can use theme="simple". This would generate the tags as a simple text
box etc with out any trs and tds around.

positioning the errors:
<s:fielderror>
     <s:param>fieldname</s:param>
</s:fielderror>

would display the erriors related to fieldname only. I think u can do the
similar way with action errors and actino messages. Give a try ;)

Hope I answered your question.

cheers,
ravi



Rodrigo Pereira wrote:
> 
> Hi,
> the problem is that I have a lot of fields and I'd like to position 2
> fields
> in a row, but xhrml theme is not letting me do that. Also, some of the
> fields are poputated by an action based on the value of one of the fields
> in
> the form (using xhtml triggers form's action vs link's). I was wondering
> if
> there is another option.
> 
> Thanks,
> Rodrigo Pereira
> 
> ----- Original Message ----- 
> From: "Nuwan Chandrasoma" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Saturday, March 29, 2008 6:12 PM
> Subject: Re: Validation
> 
> 
>> Hi,
>>
>> Simple theme doesn't support Validation and error reporting. you may have
>> to use some other theme like xhtml theme
>>
>> http://struts.apache.org/2.x/docs/xhtml-theme.html
>>
>> Thanks,
>>
>> Nuwan
>>
>> Rodrigo Pereira wrote:
>>> Hi,
>>> how can I position validation message on the screen? Also, when I have
>>> a simple theme form I am getting JS error alert message "[object
>>> Error]", does anybody know how to fix that?
>>>
>>> form:
>>>
>>> <s:form id="testForm" action="save" method="post" validate="true">
>>> <table> <tr>
>>> <td align="right"><s:text name="label.email"/>> class="required">*:</td>
>>> <td><s:textfield name="user.email" value="%{user.email}" size="30"
>>> theme="simple"/></td>
>>> </tr>
>>> </table>
>>> </s:form>
>>>
>>> validation.xml:
>>>
>>> <validators>
>>>
>>>   <field name="user.email">
>>>   <field-validator type="required">
>>>         <message key="errors.email.required"/>
>>>   </field-validator>
>>>
>>> <field-validator type="email">
>>> <message key="errors.email.notValid" />
>>> </field-validator>
>>>
>>>   </field>
>>>
>>> </validators>
>>>
>>> Thanks,
>>> Rodrigo Pereira
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validation-tp16373207p16396501.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to