You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Oliver Thiel <th...@gmx.de> on 2004/02/08 19:39:27 UTC
logic:notMatch - TagLib
Hi @all,
I iterate over a HashMap (mapped) to create my (register) form.
<logic:iterate id="field" name="mapped">
<input type="text" name="field(<bean:write name="field" property="key"
/>)" value="<bean:write name="field" property="value" />">
</logic:iterate>
Now I want some of the input fields to be text and some
to be password.
<logic:iterate id="field" name="mapped">
<logic:match name="field" value="password">
<input type="password" name="field(<bean:write name="field"
property="key" />)" value="<bean:write name="field" property="value"
/>">
</logic:match>
<logic:match name="field" value="conf_pwd">
<input type="password" name="field(<bean:write name="field"
property="key" />)" value="<bean:write name="field" property="value"
/>">
</logic:match>
<logic:notMatch name="field" value="password" value="conf_pwd">
<input type="text" name="field(<bean:write name="field" property="key"
/>)" value="<bean:write name="field" property="value" />">
</logic:notMatch>
</logic:iterate>
But this does not work! It prints out an two input field for password!
One of type text and one of type password!
Is their a better/correct way to archive this? Or an other tag I can
use?
Thanks
Oliver