Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » pack() in JavaScript - how?
pack() in JavaScript - how? [message #40135] Mon, 23 July 2007 12:05 Go to next message
Eclipse UserFriend
Originally posted by: mehow.infogenia.pl

Hello,

Sorry if this is more like a Qooxdoo question rather than a RAP question.

I'm almost done with my first custom widget (see "Custom widgets" thread
for a screenshot), the only missing part is the functionality to
collapse/expand the widget by changing its height when the toggle button
is clicked.

In SWT I would realize this behaviour by changing computeTrim()
implementation based on the current state (expanded/collapsed) and
calling pack() each time the state is changed*.

This time however I'd like the event to be processed completely on the
client side as there's no need to send it to the server. Do you think
it's possible?

What I'm afraid of is that the layouting is done on the server side and
hence I won't be able to restore the state of the children widgets when
the widget is expanded without calling server-side.

* in fact I would call layout()/pack() on the parent widget, so that it
can use the space freed by the collapsed widget. But it seems to make
things even harder with RAP/Qooxdoo.

Any suggestions would be appreciated,

Michal
Re: pack() in JavaScript - how? [message #40172 is a reply to message #40135] Mon, 23 July 2007 20:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Michał,

I am not sure if I entirely understood your question. The "custom
widget" screenshot looks much like the ExpandableComposite/Section that
comes with Eclipse Forms.
If that is what you would like to build, the only option is to do the
layouting on the server side. What you are afraid of would happen, the
client-side does not know how to layout the siblings of your widget.
You could have a look at the Forms widgets and see how they handle
expanding and collapsing. In fact, these parts were copied as-is from
the original implementation.

Cheers,
Rüdiger

Michał Tkacz wrote:
> Hello,
>
> Sorry if this is more like a Qooxdoo question rather than a RAP question.
>
> I'm almost done with my first custom widget (see "Custom widgets" thread
> for a screenshot), the only missing part is the functionality to
> collapse/expand the widget by changing its height when the toggle button
> is clicked.
>
> In SWT I would realize this behaviour by changing computeTrim()
> implementation based on the current state (expanded/collapsed) and
> calling pack() each time the state is changed*.
>
> This time however I'd like the event to be processed completely on the
> client side as there's no need to send it to the server. Do you think
> it's possible?
>
> What I'm afraid of is that the layouting is done on the server side and
> hence I won't be able to restore the state of the children widgets when
> the widget is expanded without calling server-side.
>
> * in fact I would call layout()/pack() on the parent widget, so that it
> can use the space freed by the collapsed widget. But it seems to make
> things even harder with RAP/Qooxdoo.
>
> Any suggestions would be appreciated,
>
> Michal
Re: pack() in JavaScript - how? [message #40301 is a reply to message #40172] Tue, 24 July 2007 08:19 Go to previous message
Eclipse UserFriend
Originally posted by: mehow.infogenia.pl

Rüdiger Herrmann pisze:
> Hi Michał,
>
> I am not sure if I entirely understood your question. The "custom
> widget" screenshot looks much like the ExpandableComposite/Section that
> comes with Eclipse Forms.

Yes, the principle is the same.

> If that is what you would like to build, the only option is to do the
> layouting on the server side. What you are afraid of would happen, the
> client-side does not know how to layout the siblings of your widget.
> You could have a look at the Forms widgets and see how they handle
> expanding and collapsing. In fact, these parts were copied as-is from
> the original implementation.

Ok, thanks for pointing me to these classes, I forgot to check them.

Michał

> Cheers,
> Rüdiger
>
> Michał Tkacz wrote:
>> Hello,
>>
>> Sorry if this is more like a Qooxdoo question rather than a RAP question.
>>
>> I'm almost done with my first custom widget (see "Custom widgets"
>> thread for a screenshot), the only missing part is the functionality
>> to collapse/expand the widget by changing its height when the toggle
>> button is clicked.
>>
>> In SWT I would realize this behaviour by changing computeTrim()
>> implementation based on the current state (expanded/collapsed) and
>> calling pack() each time the state is changed*.
>>
>> This time however I'd like the event to be processed completely on the
>> client side as there's no need to send it to the server. Do you think
>> it's possible?
>>
>> What I'm afraid of is that the layouting is done on the server side
>> and hence I won't be able to restore the state of the children widgets
>> when the widget is expanded without calling server-side.
>>
>> * in fact I would call layout()/pack() on the parent widget, so that
>> it can use the space freed by the collapsed widget. But it seems to
>> make things even harder with RAP/Qooxdoo.
>>
>> Any suggestions would be appreciated,
>>
>> Michal
Previous Topic:M5 only runs on JDK1.5+ ?
Next Topic:SessionSingletonBase encapsulated
Goto Forum:
  


Current Time: Fri Apr 19 22:26:17 GMT 2024

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

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

Back to the top