-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Create and persist in inline editing
PostPosted: Thu Aug 25, 2011 10:38 am 
Newbie

Joined: Thu Aug 25, 2011 10:33 am
Posts: 1
Hello Everybody, I have a table called " QuestionReponse " and another one called "Non Confirmite ". The " Non Conformite " table has a foreign key to the " QuestionReponse " table, and after generating entities I get an object of Questionreponse in the "NonConformite" entity. The "NonConformite" entity contains just two attributs, the ID (generated automatically) and the Questionreponse Object

There is the code I'm using now:

Code:
<h:form>
  <rich:dataTable value="#{questionreponseList.resultList}" var="_qr" rows="10">
    <rich:column>
      <h:outputText value="#{_qr.idquestionReponse}" />
    </rich:column>
    <rich:column>
      <rich:inplaceInput value="#{_qr.commentaire}" />
    </rich:column>
    <rich:column>
    <h:selectOneMenu value="#{_qr.reponse}" id="selectedReponse"
               style=" width : 303px;">
               <f:selectItem itemLabel="#{questionreponseHome.instance.reponse.reponse}"
                  itemValue="" />
               <s:selectItems value="#{reponseAction.initReponseToTrack()}"
                  var="_reponse" label="#{_reponse.reponse}" />
               <s:convertEntity />
               <a:support event="onchange" action="#{reponseAction.test()}" />
            </h:selectOneMenu>
         </rich:column>
         
         <rich:column>
           <h:commandButton value="Create Non Conformite"/>
         </rich:column>
    <f:facet name="footer">
      <rich:datascroller maxPages="5" />
    </f:facet>
  </rich:dataTable>
  <h:commandButton action="#{nonconformiteAction.initNonConformite()}" value="Save"/>
</h:form>


I want that when I click on the "Create Non Conformite" an object of Nonconformite will be created containing the Questionreponse on the same row and put it in the database.

Any idea how can I do that?

I hope my post is clear, please help me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.