Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception:p:datatable should be within the form

 
N Deepu
Greenhorn
Posts: 28
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to bind a p:datatable from JSF 2.0 Custom Component through Encode Method and I'm able to bind it also, with an issue.

This is my custom Tag in the xhtml page :



and at the encode method i've the following :



But when I try to run this it throws an exception saying p:datatable has to be within a form element, though my custom tag is within h:form tag

So I tried adding this line :



Now it adds the datatable. But one table within the custom tag as I'm doing this in encode method and one more in the form at the top as I've added to the form.

How do I solve this issue? Kindly help me out.

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic