[oxygen] Search Form Behavior [message #1753023] |
Wed, 01 February 2017 08:59 |
|
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 17:35] Report message to a moderator
|
|
|
|
|
Re: [neon] Search Form Behavior [message #1753460 is a reply to message #1753253] |
Mon, 06 February 2017 17:39 |
|
Hi,
I migrated to the Scout Oxygen Version (6.1.0M5) but unfortunately the search form closing behavior didn't change...
As long as I just click on the Search icon at the bottom, the search area opens und closes as expected. But when selecting the Search Button or the Cancel Button from the Search Form it seems the whole UI state gets messed up.
Any idea how the search area can be closed properly when clicking on of these buttons?
Thanks
Peter
[Updated on: Mon, 06 February 2017 17:42] Report message to a moderator
|
|
|
Re: [neon] Search Form Behavior [message #1753464 is a reply to message #1753460] |
Mon, 06 February 2017 18:31 |
|
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
|
|
|
Re: [neon] Search Form Behavior [message #1753512 is a reply to message #1753464] |
Tue, 07 February 2017 11:11 |
|
Hi Beat,
Beat Schwarzentrub wrote on Mon, 06 February 2017 18:31
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).
Closing the drawer would work perfectly for me...
I'll give your hints a try.
Thanks
Peter
|
|
|
Re: [neon] Search Form Behavior [message #1753647 is a reply to message #1753512] |
Wed, 08 February 2017 12:59 |
|
Hi Beat,
your hints worked It put the snippet into the execLoadData() and its working.
I was wondering how you guys at BSI are handling big recordset...
To what number to you limit your search results? 100? 200?
How long may a search last? More than 2 seconds? What are your thresholds here?
Thanks Peter
|
|
|
Powered by
FUDForum. Page generated in 0.03111 seconds