You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Cory D. Wiles" <kw...@gmail.com> on 2007/10/17 21:11:44 UTC
Radio Button Validation - Struts 2
How does one use server-side validation (requiredstring) for radio buttons?
Thanks,
Cory
Checkboxlist disabled parameter - Struts 2
Posted by "Engelking, Nicholas" <Ni...@tdsecurities.com>.
Hi, I am using a checkboxlist, and I need some of my checkboxes disabled.
My code looks like
<s:checkboxlist name="checked" list="permissionList"
listValue="node.description" listKey="node.name" value="checked"
disabled="inherited" />
and in my action
public class PermissionBean {
private final PermissionNode node;
private final boolean inherited;
public PermissionBean(PermissionNode node, boolean inherited) {
this.node = node;
this.inherited = inherited;
}
public PermissionNode getNode() {
return node;
}
public boolean isInherited() {
return inherited;
}
}
public Collection<PermissionBean> getPermissionList() {
...
}
PermissionBean is basically a wrapper class that exposes a PermissionNode object and an inherited property, indicating whether or not the permission is inherited. The node has a name and description property, and these parts work well. Inherited is also set correctly on the beans, but the inherited property is not used render some boxes disabled and some enabled.
How can I get the disabled property to work? When I try
<s:checkboxlist name="checked" list="permissionList"
listValue="node.description" listKey="node.name" value="checked"
disabled="true" />
they are all disabled. But I want some enabled and some disabled.
Thanks,
Nick
********************
NOTICE OF CONFIDENTIALITY
This communication including any information transmitted with it is
intended only for the use of the addressees and is confidential.
If you are not an intended recipient or responsible for delivering
the message to an intended recipient, any review, disclosure,
conversion to hard copy, dissemination, reproduction or other use
of any part of this communication is strictly prohibited, as is the
taking or omitting of any action in reliance upon this communication.
If you receive this communication in error or without authorization
please notify us immediately by return e-mail or otherwise and
permanently delete the entire communication from any computer,
disk drive, or other storage medium.
If the above disclaimer is not properly readable, it can be found at
www.td.com/legal
AVERTISSEMENT DE CONFIDENTIALITE
Ce courriel, ainsi que tout renseignement ci-inclus, destiné uniquement
aux destinataires susmentionnés, est confidentiel. Si vous
nêtes pas le destinataire prévu ou un agent responsable de la
livraison de ce courriel, tout examen, divulgation, copie, impression,
reproduction, distribution, ou autre utilisation dune partie de ce
courriel est strictement interdit de même que toute intervention ou
abstraction à cet égard. Si vous avez reçu ce message par erreur ou
sans autorisation, veuillez en aviser immédiatement lexpéditeur par
retour de courriel ou par un autre moyen et supprimer immédiatement
cette communication entière de tout système électronique.
Si l'avis de non-responsabilité ci-dessus n'est pas lisible, vous
pouvez le consulter à www.td.com/francais/legale