Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » AbstractPage(WithTable) ans SearchForms
AbstractPage(WithTable) ans SearchForms [message #1749558] Thu, 08 December 2016 06:48 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 187
Registered: November 2014
Senior Member

Hi there,

I'm playing around with "search while you type".

Therefore I created a SearchForm which I attached to a TablePage. But I don't want to use the OK or CANCEL buttons. Instead a search should be invoked when the user has typed more than 3 characters.

So far so good.

I can invoke the search, call my services and get the desired result.

But how can I access my TablePage from within the SearchForm an repopulate the table there? Is there some kind of accessor to get hold of the master table page?

Thanks in advance

Peter

Re: AbstractPage(WithTable) ans SearchForms [message #1749559 is a reply to message #1749558] Thu, 08 December 2016 06:59 Go to previous messageGo to next message
Matthias Otterbach is currently offline Matthias OtterbachFriend
Messages: 11
Registered: August 2015
Junior Member
I don't think, the search form itself has a built-in reference to the "parent page".

But if you just want to reload the table data, you might be able to use the same technique the search form uses after a button click. After creating the search form, the table page registers a listener, see org.eclipse.scout.rt.client.ui.desktop.outline.pages.AbstractPageWithTable.attachToSearchFormInternal(), and waits for org.eclipse.scout.rt.client.ui.form.FormEvent.TYPE_STORE_AFTER events. Therefore I guess you could fire a store event (e.g. by calling org.eclipse.scout.rt.client.ui.form.IForm.doOk() on the search form) and hopefully the table page will reload its data?
Re: AbstractPage(WithTable) ans SearchForms [message #1749567 is a reply to message #1749559] Thu, 08 December 2016 09:04 Go to previous message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 187
Registered: November 2014
Senior Member

Hi,

did a quick try with the FormEventListener.

It gets called, but unfortunately 10 times. And my table is only refreshed, when OK is pressed...

Any ideas why? Thanks a lot

Peter

[Updated on: Thu, 08 December 2016 10:06]

Report message to a moderator

Previous Topic:Scout, PostgreSQL and Docker
Next Topic:[neon] vs [mars] Difference in Keystroke Handling
Goto Forum:
  


Current Time: Fri Jun 23 10:27:27 GMT 2017

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

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