I am new to Primefaces and have run into this problem. Using the following code....
<h:form>
<p:inplace editor="true">
<p:inputText value="#{someBeanData}" required="true" />
</p:inplace>
</h:form>
... fails to SAVE. When you click the save button nothing happens. Cancel works fine. If I remove the surrounding form tags...
<p:inplace editor="true">
<p:inputText value="#{someBeanData}" required="true" />
</p:inplace>
... everything works fine. Normally I would just not use the form tags, but my data is contained in Tabs and tabs don't work unless they are inside forms.... any help? I am using Primefaces 3.0 M4.
Inplace inside Form fails to save
-
- Posts: 13
- Joined: 26 Nov 2011, 04:05
I am using 2.2.1 and I believe the editor option turns on Ajax Editing. To implement saving I think you need to add a saveListener="#{inplaceBean.handleSave} to your inplace tag for the save to work. Check the user guide though I may not understand your issue fully.
-
- Posts: 5
- Joined: 25 Nov 2011, 18:10
I think things have changed for v.3. In my example code I am using editor="true" and it work ONLY when the input text field is NOT enclosed in the form tag -- see my example code above. Anyone?
-
- Posts: 5
- Joined: 25 Nov 2011, 18:10
Just a follow-up -- I solved my problem. It turns out the bean I was storing the data to was of type "Number" and I had no "setter function" that converted a string to a Number type so the save feature was failing. I'm not sure why it worked when the xhtml was enclosed in 'form' tags.
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 23 guests