You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2015/10/09 21:50:39 UTC
RE: sj:grid --- action errors and highlight the row/row cell that
failed validation
Still looking for help on this please...
> From: zyxrm@hotmail.com
> To: user@struts.apache.org
> Subject: sj:grid --- action errors and highlight the row/row cell that failed validation
> Date: Fri, 18 Sep 2015 16:17:33 -0400
>
> Trying to display action errors when trying to save a row in a <sj:grid> .... Is there an example I can follow?
>
>
> Followed
>
> https://code.google.com/p/struts2-jquery/wiki/EditGrid ---- Simple Edit ---- and wrote validate method which is returning the action errors.
>
>
> 1. How should be the struts.xml configured? as success return type is json, what should it be for input?
>
> <action name="editResultsAJAXAction" class="xxx.EditAddEmpGridEntryAction">
>
> <result name="success" type="json"></result>
>
> <result name="error" type="json"></result>
>
> <result name="input">/jsp/createFidAddCas.jsp</result>
>
> </action>
>
>
> 2. how to display these action errors and how to highlight the column cell in the grid that's not valid.
>
>
>
> Need help with this please.
>
RE: sj:grid --- action errors and highlight the row/row cell that
failed validation
Posted by fea jabi <zy...@hotmail.com>.
Thank you, for your response. I really appreciate it. I got it working.
> From: mgainty@hotmail.com
> To: user@struts.apache.org
> Subject: RE: sj:grid --- action errors and highlight the row/row cell that failed validation
> Date: Fri, 9 Oct 2015 17:31:15 -0400
>
>
>
>
>
> > From: zyxrm@hotmail.com
> > To: user@struts.apache.org
> > Subject: RE: sj:grid --- action errors and highlight the row/row cell that failed validation
> > Date: Fri, 9 Oct 2015 15:50:39 -0400
> >
> > Still looking for help on this please...
> >
> > > From: zyxrm@hotmail.com
> > > To: user@struts.apache.org
> > > Subject: sj:grid --- action errors and highlight the row/row cell that failed validation
> > > Date: Fri, 18 Sep 2015 16:17:33 -0400
> > >
> > > Trying to display action errors when trying to save a row in a <sj:grid> .... Is there an example I can follow?
> > >
> > >
> > > Followed
> > >
> > > https://code.google.com/p/struts2-jquery/wiki/EditGrid ---- Simple Edit ---- and wrote validate method which is returning the action errors.
> > >
> > >
> > > 1. How should be the struts.xml configured?
> MG>one is provided in each sample application
>
> as success return type is json, what should it be for input?
> > >
> > > <action name="editResultsAJAXAction" class="xxx.EditAddEmpGridEntryAction">
> > >
> > > <result name="success" type="json"></result>
> > >
> > > <result name="error" type="json"></result>
> > >
> > > <result name="input">/jsp/createFidAddCas.jsp</result>
> MG>you didnt specify default type for package so if type attribute is not specified, the framework will MG>use the default dispatcher type, which forwards to another web resource
> https://struts.apache.org/docs/result-configuration.html
> > >
> > > </action>
> > >
> > >
> > > 2. how to display these action errors
> <action name="upload" class="com.jgeppert.struts2.jquery.richtext.actions.CkeditorUpload">
> <result type="freemarker" name="error">/ckeditor/ckeditorError.ftl</result>
> <!-- you can use any of the available 'type's for error result -->
> https://struts.apache.org/docs/result-types.html
>
> and how to highlight the column cell in the grid that's not valid.
> MG>you have to add stylesheet class which contains, font,size and color of the css stylesheet class to the control in question..
> MG>here is an example of cranking up the font size for tag id="errorElement"
> MG>$("#errorElement").style.fontSize="20px";
> > >
> > >
> > > Need help with this please.
> MG>you should have enough information
> MG>consider paying for further help in answering your questions
> > >
> >
>
RE: sj:grid --- action errors and highlight the row/row cell that
failed validation
Posted by Martin Gainty <mg...@hotmail.com>.
> From: zyxrm@hotmail.com
> To: user@struts.apache.org
> Subject: RE: sj:grid --- action errors and highlight the row/row cell that failed validation
> Date: Fri, 9 Oct 2015 15:50:39 -0400
>
> Still looking for help on this please...
>
> > From: zyxrm@hotmail.com
> > To: user@struts.apache.org
> > Subject: sj:grid --- action errors and highlight the row/row cell that failed validation
> > Date: Fri, 18 Sep 2015 16:17:33 -0400
> >
> > Trying to display action errors when trying to save a row in a <sj:grid> .... Is there an example I can follow?
> >
> >
> > Followed
> >
> > https://code.google.com/p/struts2-jquery/wiki/EditGrid ---- Simple Edit ---- and wrote validate method which is returning the action errors.
> >
> >
> > 1. How should be the struts.xml configured?
MG>one is provided in each sample application
as success return type is json, what should it be for input?
> >
> > <action name="editResultsAJAXAction" class="xxx.EditAddEmpGridEntryAction">
> >
> > <result name="success" type="json"></result>
> >
> > <result name="error" type="json"></result>
> >
> > <result name="input">/jsp/createFidAddCas.jsp</result>
MG>you didnt specify default type for package so if type attribute is not specified, the framework will MG>use the default dispatcher type, which forwards to another web resource
https://struts.apache.org/docs/result-configuration.html
> >
> > </action>
> >
> >
> > 2. how to display these action errors
<action name="upload" class="com.jgeppert.struts2.jquery.richtext.actions.CkeditorUpload">
<result type="freemarker" name="error">/ckeditor/ckeditorError.ftl</result>
<!-- you can use any of the available 'type's for error result -->
https://struts.apache.org/docs/result-types.html
and how to highlight the column cell in the grid that's not valid.
MG>you have to add stylesheet class which contains, font,size and color of the css stylesheet class to the control in question..
MG>here is an example of cranking up the font size for tag id="errorElement"
MG>$("#errorElement").style.fontSize="20px";
> >
> >
> > Need help with this please.
MG>you should have enough information
MG>consider paying for further help in answering your questions
> >
>