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

JSF Java Discussion :

Problème modalpopup richface


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Août 2010
    Messages
    17
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 17
    Par défaut Problème modalpopup richface
    bjr,
    je veux alimenter un rich datatable via un formulaire dans une fenetre popup ,
    le problème c'est que aprés le click sur un bouton ajouter de la fenêtre popup
    les valeur des propriétés restes null dans mon impossible de les recuperer.
    ??
    voici un bou de code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    <rich:menuItem value="Ajouter" ajaxSingle="true"
    icon="#{a4jSkin.nameSkin}/img/edititem.gif" submitMode="ajax">
    <a4j:support event="onselect" action="#{equipement_browse.change}"
    reRender="dataTable,pp" actionListener="#{equipement_browse.onchange}"></a4j:support>
    </rich:menuItem>
    nb:l'interception de l'evenement ajax se fait dans mon bean

  2. #2
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Par défaut
    est ce que la modalPanel contient son propre h:form ?

  3. #3
    Membre averti
    Inscrit en
    Août 2010
    Messages
    17
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 17
    Par défaut
    non le tout dans le mème h:form !!

  4. #4
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Par défaut
    Deux règles primordiales de l'utilisation de la modalPanel:

    - elle doit être placé en dehors du h:form original

    - elle doit contenir son propre h:form pour faire un submit des ses données.

  5. #5
    Membre averti
    Inscrit en
    Août 2010
    Messages
    17
    Détails du profil
    Informations forums :
    Inscription : Août 2010
    Messages : 17
    Par défaut
    Toujours rien !!
    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
     
    <ui:composition template="/faces/templates/neweditTemplate.xhtml"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:rich="http://richfaces.org/rich"
    	xmlns:a4j="http://richfaces.org/a4j"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:c="http://java.sun.com/jstl/core"
    	xmlns:richfaces="http://richfaces.ajax4jsf.org/rich">
     
    	<ui:define name="object">
    		<h:outputLabel value="#{generalSocieteBean.s1}" id="pp"></h:outputLabel>
    		<h:inputText style=" width : 300px;" value="#{generalSocieteBean.s2}">
    			<a4j:support event="onchange" action="#{generalSocieteBean.change}"
    				reRender="pp"
    				actionListener="#{generalSocieteBean.onchangePoinGrai}"></a4j:support>
    		</h:inputText>
     
    		<rich:panel style="text-align:right">
    			<h:outputLabel>
    				<h:graphicImage url="#{a4jSkin.nameSkin}/img/add1.gif"
    					onclick="Richfaces.showModalPanel('panelTreeptgraissage')" />
     
    						   Ajouter
     
    	 			      </h:outputLabel>
    		</rich:panel>
     
    	</ui:define>
     
     
     
    	<ui:define name="content">
    		<h:form id="ff">
    			<rich:modalPanel id="panelTreeptgraissage" height="500" width="600"
    				resizeable="true" moveable="false">
    				<f:facet name="header">
    					<rich:dropDownMenu value="Action">
    						<rich:menuItem value="Exit"
    							icon="#{a4jSkin.nameSkin}/img/exit.png"
    							onclick="Richfaces.hideModalPanel('panelTreeptgraissage');">
    						</rich:menuItem>
     
    						<rich:menuItem value="Ajouter" ajaxSingle="true"
    							icon="#{a4jSkin.nameSkin}/img/edititem.gif" submitMode="ajax">
     
    							<a4j:support event="onclick"
    								action="#{generalSocieteBean.change}" reRender="pp"
    								actionListener="#{generalSocieteBean.onchangePoinGrai}"></a4j:support>
     
     
    						</rich:menuItem>
    					</rich:dropDownMenu>
     
    				</f:facet>
     
     
    				<rich:panel>
     
     
    					<h:inputText style=" width : 300px;"
    						value="#{generalSocieteBean.s1}">
    						<a4j:support event="onchange"
    							action="#{generalSocieteBean.change}" reRender="pp"
    							actionListener="#{generalSocieteBean.onchangePoinGrai}"></a4j:support>
    					</h:inputText>
     
     
    				</rich:panel>
    				<a4j:commandButton id="yesButton" value="hello" reRender="pp"
    					action="#{generalSocieteBean.change}">
    				</a4j:commandButton>
     
     
    			</rich:modalPanel>
     
    		</h:form>
    	</ui:define>
    </ui:composition>

  6. #6
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Par défaut
    ellle est toujours incluse dans un h:form glabal..

    ce que tu peux faire:




    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
     
    <ui:composition template="/faces/templates/neweditTemplate.xhtml"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:rich="http://richfaces.org/rich"
    	xmlns:a4j="http://richfaces.org/a4j"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:c="http://java.sun.com/jstl/core"
    	xmlns:richfaces="http://richfaces.ajax4jsf.org/rich">
     
    	<ui:define name="object">
            <ui:include  src="modalPanel.xhtml" />
     
          .. .. ..
    <h:form>
    ...
    </h:form>
     
    </ui:composition>
    et la modalPanel

    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
    <rich:modalPanel id="_panel"  >
     
    		<f:facet name="header">
     
    		</f:facet>
    		<f:facet name="controls">
     
    		</f:facet>
    <a4j:outputPanel id="moadal_content" layout="inline">
    <h:form >
    ...
     
    </h:form>
    <a4j:outputPanel/>
    ...
    </rich:modalPanel>

Discussions similaires

  1. Problème intégration RichFaces 3.1.6
    Par evguen dans le forum JSF
    Réponses: 5
    Dernier message: 05/08/2008, 17h33
  2. Problème avec Richfaces
    Par nounoucha dans le forum JSF
    Réponses: 9
    Dernier message: 09/07/2008, 12h58
  3. problème avec RichFaces
    Par damidame dans le forum JSF
    Réponses: 4
    Dernier message: 30/04/2008, 01h53
  4. Problème avec RichFaces
    Par Jexou dans le forum JSF
    Réponses: 8
    Dernier message: 11/04/2008, 14h14
  5. problème avec richFaces sous tomcat6
    Par info_plus dans le forum JSF
    Réponses: 4
    Dernier message: 03/04/2008, 17h08

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