Inplace edit buttons stay there.

Post Reply
mafaul
Posts: 8
Joined: 12 Jan 2015, 07:24

29 Apr 2019, 10:20

Bug: An inplace editor with ajax listener keeps buttons there after clicking on the tick button. It used to go away after the button is ticked, like it does without the ajax listener.
Barcelona v 2.0.0
PF 7.0

To recreate on barcelona demo (form page):

Code: Select all

<p:inplace editor="true">
	<f:facet name="output">
		<h:outputText value="sample"></h:outputText>
	</f:facet>

	<f:facet name="input">
		<p:inputText />
			<p:ajax event="save" listener="#{autoCompleteView.completeText}" update="@this" />
	</f:facet>
</p:inplace>

aragorn
Posts: 3762
Joined: 29 Jun 2013, 12:38

29 Apr 2019, 12:06

I couldn't replicate it. Also, <p:ajax event="save"> is in the wrong area. Please use;

Code: Select all

<p:inplace editor="true">
       <p:ajax event="save" listener="#{autoCompleteView.completeText}" update="@this" />
	<f:facet name="output">
		<h:outputText value="sample"></h:outputText>
	</f:facet>

	<f:facet name="input">
		<p:inputText />
	</f:facet>
</p:inplace>
I think this issue is unrelated to Barcelona Layout/Theme. Could you please try it without Barcelona? And Could you please attach a video?

mafaul
Posts: 8
Joined: 12 Jan 2015, 07:24

29 Apr 2019, 16:15

Thank you for pointing out the ajax location tag.

Video: https://drive.google.com/file/d/1tZJgpB ... sp=sharing

To recreate, just add the inplace tag into the example site's forms.xhtml page:

Code: Select all

<!-- Left Side -->
<div class="card card-w-title">
	<h1>InputText</h1>
	<p:inplace editor="true">
		<p:ajax event="save" listener="#{autoCompleteView.completeText}" update="@this" />
		<f:facet name="output">
			<h:outputText value="sample">
			</h:outputText>
		</f:facet>

		<f:facet name="input">
			<p:inputText />
		</f:facet>
	</p:inplace>

	<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
		<h:panelGroup styleClass="md-inputfield">
			<p:inputText />
			<label>Name</label>
		</h:panelGroup>
I get the issue on chrome and FireFox

aragorn
Posts: 3762
Joined: 29 Jun 2013, 12:38

30 Apr 2019, 09:06

Thanks a lot for the sample code and video. I still couldn't replicate it. Please check your server logs.

My Test;

Code: Select all

...
           <div class="card card-w-title">
                    <h1>InputText</h1>
                    <h:form>
                        <p:inplace editor="true">
                            <p:ajax event="save" listener="#{autoCompleteView.test}" update="@this" />
                            <f:facet name="output">
                                <h:outputText value="sample">
                                </h:outputText>
                            </f:facet>

                            <f:facet name="input">
                                <p:inputText />
                            </f:facet>
                        </p:inplace>
                    </h:form>

                    <p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
                        <h:panelGroup styleClass="md-inputfield">
                            <p:inputText />
                            <label>Name</label>
                        </h:panelGroup>
                    </p:panelGrid>
                </div>
...

Code: Select all

//AutoCompleteView.java
public void test(AjaxBehaviorEvent e) {
        System.out.println("org.primefaces.barcelona.view.input.AutoCompleteView.test()");
}
Best Regards,

mafaul
Posts: 8
Joined: 12 Jan 2015, 07:24

30 Apr 2019, 12:42

I found the issue, my bad.

For the inplace buttons to disappear after clicking, you need to have update="@this" in the ajax tag. Also, the ajax call should work without issues and return 200.

Thank you so much for your assistance, it is much appreciated.

aragorn
Posts: 3762
Joined: 29 Jun 2013, 12:38

30 Apr 2019, 12:52

Glad to hear, thanks a lot for the update!

ibanFR
Posts: 1
Joined: 29 Mar 2017, 11:41

01 Nov 2019, 12:36

Hi all,

I'm facing the same issue, before upgrading to version 7 of primefaces there was no need to include update="@this" on the <p:ajax> tag when using a listener. That must be something that has been introduced in the latest release.

We will have to merge code to be compliant with this requirement.

Regards

Post Reply

Return to “Barcelona - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests