0

I want to create a form which when it's submitted it renders and executes a second form:

<h:form id="paymentform">
      <div>
          .....                                                     
      </div>
        <h:commandButton id="buy" type="submit" value="Put" action="#{dashboard.calculateProcessing}" >
          <f:ajax render="@form formdddasd" execute="@form formdddasd"/>
        </h:commandButton>                                                  
  </h:form>

Second form which must be reloaded and refreshed:

<h:form id="formdddasd">
    <h:dataTable id="formdd" value="#{orders.cdList}" var="cd"
        rendered="#{orders.cdList ne null}"                         
            ...........     
    </h:dataTable>                      
</h:form>

The first form is executed and rendered but the second form is not. Is it possible to implement this functionality?

Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

2 Answers2

0

Is it possible to implement this functionality?

Yes

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
  • That was not your question, but since it is you it was to be expected you'd want more information. But ok: You should do it the same way as a plain inputtext in another form.... – Kukeltje Dec 21 '19 at 19:47
  • I tried many options: `render=":data_table_form:data_table"` and `render=":data_table"` Why it's not working? – Peter Penzov Dec 21 '19 at 21:54
  • Instead pf posting small things when asked, create a full good question **with a [mcve]** – Kukeltje Dec 22 '19 at 15:01
0

try this

<f:ajax render="@form :formdddasd" execute="@form :formdddasd"/>
Ahmed HENTETI
  • 1,108
  • 8
  • 18
  • answers with just code are not the best in stackoverflow. And if OP would run in developement mode, with 99.99% certainty there is an explicit duplicate, but OP does not want to search for duplicates himself, he wants us to do that for him https://stackoverflow.com/questions/8334819/ajax-render-a-table-which-is-inside-a-different-form (and do not forget https://stackoverflow.com/questions/7415230/uiform-with-prependid-false-breaks-fajax-render) Even a simple google search would have helped for OP, but OP does not even want to do that :https://www.google.com/search?q=jsf+render+other+form – Kukeltje Dec 21 '19 at 19:52
  • like required in [ask] – Kukeltje Dec 21 '19 at 19:57
  • What do you mean by `OP` please ? – Ahmed HENTETI Dec 21 '19 at 20:29
  • I also tried `render=":data_table_form:data_table"` but it's not working also. – Peter Penzov Dec 21 '19 at 21:06
  • OP = original poster, sorry – Kukeltje Dec 22 '19 at 15:03