You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Leonardo Quijano Vincenzi <le...@dtqsoftware.com> on 2005/11/22 22:37:22 UTC

Re: Serving a Component as a Page

This is a slightly different approach than using the "direct" service in 
Tacos AjaxDirectLink. That direct update has a warning over there that 
...well... doesn't let you use unless you know Tacos internals. So, it 
may be better for the developer to use his own components (that he 
already knows how to handle dependencies) and have the component answer 
the AJAX request.

In short... +1 for this.. .but where do we get started?

-- 
Ing. Leonardo Quijano Vincenzi
Director Técnico
DTQ Software


Cosmin Bucur wrote:
> I know what I want sounds a bit wierd , but it would make sense using 
> the AjaxDirectLink frfom tacos , when having a huge page with many 
> components , to be able to refresh on a per component basis , reducing 
> trafic and proccessing
>
> Cosmin



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry Components versus WebObjects Components

Posted by Jesse Kuhnert <jk...@gmail.com>.
I was just talking to someone earlier today about this. He had
mentioned doing some webwork development recently as well as using
tapestry 1+2 a long time ago...Recent interactions with my employer
have made him become familiar with tapestry 4 so I'm going to be evil
and blind copy him in this response to see if he'll give any
thoughts..

jesse
On 11/22/05, Dov Rosenberg <do...@conviveon.com> wrote:
> Has anyone put together a comparison on how WO components and tapestry
> components are similar or not?
>
> My primary concerns are the following:
>
> 1. Do Tapestry components provide the "server side" event model like a WO
> Component?
>
> 2. Can Tapestry components be built from other Tapestry components? Is there
> a limit to the number of layers?
>
> 3. Is there a similar Request-Response loop paradigm?
>
>
> I am pretty sure the answers to these questions is Yes. Any notes on the
> conversion would be appreciated. Thanks in advance
>
>
> --
> Dov Rosenberg
> Conviveon/Inquira
> Knowledge Management Experts
> http://www.conviveon.com
> http://www.inquira.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Hmmm..On second thought I think the same problem still exists.

It's just looping. Any component contained by something that loops,
where the id of the component in question isn't even available unless
you iterate over the loop is the basic problem.

Howard was mentioning some ideas on how to make this possible, but if
you guys come up with something as well I'd definitely be interested
in knowing what it was :) If things do go well it's one of the first
things I wanted to address, performance being fairly critical to all
of us I think.

The other alternative is that it is pretty easy to create an engine
service, and then use the generic ServiceLink component to call the
service. You could then hand off something to your component, assuming
you aren't trying to make this super generic. This is more or less
what XTile is doing, I think.

jesse
On 11/22/05, Jesse Kuhnert <jk...@gmail.com> wrote:
> XTile does do this right now I think, under tapestry contrib. ?
>
> On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > This is a slightly different approach than using the "direct" service in
> > Tacos AjaxDirectLink. That direct update has a warning over there that
> > ...well... doesn't let you use unless you know Tacos internals. So, it
> > may be better for the developer to use his own components (that he
> > already knows how to handle dependencies) and have the component answer
> > the AJAX request.
> >
> > In short... +1 for this.. .but where do we get started?
> >
> > --
> > Ing. Leonardo Quijano Vincenzi
> > Director Técnico
> > DTQ Software
> >
> >
> > Cosmin Bucur wrote:
> > > I know what I want sounds a bit wierd , but it would make sense using
> > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > components , to be able to refresh on a per component basis , reducing
> > > trafic and proccessing
> > >
> > > Cosmin
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry Components versus WebObjects Components

Posted by Christian Mittendorf <ch...@freenet.de>.
Am 23.11.2005 um 00:08 schrieb Dov Rosenberg:

> Has anyone put together a comparison on how WO components and tapestry
> components are similar or not?

I don't have a point by point comparison, but I'll try to give my 2  
cent ;-)


> 1. Do Tapestry components provide the "server side" event model  
> like a WO
> Component?

If I get you right, I think I can say "Yes". Tapestry is event driven  
as WO is.


> 2. Can Tapestry components be built from other Tapestry components?  
> Is there
> a limit to the number of layers?

Yes, you can combine components to new components. I dont't know know if
there is any limitation to the number of layers, but I assume that  
there is
none. However, it'll get confusing from a certain depths of layers ;-)


> 3. Is there a similar Request-Response loop paradigm?

Again, a "Yes". From the faq:

http://jakarta.apache.org/tapestry/faq.html

Events will trigger in the following order:
	• 	initialize()
	• 	pageBeginRender() ("rewind")
	• 	rewind of the form / setting of properties
	• 	Deferred listeners (for Submit components)
	• 	Form's listener
	• 	pageEndRender() ("rewind")
	• 	pageBeginRender() (normal)
	• 	pageEndRender() (normal)

After all, Tapestry is very much like WebObjects and if you have any  
experience
with WO, your first steps with Tapestry will be quite easy. Except  
that there is
no WOBuilder, but everything else is in most cases better ;-)

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Tapestry Components versus WebObjects Components

Posted by Dov Rosenberg <do...@conviveon.com>.
Has anyone put together a comparison on how WO components and tapestry
components are similar or not?

My primary concerns are the following:

1. Do Tapestry components provide the "server side" event model like a WO
Component?

2. Can Tapestry components be built from other Tapestry components? Is there
a limit to the number of layers?

3. Is there a similar Request-Response loop paradigm?


I am pretty sure the answers to these questions is Yes. Any notes on the
conversion would be appreciated. Thanks in advance


-- 
Dov Rosenberg
Conviveon/Inquira
Knowledge Management Experts
http://www.conviveon.com
http://www.inquira.com




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ohhhh...I think I understand you now....

Are you saying that you want to define a component, and have it
rendered in an ajax response, but not actually have it embedded on the
page? This is ~sort of~ doable, but the client-side stuff is going to
have problems unless you also define a unique html element id to
replace the contents with...Which then makes you wonder why your
component isn't just used in the page instead.

The Autocompleter does what you describe, there are special rendering
methods that never get called during a normal request cycle but only
in response to doing an autocomplete function.

The need for doing this seems arbitrary though because the
Autocompleter doesn't hide the same looping problem.

Have you tried direct=true on your AjaxDirectLink yet?

Though I'm having trouble seeing the scenerio where it makes sense, it
probably ~is~ possible to grab a component, or invoke a hivemind
listener method to do something different....I probably just need more
details...
On 11/22/05, Jesse Kuhnert <jk...@gmail.com> wrote:
> Maybe I'm not understanding your use-case. Tapestry/Tacos isn't
> necessarily forcing you to call a listener method on a page per
> se....You could just as easily call a listener method on a component
> instead. There should really be no scenerio where you need to do what
> you are describing.
>
> The id stuff does need to be made clearer I know, and it will be, but
> for now, the id can be something you've specified as an informal
> parameter on your component, ie <span jwcid="@Any" id="myid"/>, or it
> can be the actual components ID <span jwcid="mycomponent@Whatever" />
> ... The part that needs clearing up is knowing that
> "mycomponent@Whatever"'s ID will change depending on how the component
> is being used/embedded. ...Ie it may very well have a generated id of
> mycomponent_0 or something else similar.
>
> If you can describe a more detailed example of what you are wanting to
> do I might be able to be more helpful.
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I've been bouncing from XTile to Tacos for a while ...
> >
> > i like tacos , xtile seemed to need more js written for it
> >
> > i don't know much about tacos internals , but it sounds logic to me that if
> > the direct link hits a listener method , and that listener method dedcides
> > to activate another page in the cycle , then should the incoming page
> > contain a html element matching id with the curently displayed page ,
> > AjaxDirectLink would replace the elements .
> >
> > Should it not work like this ? If it does , the only question here is how to
> > make tapestry serve a component instead of a page , as a page , without
> > having to write special duplicated code for it . . .
> >
> > Cosmin
> > ----- Original Message -----
> > From: "Jesse Kuhnert" <jk...@gmail.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Tuesday, November 22, 2005 4:40 PM
> > Subject: Re: Serving a Component as a Page
> >
> >
> > XTile does do this right now I think, under tapestry contrib. ?
> >
> > On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > > This is a slightly different approach than using the "direct" service in
> > > Tacos AjaxDirectLink. That direct update has a warning over there that
> > > ...well... doesn't let you use unless you know Tacos internals. So, it
> > > may be better for the developer to use his own components (that he
> > > already knows how to handle dependencies) and have the component answer
> > > the AJAX request.
> > >
> > > In short... +1 for this.. .but where do we get started?
> > >
> > > --
> > > Ing. Leonardo Quijano Vincenzi
> > > Director Técnico
> > > DTQ Software
> > >
> > >
> > > Cosmin Bucur wrote:
> > > > I know what I want sounds a bit wierd , but it would make sense using
> > > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > > components , to be able to refresh on a per component basis , reducing
> > > > trafic and proccessing
> > > >
> > > > Cosmin
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ahh yes, this is the bug/err whatever you want to call it that Felix
found a while back. The form (ajax or normal) uses the buttons
name/value to determine which listener to select (in the case that you
specified the listener on the submit button, which you must have).

I can't be certain, but I'm pretty sure I added an AjaxFormSubmit?
Maybe it was only AjaxLinkSubmit. In either case adding in the
AjaxFormSubmit should be doable tonight.
On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> Cool...
>
> (OT)
> Right now I think listeners are not working in AjaxForm (speaking of
> priorities, hehe). Though I haven't tested exactly where yet... just in
> case you have a button (a @Submit inside of an @tacos:AjaxForm)
> somewhere you want to click. If not, then I'll check them out later and
> confirm the possible bug.
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> TQ Software
>
>
> Jesse Kuhnert wrote:
> > Sounds like reasonable desires to me. So you think enabling this on
> > PartialFor is ok as long as it's clearly documented that it will only
> > work with PartialFor and no other kind of loop?
> >
> > I agree with the just working part. Anything in documentation saying
> > it will work under this condition only if blah blah should probably be
> > a red flag for anyone. :) This really will be addressed I promise.
> >
> > Thankfully I think we are just about there. Not too many more days
> > until monday :) In the interim though I will add it to tacos to
> > generate ideas and get a better feel for it.
> >
> > Help is always welcome :) I wish the forrest xdocs were wiki-isable.
> > Does it sound silly to think that they should just be moved to the
> > wiki instead? The major problem that presents is that the wiki isn't
> > an obvious place to go so it becomes another problem. Let me know I
> > guess. I'm not sure how much to say/offer, but I feel very
> > comforatable doing things with you with code/otherwise so changes can
> > be made..
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Cool...

(OT)
Right now I think listeners are not working in AjaxForm (speaking of 
priorities, hehe). Though I haven't tested exactly where yet... just in 
case you have a button (a @Submit inside of an @tacos:AjaxForm) 
somewhere you want to click. If not, then I'll check them out later and 
confirm the possible bug.

-- 
Ing. Leonardo Quijano Vincenzi
Director Técnico
TQ Software


Jesse Kuhnert wrote:
> Sounds like reasonable desires to me. So you think enabling this on
> PartialFor is ok as long as it's clearly documented that it will only
> work with PartialFor and no other kind of loop?
>
> I agree with the just working part. Anything in documentation saying
> it will work under this condition only if blah blah should probably be
> a red flag for anyone. :) This really will be addressed I promise.
>
> Thankfully I think we are just about there. Not too many more days
> until monday :) In the interim though I will add it to tacos to
> generate ideas and get a better feel for it.
>
> Help is always welcome :) I wish the forrest xdocs were wiki-isable.
> Does it sound silly to think that they should just be moved to the
> wiki instead? The major problem that presents is that the wiki isn't
> an obvious place to go so it becomes another problem. Let me know I
> guess. I'm not sure how much to say/offer, but I feel very
> comforatable doing things with you with code/otherwise so changes can
> be made..
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Sounds like reasonable desires to me. So you think enabling this on
PartialFor is ok as long as it's clearly documented that it will only
work with PartialFor and no other kind of loop?

I agree with the just working part. Anything in documentation saying
it will work under this condition only if blah blah should probably be
a red flag for anyone. :) This really will be addressed I promise.

Thankfully I think we are just about there. Not too many more days
until monday :) In the interim though I will add it to tacos to
generate ideas and get a better feel for it.

Help is always welcome :) I wish the forrest xdocs were wiki-isable.
Does it sound silly to think that they should just be moved to the
wiki instead? The major problem that presents is that the wiki isn't
an obvious place to go so it becomes another problem. Let me know I
guess. I'm not sure how much to say/offer, but I feel very
comforatable doing things with you with code/otherwise so changes can
be made..

jesse
On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> Jesse Kuhnert wrote:
> > Hehe....Yes calling the render methods is still not ideally efficient...
> >
> > It is still easy to test a component/page..Or at least "fairly" easy.
> > Under org.apache.tapestry.test.util (I think) there is a Creator class
> > that will let you create an instance of a component/page with
> > properties (even of your abstract methods) setup via a map or array
> > parameter.
> >
> > You could then pass in a mock request cycle, with a NestedMarkupWriter
> > instance, which will allow you to capture the string data written to
> > it's internal buffer and then assert whatever you want to assert with
> > that data. I plan on adding some documentation on this as well :)
> >
> > The service idea is a possible workaround, but depending on how speedy
> > all of these things get expedited I really do want to attack the
> > direct update + component identity problems as the first order of
> > business, if at all possible. It does affect me as well :)
> >
> > In the interim though, there is enough infrastructure available in
> > tacos alone that I can make PartialFor work with things they way that
> > we want. I didn't want to do it before because it would be another one
> > of those "you can use it - but.." scenerios, but it would be a good
> > chance to play with stuff in a smaller-impact environment anyways.
> >
> > Does this sound good/reasonable?
> >
> Yes, it sounds good / reasonable. I know it's better to focus, but then,
> 2 "principles" to apply, IMO are (for this and everything we do in
> programming):
>
> 1) It should "just work". If there's a special limitation due to lack of
> time, then it should be clearly documented (not "it may work" but "it
> will work on this, and on this it won't"). It's much preferred if the
> component itself checks this and throws an exception.
>
> 2) It should be documented. It's like a marketing effort for developers,
> hehe.
>
> Of course, in any case I'd be glad to help. But as a general approach,
> it sounds good...
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Jesse Kuhnert wrote:
> Hehe....Yes calling the render methods is still not ideally efficient...
>
> It is still easy to test a component/page..Or at least "fairly" easy.
> Under org.apache.tapestry.test.util (I think) there is a Creator class
> that will let you create an instance of a component/page with
> properties (even of your abstract methods) setup via a map or array
> parameter.
>
> You could then pass in a mock request cycle, with a NestedMarkupWriter
> instance, which will allow you to capture the string data written to
> it's internal buffer and then assert whatever you want to assert with
> that data. I plan on adding some documentation on this as well :)
>
> The service idea is a possible workaround, but depending on how speedy
> all of these things get expedited I really do want to attack the
> direct update + component identity problems as the first order of
> business, if at all possible. It does affect me as well :)
>
> In the interim though, there is enough infrastructure available in
> tacos alone that I can make PartialFor work with things they way that
> we want. I didn't want to do it before because it would be another one
> of those "you can use it - but.." scenerios, but it would be a good
> chance to play with stuff in a smaller-impact environment anyways.
>
> Does this sound good/reasonable?
>   
Yes, it sounds good / reasonable. I know it's better to focus, but then, 
2 "principles" to apply, IMO are (for this and everything we do in 
programming):

1) It should "just work". If there's a special limitation due to lack of 
time, then it should be clearly documented (not "it may work" but "it 
will work on this, and on this it won't"). It's much preferred if the 
component itself checks this and throws an exception.

2) It should be documented. It's like a marketing effort for developers, 
hehe.

Of course, in any case I'd be glad to help. But as a general approach, 
it sounds good...

-- 
Ing. Leonardo Quijano Vincenzi
Director Técnico
DTQ Software





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Hehe....Yes calling the render methods is still not ideally efficient...

It is still easy to test a component/page..Or at least "fairly" easy.
Under org.apache.tapestry.test.util (I think) there is a Creator class
that will let you create an instance of a component/page with
properties (even of your abstract methods) setup via a map or array
parameter.

You could then pass in a mock request cycle, with a NestedMarkupWriter
instance, which will allow you to capture the string data written to
it's internal buffer and then assert whatever you want to assert with
that data. I plan on adding some documentation on this as well :)

The service idea is a possible workaround, but depending on how speedy
all of these things get expedited I really do want to attack the
direct update + component identity problems as the first order of
business, if at all possible. It does affect me as well :)

In the interim though, there is enough infrastructure available in
tacos alone that I can make PartialFor work with things they way that
we want. I didn't want to do it before because it would be another one
of those "you can use it - but.." scenerios, but it would be a good
chance to play with stuff in a smaller-impact environment anyways.

Does this sound good/reasonable?
On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> Jesse Kuhnert wrote:
> > You are mostly understanding correctly, besides the listener reloading
> > the entire page in the response, sort of... :)
> >
> Yes but no... The listener isn't reloading the entire page, but it is
> indeed *rendering* the whole page.  Am I right?
> Two points:
>
> 1) Direct component refresh is not reliable. That's until the "use with
> care" warning is removed, hehe...  Now if we have a Direct refresh that
> 'just works' (I can put it in a @For or anywhere and it would work)
> that'd be great. But the "component service" solution is also useful.
>
> 2) I'm thinking of in-container component testing. I'd call the
> "component direct" service, or whatever is called, and use some HTML
> testing tool to check my components. Now, components really *shouldn't*
> have any external dependencies besides the ones define in its interface
> (the JWC file, annotations, etc), right? Or I could try to manually test
> a component by calling it directly and setting the parameters on some
> kind of component-test web interface.
>
> If the component update is rendering the whole page, isn't this process
> expensive? Even if it's cached...
> (and if it's not cached, the devoleper time is also valuable.. you know)
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
Jesse Kuhnert wrote:
> You are mostly understanding correctly, besides the listener reloading
> the entire page in the response, sort of... :)
>   
Yes but no... The listener isn't reloading the entire page, but it is 
indeed *rendering* the whole page.  Am I right?
Two points:

1) Direct component refresh is not reliable. That's until the "use with 
care" warning is removed, hehe...  Now if we have a Direct refresh that 
'just works' (I can put it in a @For or anywhere and it would work) 
that'd be great. But the "component service" solution is also useful.

2) I'm thinking of in-container component testing. I'd call the 
"component direct" service, or whatever is called, and use some HTML 
testing tool to check my components. Now, components really *shouldn't* 
have any external dependencies besides the ones define in its interface 
(the JWC file, annotations, etc), right? Or I could try to manually test 
a component by calling it directly and setting the parameters on some 
kind of component-test web interface.

If the component update is rendering the whole page, isn't this process 
expensive? Even if it's cached...
(and if it's not cached, the devoleper time is also valuable.. you know)

-- 
Ing. Leonardo Quijano Vincenzi
Director Técnico
DTQ Software



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
I see ... I reread the description for the direct parameter now .

It looks like what I was trying to do , is done by this parameter . I was 
anticipating that there would be problems with components contained in a 
loop , but i was thinking still , to render only the component containing 
the loop .

I shall be trying all of this soon ,
Thanks



----- Original Message ----- 
From: "Jesse Kuhnert" <jk...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 5:19 PM
Subject: Re: Serving a Component as a Page


You are mostly understanding correctly, besides the listener reloading
the entire page in the response, sort of... :)

Are your 10 components in a loop (by that I mean do you iterate over
some list or array via Foreach or For )? If they are then the answer
is yes to needing to invoke the page render, but even in this less
than ideal scenerio none of the content besides the 20kb or so from
your one component is actually returned to the client..

If however, your 10 components are not in a loop, but just 10
components sitting on the page, then I would definitely specify
direct=true on the link. In that scenerio your listener will be
invoked, and then your component will be found and rendered, none of
the other components will even be touched.

So it all depends on loops...

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> ok here's a more detailed example .
>
> Home.page which contains 10 components . Let's just say each component is 
> 20
> kb , and I need to refresh a single component on the page . it would be in
> my best interest not to download all 10 components at the same time if i
> don't need to .
>
> As I understand it , if you run a listener method that reloads the page ,
> this would cause the server to send the entire page once again . Even 
> though
> 10% of the page is needed in my case .
>
> So what I want to do is to minimize network trafic and server processing 
> and
> send only the needed component from the server instead of the entire page
> considering that's the only thing that would be refreshed by tacos ...
>
> Am I understanding this wrong ? ?
>
>
> ----- Original Message -----
> From: "Jesse Kuhnert" <jk...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 5:06 PM
> Subject: Re: Serving a Component as a Page
>
>
> Maybe I'm not understanding your use-case. Tapestry/Tacos isn't
> necessarily forcing you to call a listener method on a page per
> se....You could just as easily call a listener method on a component
> instead. There should really be no scenerio where you need to do what
> you are describing.
>
> The id stuff does need to be made clearer I know, and it will be, but
> for now, the id can be something you've specified as an informal
> parameter on your component, ie <span jwcid="@Any" id="myid"/>, or it
> can be the actual components ID <span jwcid="mycomponent@Whatever" />
> ... The part that needs clearing up is knowing that
> "mycomponent@Whatever"'s ID will change depending on how the component
> is being used/embedded. ...Ie it may very well have a generated id of
> mycomponent_0 or something else similar.
>
> If you can describe a more detailed example of what you are wanting to
> do I might be able to be more helpful.
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I've been bouncing from XTile to Tacos for a while ...
> >
> > i like tacos , xtile seemed to need more js written for it
> >
> > i don't know much about tacos internals , but it sounds logic to me that
> > if
> > the direct link hits a listener method , and that listener method 
> > dedcides
> > to activate another page in the cycle , then should the incoming page
> > contain a html element matching id with the curently displayed page ,
> > AjaxDirectLink would replace the elements .
> >
> > Should it not work like this ? If it does , the only question here is 
> > how
> > to
> > make tapestry serve a component instead of a page , as a page , without
> > having to write special duplicated code for it . . .
> >
> > Cosmin
> > ----- Original Message -----
> > From: "Jesse Kuhnert" <jk...@gmail.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Tuesday, November 22, 2005 4:40 PM
> > Subject: Re: Serving a Component as a Page
> >
> >
> > XTile does do this right now I think, under tapestry contrib. ?
> >
> > On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > > This is a slightly different approach than using the "direct" service 
> > > in
> > > Tacos AjaxDirectLink. That direct update has a warning over there that
> > > ...well... doesn't let you use unless you know Tacos internals. So, it
> > > may be better for the developer to use his own components (that he
> > > already knows how to handle dependencies) and have the component 
> > > answer
> > > the AJAX request.
> > >
> > > In short... +1 for this.. .but where do we get started?
> > >
> > > --
> > > Ing. Leonardo Quijano Vincenzi
> > > Director Técnico
> > > DTQ Software
> > >
> > >
> > > Cosmin Bucur wrote:
> > > > I know what I want sounds a bit wierd , but it would make sense 
> > > > using
> > > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > > components , to be able to refresh on a per component basis , 
> > > > reducing
> > > > trafic and proccessing
> > > >
> > > > Cosmin
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
You are mostly understanding correctly, besides the listener reloading
the entire page in the response, sort of... :)

Are your 10 components in a loop (by that I mean do you iterate over
some list or array via Foreach or For )? If they are then the answer
is yes to needing to invoke the page render, but even in this less
than ideal scenerio none of the content besides the 20kb or so from
your one component is actually returned to the client..

If however, your 10 components are not in a loop, but just 10
components sitting on the page, then I would definitely specify
direct=true on the link. In that scenerio your listener will be
invoked, and then your component will be found and rendered, none of
the other components will even be touched.

So it all depends on loops...

On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> ok here's a more detailed example .
>
> Home.page which contains 10 components . Let's just say each component is 20
> kb , and I need to refresh a single component on the page . it would be in
> my best interest not to download all 10 components at the same time if i
> don't need to .
>
> As I understand it , if you run a listener method that reloads the page ,
> this would cause the server to send the entire page once again . Even though
> 10% of the page is needed in my case .
>
> So what I want to do is to minimize network trafic and server processing and
> send only the needed component from the server instead of the entire page
> considering that's the only thing that would be refreshed by tacos ...
>
> Am I understanding this wrong ? ?
>
>
> ----- Original Message -----
> From: "Jesse Kuhnert" <jk...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 5:06 PM
> Subject: Re: Serving a Component as a Page
>
>
> Maybe I'm not understanding your use-case. Tapestry/Tacos isn't
> necessarily forcing you to call a listener method on a page per
> se....You could just as easily call a listener method on a component
> instead. There should really be no scenerio where you need to do what
> you are describing.
>
> The id stuff does need to be made clearer I know, and it will be, but
> for now, the id can be something you've specified as an informal
> parameter on your component, ie <span jwcid="@Any" id="myid"/>, or it
> can be the actual components ID <span jwcid="mycomponent@Whatever" />
> ... The part that needs clearing up is knowing that
> "mycomponent@Whatever"'s ID will change depending on how the component
> is being used/embedded. ...Ie it may very well have a generated id of
> mycomponent_0 or something else similar.
>
> If you can describe a more detailed example of what you are wanting to
> do I might be able to be more helpful.
> On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> > I've been bouncing from XTile to Tacos for a while ...
> >
> > i like tacos , xtile seemed to need more js written for it
> >
> > i don't know much about tacos internals , but it sounds logic to me that
> > if
> > the direct link hits a listener method , and that listener method dedcides
> > to activate another page in the cycle , then should the incoming page
> > contain a html element matching id with the curently displayed page ,
> > AjaxDirectLink would replace the elements .
> >
> > Should it not work like this ? If it does , the only question here is how
> > to
> > make tapestry serve a component instead of a page , as a page , without
> > having to write special duplicated code for it . . .
> >
> > Cosmin
> > ----- Original Message -----
> > From: "Jesse Kuhnert" <jk...@gmail.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Tuesday, November 22, 2005 4:40 PM
> > Subject: Re: Serving a Component as a Page
> >
> >
> > XTile does do this right now I think, under tapestry contrib. ?
> >
> > On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > > This is a slightly different approach than using the "direct" service in
> > > Tacos AjaxDirectLink. That direct update has a warning over there that
> > > ...well... doesn't let you use unless you know Tacos internals. So, it
> > > may be better for the developer to use his own components (that he
> > > already knows how to handle dependencies) and have the component answer
> > > the AJAX request.
> > >
> > > In short... +1 for this.. .but where do we get started?
> > >
> > > --
> > > Ing. Leonardo Quijano Vincenzi
> > > Director Técnico
> > > DTQ Software
> > >
> > >
> > > Cosmin Bucur wrote:
> > > > I know what I want sounds a bit wierd , but it would make sense using
> > > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > > components , to be able to refresh on a per component basis , reducing
> > > > trafic and proccessing
> > > >
> > > > Cosmin
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
ok here's a more detailed example .

Home.page which contains 10 components . Let's just say each component is 20 
kb , and I need to refresh a single component on the page . it would be in 
my best interest not to download all 10 components at the same time if i 
don't need to .

As I understand it , if you run a listener method that reloads the page , 
this would cause the server to send the entire page once again . Even though 
10% of the page is needed in my case .

So what I want to do is to minimize network trafic and server processing and 
send only the needed component from the server instead of the entire page 
considering that's the only thing that would be refreshed by tacos ...

Am I understanding this wrong ? ?


----- Original Message ----- 
From: "Jesse Kuhnert" <jk...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 5:06 PM
Subject: Re: Serving a Component as a Page


Maybe I'm not understanding your use-case. Tapestry/Tacos isn't
necessarily forcing you to call a listener method on a page per
se....You could just as easily call a listener method on a component
instead. There should really be no scenerio where you need to do what
you are describing.

The id stuff does need to be made clearer I know, and it will be, but
for now, the id can be something you've specified as an informal
parameter on your component, ie <span jwcid="@Any" id="myid"/>, or it
can be the actual components ID <span jwcid="mycomponent@Whatever" />
... The part that needs clearing up is knowing that
"mycomponent@Whatever"'s ID will change depending on how the component
is being used/embedded. ...Ie it may very well have a generated id of
mycomponent_0 or something else similar.

If you can describe a more detailed example of what you are wanting to
do I might be able to be more helpful.
On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I've been bouncing from XTile to Tacos for a while ...
>
> i like tacos , xtile seemed to need more js written for it
>
> i don't know much about tacos internals , but it sounds logic to me that 
> if
> the direct link hits a listener method , and that listener method dedcides
> to activate another page in the cycle , then should the incoming page
> contain a html element matching id with the curently displayed page ,
> AjaxDirectLink would replace the elements .
>
> Should it not work like this ? If it does , the only question here is how 
> to
> make tapestry serve a component instead of a page , as a page , without
> having to write special duplicated code for it . . .
>
> Cosmin
> ----- Original Message -----
> From: "Jesse Kuhnert" <jk...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:40 PM
> Subject: Re: Serving a Component as a Page
>
>
> XTile does do this right now I think, under tapestry contrib. ?
>
> On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > This is a slightly different approach than using the "direct" service in
> > Tacos AjaxDirectLink. That direct update has a warning over there that
> > ...well... doesn't let you use unless you know Tacos internals. So, it
> > may be better for the developer to use his own components (that he
> > already knows how to handle dependencies) and have the component answer
> > the AJAX request.
> >
> > In short... +1 for this.. .but where do we get started?
> >
> > --
> > Ing. Leonardo Quijano Vincenzi
> > Director Técnico
> > DTQ Software
> >
> >
> > Cosmin Bucur wrote:
> > > I know what I want sounds a bit wierd , but it would make sense using
> > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > components , to be able to refresh on a per component basis , reducing
> > > trafic and proccessing
> > >
> > > Cosmin
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
Maybe I'm not understanding your use-case. Tapestry/Tacos isn't
necessarily forcing you to call a listener method on a page per
se....You could just as easily call a listener method on a component
instead. There should really be no scenerio where you need to do what
you are describing.

The id stuff does need to be made clearer I know, and it will be, but
for now, the id can be something you've specified as an informal
parameter on your component, ie <span jwcid="@Any" id="myid"/>, or it
can be the actual components ID <span jwcid="mycomponent@Whatever" />
... The part that needs clearing up is knowing that
"mycomponent@Whatever"'s ID will change depending on how the component
is being used/embedded. ...Ie it may very well have a generated id of
mycomponent_0 or something else similar.

If you can describe a more detailed example of what you are wanting to
do I might be able to be more helpful.
On 11/22/05, Cosmin Bucur <co...@myorthodontist.ca> wrote:
> I've been bouncing from XTile to Tacos for a while ...
>
> i like tacos , xtile seemed to need more js written for it
>
> i don't know much about tacos internals , but it sounds logic to me that if
> the direct link hits a listener method , and that listener method dedcides
> to activate another page in the cycle , then should the incoming page
> contain a html element matching id with the curently displayed page ,
> AjaxDirectLink would replace the elements .
>
> Should it not work like this ? If it does , the only question here is how to
> make tapestry serve a component instead of a page , as a page , without
> having to write special duplicated code for it . . .
>
> Cosmin
> ----- Original Message -----
> From: "Jesse Kuhnert" <jk...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, November 22, 2005 4:40 PM
> Subject: Re: Serving a Component as a Page
>
>
> XTile does do this right now I think, under tapestry contrib. ?
>
> On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> > This is a slightly different approach than using the "direct" service in
> > Tacos AjaxDirectLink. That direct update has a warning over there that
> > ...well... doesn't let you use unless you know Tacos internals. So, it
> > may be better for the developer to use his own components (that he
> > already knows how to handle dependencies) and have the component answer
> > the AJAX request.
> >
> > In short... +1 for this.. .but where do we get started?
> >
> > --
> > Ing. Leonardo Quijano Vincenzi
> > Director Técnico
> > DTQ Software
> >
> >
> > Cosmin Bucur wrote:
> > > I know what I want sounds a bit wierd , but it would make sense using
> > > the AjaxDirectLink frfom tacos , when having a huge page with many
> > > components , to be able to refresh on a per component basis , reducing
> > > trafic and proccessing
> > >
> > > Cosmin
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Cosmin Bucur <co...@myorthodontist.ca>.
I've been bouncing from XTile to Tacos for a while ...

i like tacos , xtile seemed to need more js written for it

i don't know much about tacos internals , but it sounds logic to me that if 
the direct link hits a listener method , and that listener method dedcides 
to activate another page in the cycle , then should the incoming page 
contain a html element matching id with the curently displayed page , 
AjaxDirectLink would replace the elements .

Should it not work like this ? If it does , the only question here is how to 
make tapestry serve a component instead of a page , as a page , without 
having to write special duplicated code for it . . .

Cosmin
----- Original Message ----- 
From: "Jesse Kuhnert" <jk...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, November 22, 2005 4:40 PM
Subject: Re: Serving a Component as a Page


XTile does do this right now I think, under tapestry contrib. ?

On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> This is a slightly different approach than using the "direct" service in
> Tacos AjaxDirectLink. That direct update has a warning over there that
> ...well... doesn't let you use unless you know Tacos internals. So, it
> may be better for the developer to use his own components (that he
> already knows how to handle dependencies) and have the component answer
> the AJAX request.
>
> In short... +1 for this.. .but where do we get started?
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
>
> Cosmin Bucur wrote:
> > I know what I want sounds a bit wierd , but it would make sense using
> > the AjaxDirectLink frfom tacos , when having a huge page with many
> > components , to be able to refresh on a per component basis , reducing
> > trafic and proccessing
> >
> > Cosmin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Serving a Component as a Page

Posted by Jesse Kuhnert <jk...@gmail.com>.
XTile does do this right now I think, under tapestry contrib. ?

On 11/22/05, Leonardo Quijano Vincenzi <le...@dtqsoftware.com> wrote:
> This is a slightly different approach than using the "direct" service in
> Tacos AjaxDirectLink. That direct update has a warning over there that
> ...well... doesn't let you use unless you know Tacos internals. So, it
> may be better for the developer to use his own components (that he
> already knows how to handle dependencies) and have the component answer
> the AJAX request.
>
> In short... +1 for this.. .but where do we get started?
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
>
> Cosmin Bucur wrote:
> > I know what I want sounds a bit wierd , but it would make sense using
> > the AjaxDirectLink frfom tacos , when having a huge page with many
> > components , to be able to refresh on a per component basis , reducing
> > trafic and proccessing
> >
> > Cosmin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org