You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jeffrey Gehrung <je...@yahoo.com> on 2003/04/02 18:43:23 UTC
Intake: Mapping Checkbox val to property
All,
I don't seem to be able to map the value of a my HTML Checkbox to its
corresponding property in my my Object. I've tried a variety of
combinations. Other TEXT fields in the group map fine to String
Objects. Never tried to map a form component before. What does a
CHECKBOX input component map to? When I check my Log, my testing
either yields "false" or "null" value for the "Marker" property
regardless of the CHECKBOX check'd state. ???
The following, though incorrect, is one of my attempts (perhaps someone
could tell me what corrections to apply):
html snippets:
#set($rliGroup = $intake.RegLineItemGroup.default)
<INPUT TYPE="CheckBox" NAME="$rliGroup.Marker.Key"
value="$!rliGroup.Marker.Value">
intake.xml snippet:
<group name="RegLineItemGroup" key="Rli"
mapToObject="webmods.modules.taglib.reg.RegLineItem" >
<field name="Marker" key="Mrk" type="boolean" >
</field>
RegLineItem.java snippet:
private boolean bool_Marker;
public boolean getMarker()
public void setMarker(boolean bool_Marker)
(note: RegLineItem is a registered pull tool)
TIA, much!
=====
--------------------------------------
Jeff Gehrung (Sr. Programmer Analyst)
Holstein Association USA
Brattleboro VT 05302
802.451.4146
jeffgehrung@yahoo.com
jgehrung@holstein.com
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Intake: Mapping Checkbox val to property
Posted by Chris K Chew <ch...@fenetics.com>.
Here is a link to a velocity macro that handles checkboxes nicely:
http://marc.theaimsgroup.com/?l=turbine-user&m=100434715718585&w=2
Good luck,
Chris
> From: Jeffrey Gehrung
>
> I don't seem to be able to map the value of a my HTML Checkbox to its
> corresponding property in my my Object. I've tried a variety of
> combinations. Other TEXT fields in the group map fine to String
> Objects. Never tried to map a form component before. What does a
> CHECKBOX input component map to? When I check my Log, my testing
> either yields "false" or "null" value for the "Marker" property
> regardless of the CHECKBOX check'd state. ???
>
> The following, though incorrect, is one of my attempts (perhaps someone
> could tell me what corrections to apply):
>
> html snippets:
>
> #set($rliGroup = $intake.RegLineItemGroup.default)
> <INPUT TYPE="CheckBox" NAME="$rliGroup.Marker.Key"
> value="$!rliGroup.Marker.Value">
>
> intake.xml snippet:
> <group name="RegLineItemGroup" key="Rli"
> mapToObject="webmods.modules.taglib.reg.RegLineItem" >
> <field name="Marker" key="Mrk" type="boolean" >
> </field>
>
> RegLineItem.java snippet:
> private boolean bool_Marker;
>
> public boolean getMarker()
> public void setMarker(boolean bool_Marker)
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org