Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0 RC1
-
Component/s: Tag Library
-
Labels:None
Description
====
imported from sf tracker
id 948509
submitted by yann - ian93
http://sourceforge.net/tracker/index.php?func=detail&group_id=73068&atid=536613&aid=948509
====
I'am trying to use diplay tag with struts. A form bean
call an action and I want to display form property in a
table. It looks like the the tag (table) builds the links
based off the current url and appends parameters to
support sorting and paging. The problem that I have is,
If there are too many parameters in the current
url,displaytag do not takes all my parameters( It seems
to allow a maximum size in current url).
my formBean:
/**
* @author yann
*
*
* @struts.form
* name="suiviAccesForm"
*
*
*
*/
public class SuiviAccesForm extends ValidatorForm
{
private String periode;
private String dateDebut;
private String dateFin;
20 private String
.
.
.
}
My struts action:
/**
* @author yann
*
* @struts.action
* path = "/suiviAcces"
* parameter = "method"
* scope="request"
* name="suiviAccesForm"
* validate="false"
*
*
* @struts.action-forward
* name = "suiviAccesDef"
* path = "suiviAccesDef"
*
*
*/
public class SuiviAccesAction extends
AbstractTraceAction {
private static final String SUCCESS = "suiviAccesDef";
public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
ActionErrors errors = (ActionErrors) request.getAttribute
(Globals.ERROR_KEY);
request.getSession().setAttribute
(Globals.ERROR_KEY,errors);
SuiviAccesForm suiviAccesForm = (SuiviAccesForm)form;
suiviAccesForm.setListeMois(populeMois());
suiviAccesForm.setListeSemaine(populeSemaine());
suiviAccesForm.setDateDebut(populeDateJour());
suiviAccesForm.setDateFin(populeDateJour());
return mapping.findForward(SUCCESS);
}
.
.
.
my jsp:
<display:table
name="requestScope.suiviAccesForm.resultat"
pagesize="10" width="100%" requestURI="">
<display:column property="date" title="Date"
headerClass="cssSousTitre" width="20%"/>
<display:column property="agent" title="Agent"
headerClass="cssSousTitre" width="20%"/>
<display:column property="dossier" title="Dossier"
headerClass="cssSousTitre" width="20%"/>
<display:column property="sensible" title="Dossier
sensible" headerClass="cssSousTitre" width="10%"/>
<display:column property="AFT" title="AFT"
headerClass="cssSousTitre" width="20%"/>
<display:column property="archivage" title="Archivage"
headerClass="cssSousTitre" width="10%"/>
<display:setProperty name="paging.banner.first"
value="<span class='cssTitreTrace'>[Précédent/Suivant]
{0} [<a href={3}>Suivant</a>/<a href={4}>Dernière
page</a>]</span>"/>
<display:setProperty name="paging.banner.full"
value="<span class='cssTitreTrace'>[<a href={1}
>Première page</a>/<a href={2}>Précédent</a>] {0}
[<a href={3}>Suivant</a>/<a href={4}>Dernière
page</a>]</span>"/>
<display:setProperty name="paging.banner.last"
value="<span class='cssTitreTrace'>[<a href={1}
>Première page</a>/<a href={2}>Prev</a>] {0}
[Suivant/Dernière page]</span>"/>
<display:setProperty
name="paging.banner.all_items_found" value=""/>
<display:setProperty
name="paging.banner.some_items_found" value=""/>
<display:setProperty
name="paging.banner.one_item_found" value=""/>
<display:setProperty
name="paging.banner.no_items_found" value="<span
class='cssSousTitre'>Aucun {0} trouvé.</span>"/>
<display:setProperty name="paging.banner.page.link"
value="<a href={1} title='Aller page {0}'>{0}</a>"/>
</display:table>
imported from sf tracker
id 948509
submitted by yann - ian93
http://sourceforge.net/tracker/index.php?func=detail&group_id=73068&atid=536613&aid=948509
====
I'am trying to use diplay tag with struts. A form bean
call an action and I want to display form property in a
table. It looks like the the tag (table) builds the links
based off the current url and appends parameters to
support sorting and paging. The problem that I have is,
If there are too many parameters in the current
url,displaytag do not takes all my parameters( It seems
to allow a maximum size in current url).
my formBean:
/**
* @author yann
*
*
* @struts.form
* name="suiviAccesForm"
*
*
*
*/
public class SuiviAccesForm extends ValidatorForm
{
private String periode;
private String dateDebut;
private String dateFin;
20 private String
.
.
.
}
My struts action:
/**
* @author yann
*
* @struts.action
* path = "/suiviAcces"
* parameter = "method"
* scope="request"
* name="suiviAccesForm"
* validate="false"
*
*
* @struts.action-forward
* name = "suiviAccesDef"
* path = "suiviAccesDef"
*
*
*/
public class SuiviAccesAction extends
AbstractTraceAction {
private static final String SUCCESS = "suiviAccesDef";
public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
ActionErrors errors = (ActionErrors) request.getAttribute
(Globals.ERROR_KEY);
request.getSession().setAttribute
(Globals.ERROR_KEY,errors);
SuiviAccesForm suiviAccesForm = (SuiviAccesForm)form;
suiviAccesForm.setListeMois(populeMois());
suiviAccesForm.setListeSemaine(populeSemaine());
suiviAccesForm.setDateDebut(populeDateJour());
suiviAccesForm.setDateFin(populeDateJour());
return mapping.findForward(SUCCESS);
}
.
.
.
my jsp:
<display:table
name="requestScope.suiviAccesForm.resultat"
pagesize="10" width="100%" requestURI="">
<display:column property="date" title="Date"
headerClass="cssSousTitre" width="20%"/>
<display:column property="agent" title="Agent"
headerClass="cssSousTitre" width="20%"/>
<display:column property="dossier" title="Dossier"
headerClass="cssSousTitre" width="20%"/>
<display:column property="sensible" title="Dossier
sensible" headerClass="cssSousTitre" width="10%"/>
<display:column property="AFT" title="AFT"
headerClass="cssSousTitre" width="20%"/>
<display:column property="archivage" title="Archivage"
headerClass="cssSousTitre" width="10%"/>
<display:setProperty name="paging.banner.first"
value="<span class='cssTitreTrace'>[Précédent/Suivant]
{0} [<a href={3}>Suivant</a>/<a href={4}>Dernière
page</a>]</span>"/>
<display:setProperty name="paging.banner.full"
value="<span class='cssTitreTrace'>[<a href={1}
>Première page</a>/<a href={2}>Précédent</a>] {0}
[<a href={3}>Suivant</a>/<a href={4}>Dernière
page</a>]</span>"/>
<display:setProperty name="paging.banner.last"
value="<span class='cssTitreTrace'>[<a href={1}
>Première page</a>/<a href={2}>Prev</a>] {0}
[Suivant/Dernière page]</span>"/>
<display:setProperty
name="paging.banner.all_items_found" value=""/>
<display:setProperty
name="paging.banner.some_items_found" value=""/>
<display:setProperty
name="paging.banner.one_item_found" value=""/>
<display:setProperty
name="paging.banner.no_items_found" value="<span
class='cssSousTitre'>Aucun {0} trouvé.</span>"/>
<display:setProperty name="paging.banner.page.link"
value="<a href={1} title='Aller page {0}'>{0}</a>"/>
</display:table>
Sender: knuterikb
Also:
The request parameters seems to add up for each time you
sort by a column, and after a couple of sort operations,
sorting and paginations doesn't work any more!