Ajax and decomposition views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
vam
Reply | Threaded
Open this post in threaded view
|

Ajax and decomposition views

vam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and decomposition views

architbaweja
You could try the #call/#answer mechanism.

html listItem
    onClick: [ self call: aDetailsViewComponent ].

On Wed, Jul 30, 2008 at 3:44 PM, VAM <[hidden email]> wrote:

>
> My question is trivial, but I can't find same exactly theme.
>
> I have ListViewComponent for rendering any collection. User may select item
> and another component DetailsView must shows detail information about
> selected item.
>
> ListView don't know about DetailsView, because I can't write
> html listItem
>    onClick: (html updater id: 'DetailsView'; callback: [:renderer | self
> renderDetailsOn: renderer]).
>
> How right make decomposition in my case?
>
> --
> View this message in context: http://www.nabble.com/Ajax-and-decomposition-views-tp18730184p18730184.html
> Sent from the Squeak - Seaside mailing list archive at Nabble.com.
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Ajax and decomposition views

Sebastian Sastre-2
Archit, #onClick: needs aScript object as argument (an instance of SUScript)

[hidden email], what do you mean by decomposition? You can try reprhasing your
question

Sebastian

 
 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Archit Baweja
> Enviado el: Jueves, 31 de Julio de 2008 13:05
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Ajax and decomposition views
>
> You could try the #call/#answer mechanism.
>
> html listItem
>     onClick: [ self call: aDetailsViewComponent ].
>
> On Wed, Jul 30, 2008 at 3:44 PM, VAM <[hidden email]> wrote:
> >
> > My question is trivial, but I can't find same exactly theme.
> >
> > I have ListViewComponent for rendering any collection. User
> may select item
> > and another component DetailsView must shows detail
> information about
> > selected item.
> >
> > ListView don't know about DetailsView, because I can't write
> > html listItem
> >    onClick: (html updater id: 'DetailsView'; callback:
> [:renderer | self
> > renderDetailsOn: renderer]).
> >
> > How right make decomposition in my case?
> >
> > --
> > View this message in context:
> http://www.nabble.com/Ajax-and-decomposition-views-tp18730184p
18730184.html

> > Sent from the Squeak - Seaside mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
vam
Reply | Threaded
Open this post in threaded view
|

RE: Ajax and decomposition views

vam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and decomposition views

Stefan Schmiedl
On Fri, 1 Aug 2008 01:25:16 -0700 (PDT)
VAM <[hidden email]> wrote:

> I may write next code in onClick handler
>
> ListView>>renderContent: html
> super renderContentOn: html.
> (html unorderedList)
> id: self listId;
> with: [self renderItemsOn: html]
>
> ListView>>renderItemsOn: html
> selectionInList list do:
> [:each |
> | listItem |
> listItem := html listItem.
> each = selectionInList selection ifTrue: [listItem class: 'selected'].
> listItem
> onClick:
> ((html updater)
> id: 'list';
> callback:
> [:renderer |
> selectionInList selection: each.
> self renderItemsOn: renderer.
> !!! Here we need render detailsView. How? ListView don't know
> about its id and rendering methods!!!]);

Try announcing the selection change right here passing along all the
information you need to access the detailsView.

> onMouseOver: (html element toggleClassName: 'bounded');
> onMouseOut: (html element toggleClassName: 'bounded');
> with: each]
>

If everything else fails, you can always add an instance variable to
your ListView component, where you store a code block for taking
whichever action is appropriate.

HTH,
s.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
vam
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and decomposition views

vam
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and decomposition views

architbaweja
If I understand correctly this is similar to the mechanism portrayed
in the very excellent Postdam Seaside tutorial (ToDo application). You
can check it out at
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial/

-Archit

On Fri, Aug 1, 2008 at 2:41 PM, VAM <[hidden email]> wrote:

>
>
> Stefan Schmiedl wrote:
>>
>>>Try announcing the selection change right here passing along all the
>>>information you need to access the detailsView.
>>
>
> Hm,  how correctly use announce here? Sorry for my slowness.
>
>
>
>
> Stefan Schmiedl wrote:
>>
>> If everything else fails, you can always add an instance variable to
>> your ListView component, where you store a code block for taking
>> whichever action is appropriate.
>>
>
> Yes, you are right. I can configure ListView with a code block or identifier
> of DetailsView and rendering selector name, also on my test it isn't good.
>
> --
> View this message in context: http://www.nabble.com/Ajax-and-decomposition-views-tp18730184p18770759.html
> Sent from the Squeak - Seaside mailing list archive at Nabble.com.
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
vam
Reply | Threaded
Open this post in threaded view
|

Re: Ajax and decomposition views

vam
CONTENTS DELETED
The author has deleted this message.