You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Julian Tillmann <pu...@gmx.de> on 2006/04/03 10:08:48 UTC

"Valid when"-Example

Hi,

would someone be so kind to help me with the following problem:
 
A date field should only be validated 
if another checkbox isn't selected.
 
I'm not sure how to do it:
Do I have to use validwhen or reiqired-if??
I cannot find any good examples or references concerning my problem.

Here is my code snippet:

<form name="ItemForm">
<field property="time" depends="requiredif,date">
<arg0 key="error.form.time"/>
<var>
<var-name>var</var-name>
//-->this is the property that should decide if a check
is necessary or not (the bean-property of a html-checkbox)
<var-value>(selectionForShift==false)</var-value>
</var>


Help would be highly appreciated as this is really driving me crazy 

Thanks a lot
Julian


-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

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


Re: How to produce valid HTML output with the html:tags

Posted by Nikolaj Berntsen <kn...@mobilepeople.dk>.
Peter Neu wrote:

>Hello,
>
>in an effort to clean up my site I try to do everything by the W3C standard.
>
>I threw out all design tables and other useless crap but now one problem
>remains and it's related to Struts. All <html:input> tags generate a tag
>which is not closed. Like this: 
>
><input type="hidden" name="mainGroupSelection" value="1"> 
>
>Because the tag is not closed the w3c validator says it's not valid. What
>can I do to make it valid?
>  
>
I believe the magic word is that you want to produce xhtml? a google for
that leads to this mail from the list:
   
http://mail-archives.apache.org/mod_mbox/struts-user/200403.mbox/%3C404CED2A.3020102@cyberspaceroad.com%3E

which has the useful (?) snippet:

There are a couple of issues to look out for, such as with tiles, where 
you use the tag you mention. In your main pages, use <html:html 
xhtml="true">

Cheers,
/\/


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


How to produce valid HTML output with the html:tags

Posted by Peter Neu <pe...@gmx.net>.
Hello,

in an effort to clean up my site I try to do everything by the W3C standard.

I threw out all design tables and other useless crap but now one problem
remains and it's related to Struts. All <html:input> tags generate a tag
which is not closed. Like this: 

<input type="hidden" name="mainGroupSelection" value="1"> 

Because the tag is not closed the w3c validator says it's not valid. What
can I do to make it valid?

Cheers,
Pete





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