[oxygen] Search Form Behavior [message #1753023] |
Wed, 01 February 2017 03:59  |
Eclipse User |
|
|
|
Hello there,
I'm trying to implement a Search Form.
But it seems to have some kind of weird behavior. When pressing the OK button the main box disappears but the parent container it self remains.
When clicking the Search Icon on the bottom the container is closed. Clicking once again a get an error.
Please see attached video. I thinks it's easier to understand then.
Is there a way to fix this?
This is the exception I see in the console:
2017-02-01 09:52:49.403 ERROR 11674 --- [nio-8080-exec-3] o.e.s.r.u.h.j.JsonMessageRequestHandler : JavaScript exception occured
Uncaught Error: Widget is destroyed: Widget[rendered=false] at http://localhost:8080/scout/res/application-all.js:2940
Error: Widget is destroyed: Widget[rendered=false]
at scout.Form.scout.Widget.render (http://localhost:8080/scout/res/application-all.js:2940:33)
at scout.FormTableControl._renderContent (http://localhost:8080/scout/res/application-all.js:37893:43)
at scout.FormTableControl.scout.TableControl.renderContent (http://localhost:8080/scout/res/application-all.js:37370:37)
at scout.FormTableControl.scout.TableControl._renderSelected (http://localhost:8080/scout/res/application-all.js:37387:37)
at scout.FormTableControl.scout.TableControl.setSelected (http://localhost:8080/scout/res/application-all.js:37440:37)
at scout.FormTableControl.scout.TableControl.toggle (http://localhost:8080/scout/res/application-all.js:37420:37)
at scout.FormTableControl.scout.TableControl._onMouseDown (http://localhost:8080/scout/res/application-all.js:37451:35)
at HTMLDivElement.dispatch (http://localhost:8080/scout/res/jquery-all.js:4436:9)
at HTMLDivElement.elemData.handle (http://localhost:8080/scout/res/jquery-all.js:4122:28)
[Updated on: Mon, 06 February 2017 12:35] by Moderator
|
|
|
|
|
|
Re: [neon] Search Form Behavior [message #1753464 is a reply to message #1753460] |
Mon, 06 February 2017 13:31   |
Eclipse User |
|
|
|
Hi Peter
The default search button does not automatically close the search form, therefore the error does not happen. See this example in the "contacts" demo application:
https://scout.bsi-software.com/contacts/ -> Persons
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/releases/6.1.x/code/contacts/org.eclipse.scout.contacts.client/src/main/java/org/eclipse/scout/contacts/client/person/PersonSearchForm.java
It's funny, just a few days ago I noticed the UI error your are getting by myself and I had a look at it. It should be fixed soon. 
However, even with the bug removed, I would not recommend closing the search form. If you close the form, you loose all state, so when the user opens the search table control again, his entered text will be gone. Better implement the usual pattern with an AbstractSearchButton and an AbstractResetButton (see "contacts" example).
To close the drawer, you have to "unselect" the table control. Maybe something like the following suits your purpose?
SearchFormTableControl control = getTable().getTableControl(SearchFormTableControl.class);
if (control != null) {
control.setSelected(false);
}
You could include that in execLoadData() of your table page (but that will hide the drawer if you click the "reload data" link as well) or you can add a listener in execInitSearchForm().
Regards,
Beat
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24036 seconds