RE: jQuery query

2016-06-29 Thread Martin Gainty



> From: anamika.chouras...@gmail.com
> Date: Wed, 29 Jun 2016 13:57:56 +0530
> Subject: Re: jQuery query
> To: user@struts.apache.org
> 
> You need to put both textboxes of each group in one div, give this div an
> id and than user JQUEry inbuild function to toggle it
> 
> something like this
> $("#fieldGroup1").toggle(); on click event of "Field Group 1" link.
> $("#fieldGroup2").toggle(); on click event of "Field Group 2" link.
> 
>  cssStyle="width: 100%" tooltipIconPath="/images/icons/tooltip.gif">
> 
> 
> 
> Field
> Group 1
> 
> 
> **
>  requiredLabel="true" tooltip="%{getText('theBean.field1.tooltip')}"/>
> 
>  requiredLabel="true" tooltip="%{getText('theBean.field2.tooltip')}"/>
> 
> 
> 
> Field
> Group 2
> 
> 
> * *
>  requiredLabel="true" tooltip="%{getText('theBean.field3.tooltip')}"/>
MG>provided theBean is defined as variable in Action which holds accessors and 
mutators for field3,field4 so in your actionpublic class PatrickAction {private 
 Bean theBean; //theBean holds value, mutator and accessor for field3 and 
field4...MG>
> 
>  requiredLabel="true" tooltip="%{getText('theBean.field4.tooltip')}"/>
> 
> 
MG>since you will implement DIV..flip javascriptTooltip attribute to true..the 
default is false and your JS generateTooltip wont work

https://struts.apache.org/docs/div.html
> 
> On Wed, Jun 29, 2016 at 1:25 PM, Patrick Kelly <
> patrick.ke...@riverdynamics.com> wrote:
> 
> > correct
> >
> >
> > Patrick Kelly
> >
> > PatrickKelly
> > PrincipalConsultant
> > *River**Dynamics*
> >
> > E: patrick.ke...@riverdynamics.com <mailto:patrick.ke...@riverdynamics.com
> > >
> > W: www.riverdynamics.com <http://www.riverdynamics.com/>
> >
> > On 29/06/2016 5:48 PM, Anamika Chourasiya wrote:
> >
> >> Hi
> >>
> >> As per my understanding about the requirement, if the user clicks on the
> >> "Field Group 1"  field 1 and field 2 textboxes should get visible and if
> >> he
> >> again click on the same link they should get disappear. Same functionality
> >> for "Field Group 2". Am I right?
> >>
> >> On Wed, Jun 29, 2016 at 12:39 PM, Patrick Kelly <
> >> patrick.ke...@riverdynamics.com> wrote:
> >>
> >> 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.
> >>>
> >>>  >>> cssStyle="width: 100%" tooltipIconPath="/images/icons/tooltip.gif">
> >>>
> >>> 
> >>>  
> >>>  Field
> >>> Group 1
> >>>  
> >>> 
> >>>
> >>>  >>> requiredLabel="true" tooltip="%{getText('theBean.field1.tooltip')}"/>
> >>>
> >>>  >>> requiredLabel="true" tooltip="%{getText('theBean.field2.tooltip')}"/>
> >>>
> >>> 
> >>>  
> >>>  Field
> >>> Group 2
> >>>  
> >>> 
> >>>
> >>>  >>> requiredLabel="true" tooltip="%{getText('theBean.field3.tooltip')}"/>
> >>>
> >>>  >>> requiredLabel="true" tooltip="%{getText('theBean.field4.tooltip')}"/>
> >>>
> >>> 
> >>>
> >>>
> >>> --
> >>> Patrick Kelly
> >>>
> >>> PatrickKelly
> >>> PrincipalConsultant
> >>> *River**Dynamics*
> >>>
> >>> E: patrick.ke...@riverdynamics.com  >>> patrick.ke...@riverdynamics.com
> >>> W: www.riverdynamics.com <http://www.riverdynamics.com/>
> >>>
> >>>
> >>>
> >>
> >
> 
> 
> -- 
> Anamika Chourasiya
  

Re: jQuery query

2016-06-29 Thread Anamika Chourasiya
You need to put both textboxes of each group in one div, give this div an
id and than user JQUEry inbuild function to toggle it

something like this
$("#fieldGroup1").toggle(); on click event of "Field Group 1" link.
$("#fieldGroup2").toggle(); on click event of "Field Group 2" link.





Field
Group 1


**






Field
Group 2


* *






On Wed, Jun 29, 2016 at 1:25 PM, Patrick Kelly <
patrick.ke...@riverdynamics.com> wrote:

> correct
>
>
> Patrick Kelly
>
> PatrickKelly
> PrincipalConsultant
> *River**Dynamics*
>
> E: patrick.ke...@riverdynamics.com  >
> W: www.riverdynamics.com 
>
> On 29/06/2016 5:48 PM, Anamika Chourasiya wrote:
>
>> Hi
>>
>> As per my understanding about the requirement, if the user clicks on the
>> "Field Group 1"  field 1 and field 2 textboxes should get visible and if
>> he
>> again click on the same link they should get disappear. Same functionality
>> for "Field Group 2". Am I right?
>>
>> On Wed, Jun 29, 2016 at 12:39 PM, Patrick Kelly <
>> patrick.ke...@riverdynamics.com> wrote:
>>
>> 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.
>>>
>>> >> cssStyle="width: 100%" tooltipIconPath="/images/icons/tooltip.gif">
>>>
>>> 
>>>  
>>>  Field
>>> Group 1
>>>  
>>> 
>>>
>>> >> requiredLabel="true" tooltip="%{getText('theBean.field1.tooltip')}"/>
>>>
>>> >> requiredLabel="true" tooltip="%{getText('theBean.field2.tooltip')}"/>
>>>
>>> 
>>>  
>>>  Field
>>> Group 2
>>>  
>>> 
>>>
>>> >> requiredLabel="true" tooltip="%{getText('theBean.field3.tooltip')}"/>
>>>
>>> >> requiredLabel="true" tooltip="%{getText('theBean.field4.tooltip')}"/>
>>>
>>> 
>>>
>>>
>>> --
>>> Patrick Kelly
>>>
>>> PatrickKelly
>>> PrincipalConsultant
>>> *River**Dynamics*
>>>
>>> E: patrick.ke...@riverdynamics.com >> patrick.ke...@riverdynamics.com
>>> W: www.riverdynamics.com 
>>>
>>>
>>>
>>
>


-- 
Anamika Chourasiya


Re: jQuery query

2016-06-29 Thread Patrick Kelly

correct


Patrick Kelly

PatrickKelly
PrincipalConsultant
*River**Dynamics*

E: patrick.ke...@riverdynamics.com 
W: www.riverdynamics.com 

On 29/06/2016 5:48 PM, Anamika Chourasiya wrote:

Hi

As per my understanding about the requirement, if the user clicks on the
"Field Group 1"  field 1 and field 2 textboxes should get visible and if he
again click on the same link they should get disappear. Same functionality
for "Field Group 2". Am I right?

On Wed, Jun 29, 2016 at 12:39 PM, Patrick Kelly <
patrick.ke...@riverdynamics.com> wrote:


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.




 
 Field
Group 1
 







 
 Field
Group 2
 









--
Patrick Kelly

PatrickKelly
PrincipalConsultant
*River**Dynamics*

E: patrick.ke...@riverdynamics.com 








Re: jQuery query

2016-06-29 Thread Anamika Chourasiya
Hi

As per my understanding about the requirement, if the user clicks on the
"Field Group 1"  field 1 and field 2 textboxes should get visible and if he
again click on the same link they should get disappear. Same functionality
for "Field Group 2". Am I right?

On Wed, Jun 29, 2016 at 12:39 PM, Patrick Kelly <
patrick.ke...@riverdynamics.com> wrote:

> 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.
>
>  cssStyle="width: 100%" tooltipIconPath="/images/icons/tooltip.gif">
>
> 
> 
> Field
> Group 1
> 
> 
>
>  requiredLabel="true" tooltip="%{getText('theBean.field1.tooltip')}"/>
>
>  requiredLabel="true" tooltip="%{getText('theBean.field2.tooltip')}"/>
>
> 
> 
> Field
> Group 2
> 
> 
>
>  requiredLabel="true" tooltip="%{getText('theBean.field3.tooltip')}"/>
>
>  requiredLabel="true" tooltip="%{getText('theBean.field4.tooltip')}"/>
>
> 
>
>
> --
> Patrick Kelly
>
> PatrickKelly
> PrincipalConsultant
> *River**Dynamics*
>
> E: patrick.ke...@riverdynamics.com  >
> W: www.riverdynamics.com 
>
>


-- 
Anamika Chourasiya