aspose file tools*
The moose likes JSF and the fly likes Exception:p:datatable should be within the form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Exception:p:datatable should be within the form" Watch "Exception:p:datatable should be within the form" New topic
Author

Exception:p:datatable should be within the form

N Deepu
Greenhorn

Joined: Jul 28, 2011
Posts: 25

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
 
Consider Paul's rocket mass heater.
 
subject: Exception:p:datatable should be within the form