-1

I am using JSF2+Primefaces Can any give me demo example to add a textbox with Calendar component dynamically on a button click?

Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202

1 Answers1

0

As mentioned in the comment link, Use like this:

<h:dataTable var="data" value=#{bean.listOfValues} rendered=#{bean.onClickofButton}>

  /* your input text box and calendar component comes here */
</h:dataTable>

In the backing bean, you can define a boolean value named "onClickofButton" which you can set or reset with click of button and also mention "update" attribute in your commandbutton to refresh the dataTable component. Here "listOfValues" in the bean is the values you want to display.

For more on primefaces components, check their showcase. Hope this helps!

h-kach
  • 351
  • 2
  • 8
  • 25