Autocomplete partialSubmit false Problem

UI Components for JSF
chrisu86
Posts: 17
Joined: 24 Jul 2014, 10:14

28 Jul 2014, 11:38

These are the post params when process="@this fieldOne"
In fieldOne i typed 'test' and in the autocomplete field i typed an 'a'
Post Data:
javax.faces.partial.ajax=true&
javax.faces.source=test_form%3AfieldTwo&
javax.faces.partial.execute=test_form%3AfieldTwo+test_form%3AfieldOne&
javax.faces.partial.render=test_form%3AfieldTwo&
javax.faces.behavior.event=query&
javax.faces.partial.event=query&
test_form%3AfieldTwo_query=a&
test_form=test_form&
test_form%3AfieldOne=test&
test_form%3AfieldTwo_input=a&
javax.faces.ViewState=3133036732269360003%3A-6419945753035802578.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Jul 2014, 11:42

ok, so IMO PrimeFaces makes everything correct.
Try to debug in InputTextRenderer#decode. JSF should call this method when the component id is available in the "javax.faces.partial.execute" post param.

Maybe you can also try to switch the process -> "fieldOne @this"
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

chrisu86
Posts: 17
Joined: 24 Jul 2014, 10:14

28 Jul 2014, 12:11

Changing the order to "fieldOne @this" doesnt work.
I debugged the InputTextRenderer's decode method.

In the line " inputText.setSubmittedValue(submittedValue);" the value of fieldOne ('test') is set.

Code: Select all

@Override
	public void decode(FacesContext context, UIComponent component) {
		InputText inputText = (InputText) component;

        if(inputText.isDisabled() || inputText.isReadonly()) {
            return;
        }

        decodeBehaviors(context, inputText);

		String clientId = inputText.getClientId(context);
		String submittedValue = (String) context.getExternalContext().getRequestParameterMap().get(clientId);

        if(submittedValue != null) {
            inputText.setSubmittedValue(submittedValue);
        }
	}
This happens before the autocomplete method is called.
Thats strange, what am i doing wrong?

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Jul 2014, 13:18

Could you try the following:

- Copy AutoComplete.java in your web project (via classloader hierarchie, the class in your web project instead the primefaces.jar will be used)
- Comment "facesContext.renderResponse();" in #broadcast

Don't know why we have it there but that could be the reason.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Jul 2014, 13:38

Please also try to upgrade mojarra, you use an really old version.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

chrisu86
Posts: 17
Joined: 24 Jul 2014, 10:14

28 Jul 2014, 13:50

Now the setters are called, but only then, when the autocomplete method is finished.
The sequence should be the other way around...

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Jul 2014, 13:58

Yep, i think the way we evaluate the suggestions should be changed.
Please create an issue, i will discuss it cagatay.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

chrisu86
Posts: 17
Joined: 24 Jul 2014, 10:14

28 Jul 2014, 14:22

Ok, i created an issue:

https://code.google.com/p/primefaces/is ... il?id=7236

Hope its ok, my first time... ;)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests