Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception:p:datatable should be within the form  RSS feed

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

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
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!