IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Struts 1 Java Discussion :

[Struts-Layout] problème du <layout:pager>


Sujet :

Struts 1 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2002
    Messages
    141
    Détails du profil
    Informations personnelles :
    Âge : 59
    Localisation : Tunisie

    Informations forums :
    Inscription : Août 2002
    Messages : 141
    Par défaut [Struts-Layout] problème du <layout:pager>
    bonjour,
    qq peut m'aider a faire fonctionner le <layout:pager> car en cliquant sur les numéro de page générés, le navigateur m'affiche le message d'erreur suivant : "Impossible de trouver la page"
    merci.

  2. #2
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Dans le struts-config.xml, as-tu bien défini l'Action SortAction ou le plugin LayoutPlugin, et si tu utilises les Tiles, le controller LayoutRequestProcessor, comme indiqué dans les instructions d'installation ?

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2002
    Messages
    141
    Détails du profil
    Informations personnelles :
    Âge : 59
    Localisation : Tunisie

    Informations forums :
    Inscription : Août 2002
    Messages : 141
    Par défaut
    j'ai appliquer les instructions indiquées dans le site proposé mais pas de chance. voilà mon code.
    struts-config
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
     
                     <action
                            path="/sort"
                            type="fr.improve.struts.taglib.layout.sort.SortAction"
                            scope="session"
                            validate="false" />
                       <action
                            path="/treeview"
                         type="fr.improve.struts.taglib.layout.treeview.TreeviewAction"
                            scope="session"
                            validate="false" />
     
     
        <controller processorClass="fr.improve.struts.taglib.layout.workflow.LayoutRequestProcessor"/>
     
        <!-- ========== Message Resources Definitions ============================ -->
        <message-resources  parameter="view.ApplicationResources" /> 
          <!-- ========== Plug Ins Configuration ================================= -->
        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property
            property="pathnames"
            value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
         </plug-in>
         <plug-in className="fr.improve.struts.taglib.layout.workflow.LayoutPlugin"/>
         <plug-in className="org.apache.struts.tiles.TilesPlugin" >
            <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" />
            <set-property property="definitions-debug" value="0" />
            <set-property property="definitions-parser-details" value="0" />
            <set-property property="definitions-parser-validate" value="false" />
            <set-property property="moduleAware" value="true"/>
        </plug-in>

  4. #4
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Quelle url s'affiche lorsque tu positionnes la souris sur un numéro de page ?

    Sinon, peux-tu montrer le code de la jsp ?

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Août 2002
    Messages
    141
    Détails du profil
    Informations personnelles :
    Âge : 59
    Localisation : Tunisie

    Informations forums :
    Inscription : Août 2002
    Messages : 141
    Par défaut
    voila mon url
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://192.68.132.9:8990/CNRPS-ViewController-context-root/sort.do?layoutCollection=1&layoutCollectionProperty=&layoutCollectionState=0&pagerPage=1
    et mon jsp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
     
    <!--
     * Description:  Etablir décompte
     * @author Mohamed AMINE OSMAN
     * @version 1.0
    -->
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib prefix="layout" uri="/WEB-INF/struts-layout.tld"  %>
    <%@ taglib prefix="tiles" uri="/WEB-INF/struts-tiles.tld"%>
    <%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
    <%@ page import="fr.improve.struts.taglib.layout.util.LayoutUtils" %>
    <script type="text/javascript" src="/config/datagrid.js"></script>
    <%String ur=request.getContextPath();%>
    <script type="text/javascript">
        function getContrat(){
            document.forms[0].action ="<%=request.getContextPath()%>/do/EtablirDecompte/getContrat";
            document.forms[0].submit();
        }
        function getTranche(){
            document.forms[0].action ="<%=request.getContextPath()%>/do/EtablirDecompte/getTranche";
            document.forms[0].submit();
        }
        function calculerDecompte(){
            document.forms[0].action ="<%=request.getContextPath()%>/do/EtablirDecompte/calculerDecompte";
            document.forms[0].submit();
        }
    </script>
     
    <layout:html>
            <tiles:insert template="/TEMPLATES/template.jsp">
                 <tiles:put name="Header" content="/TEMPLATES/Header.jsp"/>
                  <tiles:put name="Banner" content="/TEMPLATES/Banner.jsp"/>
           </tiles:insert>
     
    <body lang="ar" dir="rtl">
     <layout:skin includeScript="true"/>
     <layout:form action="/EtablirDecompte/getContrat"   styleClass="FORM" method="POST" width="100%" >
        <layout:row styleClass="LABEL">
            <layout:text property="rechercherIuAffilie" key="identifiant" size="10" maxlength="10" isRequired="true"/>
            <layout:date tooltip="dateDecompte" property="dateDecompte" patternKey="dd-MM-yyyy" key="dateDecompte" size="10" isRequired="true"/>
            <layout:button  onclick="getContrat();"><bean:message key="bouton.rechercher"/></layout:button>
        </layout:row>
        <layout:row styleClass="LABEL">
            <layout:column>
                <layout:row styleClass="LABEL">
                    <layout:text property="arPre" key="prenom" size="15" readonly="true"/>
                    <layout:text property="arNom" key="nom" size="15" readonly="true"/>
                    <layout:text property="numCin" key="cin" size="8" readonly="true"/>
                    <layout:text property="arAdresse" key="adresse" size="20" readonly="true"/>
                    <layout:text property="codPos" key="libposition" size="5" readonly="true"/>
                    <layout:text property="rs" key="txtEmployeur" size="10" readonly="true"/>
                </layout:row>
            </layout:column>
        </layout:row>
                <layout:panel  key="contrats" styleClass="FORM" width="90%" align="center">
                    <layout:pager maxPageItems="5">
                        <layout:datagrid property="listContrat" styleClass="DATAGRID" selectionAllowed="true" multipleSelectionAllowed="false" model="datagrid">
                            <layout:datagridColumn mode="I,I,I" width="100" title="refContrat" property="refContrat" />
                            <layout:datagridColumn mode="I,I,I" width="100" title="idetudiant" property="iuEtudiant"  />
                            <layout:datagridColumn mode="I,I,I" width="100" title="identifiant" property="iuAssure"  />
                            <layout:datagridColumn mode="I,I,I" width="100"   title="anneeuniversitaire" property="anneeUniversitaire" />
                            <layout:datagridColumn mode="I,I,I" width="100" title="montant" property="montant"  />
                            <layout:datagridColumn mode="I,I,I" width="100" title="fraisAff" property="fraisAff"  />
                            <layout:datagridColumn mode="I,I,I" width="100" title="interetInter" property="interetInter"  />
                        </layout:datagrid>
                    </layout:pager>
                    <layout:button onclick="getTranche();"><bean:message key="bouton.detail"/></layout:button>
                </layout:panel>
                <layout:panel  key="tranches" styleClass="FORM" width="50%" align="center">
                    <layout:pager maxPageItems="5">
                        <layout:datagrid property="listTranche" styleClass="DATAGRID" selectionAllowed="true" multipleSelectionAllowed="true" model="datagrid">
                            <layout:datagridColumn mode="I,I,I" width="100" title="refContrat" property="refContrat" />
                            <layout:datagridColumn mode="I,I,I" width="100" title="montant" property="montant"  />
                            <layout:datagridColumn mode="I,I,I" width="100" title="dateOperation" property="dateOperation"  />
                            <layout:datagridColumn mode="I,I,I" width="100" title="interetInter" property="interetInter"  />
                        </layout:datagrid>
                        <layout:row> 
                            <layout:pagerStatus key="pager.status.pager" /> 
                            <layout:pagerStatus key="pager.status.items"/> 
                        </layout:row>
                    </layout:pager>
                    <layout:button onclick="calculerDecompte();">  <bean:message key="bouton.calculer"/></layout:button>
                </layout:panel>
        <layout:row>
            <layout:text property="fraisAff" key="fraisAff" size="10" readonly="true"/>
            <layout:text property="interetInter" key="interetInter" size="10" readonly="true"/>
            <layout:text property="valeurDecompte" key="valeurDecompte" size="10" readonly="true"/>
        </layout:row>
        <layout:row styleClass="LABEL">
            <layout:cancel><bean:message key="bouton.quitter"/></layout:cancel>
        </layout:row>
    </layout:form>
    </body>
    <jsp:include page="/JSP/popUpError.jsp" />
    </layout:html>

  6. #6
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Le tag layout:pager est sensé fonctionner avec le tag layout:collection.
    Je ne suis pas certaine qu'il fonctionne avec le tag layout:datagrid.

  7. #7
    Invité de passage
    Profil pro
    Inscrit en
    Août 2007
    Messages
    1
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 1
    Par défaut
    ajoute cette ligne ds ton struts-config.xml :
    <action path="/sort" type="fr.improve.struts.taglib.layout.sort.SortAction">
    </action>

Discussions similaires

  1. [Layout] drag and drop sur deux layout ?
    Par mensoif dans le forum Agents de placement/Fenêtres
    Réponses: 7
    Dernier message: 08/12/2009, 13h00
  2. Réponses: 2
    Dernier message: 18/08/2009, 10h58
  3. Réponses: 0
    Dernier message: 11/03/2009, 12h23
  4. Réponses: 2
    Dernier message: 14/11/2008, 20h43
  5. Réponses: 1
    Dernier message: 22/04/2008, 14h00

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo