-
Notifications
You must be signed in to change notification settings - Fork 762
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
RowEditor: Add partialSubmit support #3562
Comments
I don't know what the reason for your original problem is, however if you want to avoid a full submit you might try one of the following:
( js call: remoteCommandFunctionName({name1:'value1', name2:'value2'});) |
Is there a ways to "exclude" in general sending/posting all datas from a Datatable ? This would solve the issue i think because i have only this options for a datatable: 1.) Datatable is showing the datas readonly : 2.) Datatable is enabled for Row-Editing: 3.) Datatable is enabled for Cell-Editing: So is it possible to never send datatable-datas |
Your "issues" are mostly like forum questions ;) |
The problem also occurs when i set to partialSubmit because in a simple Datatable with edit is set to on So after 33 Row's i got a server exception because of 34 Rows x 15 Columns x 2 Fields/Column (Input+Output) = 1020 Parameters. But in size we are talking about 600Bytes to transfer which makes a problem to send ? Really ? So why sending the whole datatable as form-parameter when i changed the datas via AJAX |
Now we have a real issue ;) |
If you set the partialSubmit on your add-commandLink, that should work fine. Just the edit itself could still use partialSubmit=false of course. |
It also crashes when i click on the add-commandlink
The whole datatable is then sended to the server, The view with the datas before clicking the add-button The parameter count sended to the server All datatable parameters are sent to the server Occurs in this error: |
I changed the current title of this issue because it currently occurs in CellEdit and RowEdit mode ... |
I have one question: Is there a needed from the primefaces side that all |
About the add-commandLink, please provide a example based on the showcase.... There is no need, we just send the whole form per default. Therefore there is a "partialSubmit" mode. |
And why sending the whole data-table datas per default ? |
I will try to fork the showcase and modify a datatable-example in which the error can be reproduced... |
The problem is actually this: And exactly this new functionally, to only send the current row for the rowEditor needs to be implemented. |
So also when i edit only 1 cell the complete data-table will be transfered ? |
I don't know, i always talked about the rowEditor. Just check it by yourself. |
I will fork the primefaces-showcase and make a separate entry in the datatable-section Then i will come back to this ticket and report/send you the link... |
I now got the exception also on the primefaces-showcase To reproduce you have to click the "Add a new row" button 3 times. A unexpected error occured! Message: Form too many keys So please try this example - I changed the Here is the fork from the current Primefaces-Showcase i am using: |
changed the title again. If CellEditor does also not work, we should add a new ticket. |
For your other issue, i created a new ticket: #3564 The button itself does not post the datatable but the addRow method does. |
It would be great if you could sponsor it or provide a PR. I don't have time to do this in my freetime. |
PR ? What's this ? How can i help to solve this bug ? |
OK, i now created a pull-request - can you check it ? |
I think that the general problem is that Sending the form-datas to urlencoded will always limit
So in general sending the datas via JSON, Text or a real XML will The bug is so located in the core.js which is sending I also found out on the jQuery's site the following The part's of the core.js are:
The main think is to use another type as So this could be the right way: I don't know what format is needed on the primefaces server side |
IMO thats not a generell problem, only a generell workaround ;) |
1.) I think sending the datas via JSON/XML/Text-Encoded is an improvement 2.) Paritial handling of the datatable: Why ?
|
This issue has nothing to do with all components or the JSF-Core. A server side solution is not possible because it crashes before you got the datas on a filter function... The exception occurs also in the Primefaces-Showcase |
for 1) and 2) partialSubmit was implemented ;) 3,4,5 is really component specific. |
I currently found a simple, but effective workoround to When the send function is called i filter out all fields with the parent class is from type Here is the currently changed part in the core.ajax.js include a debugging:
This currently fixes the point's 2.1), 2.2) and 2.5) - So only the points 2.3) and 2.4) are open |
I currently think for the point 2.3) and 2.4) only sending the |
Commited a prototype for it, you can activate it via: |
What's about the point's 2.1), 2.2) and 2.5) ? Can you also filter the datatable's ui-cell-editor-input's by default |
just don't render inputs in 2.1 and 2.2.... (or don't use a p:rowEditor.... ) |
How can i don't render the input's when its inside The whole datatable's input's are always send to the server So : Please do not send all table datas by default on form-submit |
I see that your current fix only fixes the point 2.3) Row-Editing Why you are closing this ticket even if the bug's are already exists ? |
Dude, i'm not a premium support here to anwer all your questions :D Did you ever checked the cell-editing if the problem happens there? |
As i already said, this ticket is about the RowEditor. And this problem is fixed with the commit. |
OK. I will create new ticket's for the other point's, |
close in favor of: #3571 |
2.1: Real readonly inputs are NOT submitted by JSF, so 2.1 is a non-issue. 2.2 is or should like Thomas stated be done via the existing partialSubmit options. The core ajax should not have knowledge of the dataTable internals. 2.5 is already 'fixed', see #3564. It might be an option to in the #3564 fix use the |
I am currently using Primefaces 6.2.2 Elite with Java 8
running on JBoss-EAP 7.1.0 application server.
The view i made has a lot of elements to fill out (our application parameters for a calculation),
so i split it into multiple pages using the Primefaces AccordionPanel.
I set the multiple option to false to show the user only one by one tabsheet.
When i use a tab with controls and a editable datatable in it
primefaces send the complete form on adding or general executing a ajax-request to process
datas on the server.
Because this are too much datas for the complete form i got a server error:
The number of parameters exceeded the maximum of 1000
So why sending the complete form datas via parameters when i only want to
execute the button's action ?
I also tried to use fragments or partial submit,
but there i can't see any differences to the submited datas....
The problem is to give you a sample out of our application i have to rebuild
our application - that's too much for reproducing...
So are there any workaround's for something like this ?
Is it possible to only send the current tabsheet-datas of the accordionpanel
when i set multiple to false instead of the complete form ?
Here are some screenshot's i can give you to show what i am meaning:
1.) The view in general with a lot of tab's inside a accordion panel:
Accordion (over)view
2.) The datas in one current tab:
Opened tab sheet in accordion
3.) The datas sent when i press the add/clear button:
Network-Analyse from posted datas
4.) Currently under 1000 parameters...
Network-Analyse other view with parameter count sent
5.) The source-code for the Add-Entry i got from the primefaces-forum:
I write processing only @this, so why the whole form is submitted when i press this button ?
It seems that there is a bug or not ?
6.) When i press now the add-button occurs in a server exception - Here the stacktrace:
java.lang.RuntimeException: io.undertow.util.ParameterLimitException: UT000047: The number of parameters exceeded the maximum of 1000 at io.undertow.server.handlers.form.FormData.add(FormData.java:78) at io.undertow.server.handlers.form.FormData.add(FormData.java:68) at io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.doParse(FormEncodedDataDefinition.java:173) at io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.parseBlocking(FormEncodedDataDefinition.java:252) at io.undertow.servlet.spec.HttpServletRequestImpl.parseFormData(HttpServletRequestImpl.java:777) at io.undertow.servlet.spec.HttpServletRequestImpl.getParameterNames(HttpServletRequestImpl.java:674) at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:80) at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:57) at java.util.Collections$UnmodifiableMap.get(Collections.java:1454) at org.omnifaces.util.FacesLocal.getRequestParameter(FacesLocal.java:777) at org.omnifaces.cdi.viewscope.ViewScopeManager.isUnloadRequest(ViewScopeManager.java:236) at org.omnifaces.context.OmniExternalContext.getFlash(OmniExternalContext.java:61) at javax.faces.context.ExternalContextWrapper.getFlash(ExternalContextWrapper.java:1034) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:213) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:98) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:133) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:201) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:670) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:181) at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:108) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at com.skf.filters.DoCacheFilter.doFilter(DoCacheFilter.java:98) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at com.skf.filters.AuthorizationFilter.FilterRequest(AuthorizationFilter.java:194) at com.skf.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:221) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: io.undertow.util.ParameterLimitException: UT000047: The number of parameters exceeded the maximum of 1000 ... 72 more
Please do not write that i have to increase the maximum on the parameter.
This does not solve the issue but it only comes later on a view with dynamic datas
and does not solve the problem...
The text was updated successfully, but these errors were encountered: