Inplace inside Form fails to save

UI Components for JSF
Post Reply
captain_jim1
Posts: 5
Joined: 25 Nov 2011, 18:10

25 Nov 2011, 18:17

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.

blueshirts
Posts: 13
Joined: 26 Nov 2011, 04:05

27 Nov 2011, 06:42

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.

captain_jim1
Posts: 5
Joined: 25 Nov 2011, 18:10

28 Nov 2011, 18:17

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?

captain_jim1
Posts: 5
Joined: 25 Nov 2011, 18:10

29 Nov 2011, 21:50

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.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 23 guests