Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change: process is @this by default, used to be @all #371

Closed
stephanrauh opened this issue May 8, 2016 · 7 comments
Closed

Breaking change: process is @this by default, used to be @all #371

stephanrauh opened this issue May 8, 2016 · 7 comments

Comments

@stephanrauh
Copy link
Collaborator

I noticed this with the b:image attribute, but it may be a broader problem. When I uploaded the chess demo to AngularFaces.net, the default value of the process attribute was @ all. Now it seems to be @this. It seems like something has changed this spring.

@stephanrauh
Copy link
Collaborator Author

This is a deliberate change I've forgotten to document. The idea was to align the default values of the process attribute with PrimeFaces. b:commandButton and b:commandLink default to @form, while every other component defaults to @this. Unfortunately, I´m not sure this is the default behavior of PrimeFaces - but I don't think it's a good idea to change that again.

http://stackoverflow.com/questions/25339056/understanding-process-and-update-attributes-of-primefaces

@tandraschko
Copy link

tandraschko commented May 12, 2016

In PrimeFaces the default on components is @ALL, the default on p:ajax is @this.

@stephanrauh
Copy link
Collaborator Author

@tandraschko @TheCoder4eu @asterd @zhedar Should we align the behavior of BootsFaces with PrimeFaces? I'd like to do that, but that would mean to introduce two breaking changes in a row. On the other hand, if BF 0.8.6 follows 0.8.5 only one or two weeks later, we might get away with it without annoying too many people. What do you think?

@zhedar
Copy link
Collaborator

zhedar commented May 12, 2016

So if we're aligning with PrimeFaces, we would actually have the some behaviour as pre 0.8.5? I guess most users with bigger applications haven't upgraded that fast, so that probably won't lead to big problems. 👍 Not to do things all different may be the best way, if we want the frameworks to coexist.

The JSF spec only mentions f:ajax's execute, which defaults to @this, but this is a bit of a different concept, so there's nothing we could follow directly. 👎

I'm not sure about this though. Is there a downside to process @all components on default? Does it impact performance or bandwidth (enough to take that into consideration)? Because I think, that setting the process value to a small scope, while PrimeFaces (as widely used component framework, not to say de facto standard again) has a wider one, will probably lead to some confusing hours of debugging for some developers.

@stephanrauh
Copy link
Collaborator Author

Default to process="@ALL" has little to none effect on performance. Basically, what's sent to the server is the user's input, which rarely exceeds a single kilobyte per request. The only drawback is that it violates the HTML specification, which insists on sending only one form at a time to the server. But that's a silly restriction we can safely ignore.

@tandraschko
Copy link

process != form parameters!
Always every form input will be posted to the server, it doesn't matter what you set on process.

In PF there is a special option called "partialSubmit=true", which only sends the inputs to the server which will be processed.

stephanrauh added a commit that referenced this issue May 21, 2016
counterpart, and fixed a typo concerning the BsFEvent that prevented
events from being processed correctly
@stephanrauh stephanrauh modified the milestones: v0.8.6, v0.9.0 May 21, 2016
@stephanrauh
Copy link
Collaborator Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants