struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Kelly <patrick.ke...@riverdynamics.com>
Subject jQuery query
Date Wed, 29 Jun 2016 07:09:12 GMT
Hi - I have a struts2 system (version 2.3.16) that contains many forms 
that look like kind of like the example below.

I want to use jquery to add some interactively to the the forms so the 
user can click a link to show/hide all the fields within a field 
grouping so that the heading is still visible but not the fields so the 
user can view/edit just the portion of the form they want.

Has anyone done this type of thing and could you provide the syntax 
including the jquery function and the links to the function from within 
the form.

I assume that this will need to use native jquery code rather than 
anything that comes with the jquery struts2 plugin. Let me know if I 
have that wrong.

Thanks in advance.

<s:form id="someEditForm" action="editEditAction" method="post" 
cssStyle="width: 100%" tooltipIconPath="/images/icons/tooltip.gif">

<tr>
     <td class="headingcolour" valign="top" colspan="2">
         <div style="border-bottom: 1px dotted black; width: 95%;">Field 
Group 1</div>
     </td>
</tr>

<s:textfield name="theBean.field1" label="Field1" maxlength="20" 
requiredLabel="true" tooltip="%{getText('theBean.field1.tooltip')}"/>

<s:textfield name="theBean.field2" label="Field2" maxlength="20" 
requiredLabel="true" tooltip="%{getText('theBean.field2.tooltip')}"/>

<tr>
     <td class="headingcolour" valign="top" colspan="2">
         <div style="border-bottom: 1px dotted black; width: 95%;">Field 
Group 2</div>
     </td>
</tr>

<s:textfield name="theBean.field3" label="Field3" maxlength="20" 
requiredLabel="true" tooltip="%{getText('theBean.field3.tooltip')}"/>

<s:textfield name="theBean.field4" label="Field4" maxlength="20" 
requiredLabel="true" tooltip="%{getText('theBean.field4.tooltip')}"/>

</s:form>


-- 
Patrick Kelly

PatrickKelly
PrincipalConsultant
*River**Dynamics*

E: patrick.kelly@riverdynamics.com <mailto:patrick.kelly@riverdynamics.com>
W: www.riverdynamics.com <http://www.riverdynamics.com/>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message