Thanks again for the hints Martin. The issue was caused by a not well formed html returned by the ajax response and browser cache did not help too much to check the solution.

Best regards,
Andrea

On 09/01/24 09:04, Martin Grigorov wrote:
Hi Andrea,

Please use Wicket-Bootstrap's issues or StackOverflow for questions about
Wicket-Bootstrap. Or users@wicket.apache.org.
dev@wicket.a.o is about the development of Apache Wicket itself.

On Mon, Jan 8, 2024 at 6:57 PM Andrea Patricelli <
andreapatrice...@apache.org> wrote:

Hi all,

I've just upgraded a project to wicket-bootstrap 7.0.2-SNAPSHOT and
wicket 10.0.0-M2.

I'm getting as clear as cryptic error with a multivalued panel when
clicking the "+" button to add a new text field panel.

Basically the multivalued panel goal is to manage multivalued attributes
of an object, especially a list of strings, nothing too much complex.

The error is:

POST

http://localhost:9090/syncope-console/wicket/bookmarkable/org.apache.syncope.client.console.pages.Realms?3-1.0-body-content-body-container-content-tabbedPanel-panel-searchResult-outerObjectsRepeater-0-outer-form-content-form-view-plainSchemas-tabs-0-body-content-schemas-8-panel-multiValueContainer-innerForm-content-view-0-panelPlus-add&selectedIndex=1
400 (Bad Request)
Wicket.Ajax.Call.failure: Error while parsing response: Bad Request

The error occurs only when I'm in a boostrap modal window by
wicket-bootstrap-core. The very same panel outside the modal is working
fine.

The multivalued panel class structure is quite complex, but the button
that fires such AJAX behavior is here [1].

Moreover I've also reproduced the same structure (simplified) with the
wicket sample archetype, but no error occurs and I'm not able to
reproduce the issue.

I'd like to ask not a solution, but at least the most effective way to
debug and to find some more hints about the error (logs, whatever) and
why the request is returning 400 without any apparent wrong input.

I'm working in dev mode and using the chrome dev console, but did not
find any clue to solve the issue.

I'd compare the request url and parameters when using the modal and without
it. Is there any noticeable difference ?
The next step is to set a breakpoint at HttpServletResponse#sendError() and
see who calls it and the reason why it is being called.



Thanks and regards,
Andrea

[1]

https://github.com/apache/syncope/blob/master/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AbstractMultiPanel.java#L94-L125

--
Andrea Patricelli

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope


--
Andrea Patricelli

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to