Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [oxygen] Search Form Behavior
[oxygen] Search Form Behavior [message #1753023] Wed, 01 February 2017 08:59 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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 #1753172 is a reply to message #1753023] Thu, 02 February 2017 12:38 Go to previous messageGo to next message
Kevin Kirn is currently offline Kevin KirnFriend
Messages: 19
Registered: September 2014
Junior Member
Hi Peter

Looks like your button inherits from AbstractOkButton.

Try to inherit from AbstractSearchButton instead, which should fix it.

Best regards

Kevin
Re: [neon] Search Form Behavior [message #1753253 is a reply to message #1753172] Fri, 03 February 2017 06:14 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi,

yes that's true. I used the Scout Wizard for generating the SearchForm.

Nevertheless changing to AbstractSearchButton didn't change the weird UI behavior.

Peter
Re: [neon] Search Form Behavior [message #1753460 is a reply to message #1753253] Mon, 06 February 2017 17:39 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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. Wink

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 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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 Go to previous message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi Beat,

your hints worked Smile 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
Previous Topic:[neon] How to pass per-request information from client to server?
Next Topic:Setting about the drop-down box
Goto Forum:
  


Current Time: Tue Apr 23 10:33:14 GMT 2024

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top