how to force view update when non using getter/setter?

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

how to force view update when non using getter/setter?

Postby peterblazejewicz » Wed Sep 19, 2007 4:22 pm

Hello,

Question is related to "Design" view in GWT editor window:

When subitem state is changed via getter/setter then component design view is refreshed,
e.g. I set "isBusy" property on subcomponent and view updates to reflect changes in desing of subcomponents (applied via code or css change)
But when non-property related state is changed (e.g. by using Event tab in property inspector) view does not update,
e.g. I change view when adding and removing click listener to subcomponent. Design view does not update on that change.
Only after such main component is attached to e.g. main view it correctly shows that state of subcomponents is changed,

someone knows how to solve that for click listeners assignment?

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: how to force view update when non using getter/setter?

Postby Eric Clayberg » Wed Sep 19, 2007 6:32 pm

I'm not sure why adding or removing an event listener would have any effect on the design view. Event handlers only take effect at runtime, so they would typically not have any effect at design time.

A code example showing what you are trying to do would be useful.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby peterblazejewicz » Thu Sep 20, 2007 2:50 pm

hi Eric,

ok, here is how it looks like:
some items can could have different layout implemented depending if they have some action assigned to them or not (either listeners or by adding Command reference),
Good example is iPhone list interface:
Image
There is consistent design for such items. 45px height box with arrow icon on the right.
That icon only appears on those items in list which have command/action assigned (usually it moves screen to another one with other list),
So i'm implementing the same. As you say there is no problem at runtime because either using "addStyleDependantName" or other way of changin UI simply works. As I posted it also works if I put container of such items into another design view (e.g. into final target class that will be working as logical screen unit) - in that view internal state of items in nexted objects is already updated on design screen.
I know that should be possible somehow because you're already applying such information when item has event assigned in current design view: it design properties Editor "event" circle, green-ish icon is put over item icon in widget tree :D

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Postby Eric Clayberg » Thu Sep 20, 2007 3:20 pm

I think we need to see the source for this component in order to understand why its look would change at design time due to adding an event handler. That is very unusual behavior and not something we have ever seen in any other widget for GWT, Swing or SWT. Event handlers only trigger at runtime, so they have no opportunity to affect a widget at design time. Typically, you would use some other attribute to affect the actual look of the widget.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests