As I know this issue is to be solved in 4.1 (correct me if I'm wrong).
There was a post about this on the devlist, ie. rewriting the rewind phase
to something similar you wrote here.
(Although accessing the rendered components as a tree is not a
"Tapestry-way" approach, so probably only the internal handling of the
rewind cycle would change, but for example the rendered component instances
embedded in a For would not be available as a list... We'll see what happens
in 4.1...)
Regards,
Norbi
----- Original Message -----
From: "gaz jones" <[EMAIL PROTECTED]>
To: "Tapestry users" <tapestry-user@jakarta.apache.org>
Sent: Thursday, January 26, 2006 1:08 PM
Subject: Re: tapestry not really component based?
its basically the same thing touched on in the earlier post titled "[TAP 4]
Components in loops" posted earlier in the week...
it appears to be because tapestry components are all pooled, and there is no
component "hierarchy" when you are in rewind phase, you cant get hold of
components to fiddle with them. asp.net solves this problem by (i guess not
having it in the first place lol) having a true component hierarchy in the
postBack phase (same as rewind), and you can get hold of components using an
index based approach. for example, a table of editable rows would be
accessible by getting the table component by id, and then using indexes to
get the correct row and column or whatever the components were...
this just doesnt seem possible in tapestry and would seem to rule out doing
very complex forms, ie forms with looped components within them that you
need to validate and do lots of stuff with in rewind. :( i would be
interested to know what any of the authors think about this - none of them
commented on the "[TAP 4] Components in loops" thread... they are keeping
quiet O_o.
if craig david were here, he would say "can i get a
reeeeeeeeeeeeeeee-wind"...
...but he's not.
**
On 1/26/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
"the fear" is very good LoL...
but without reason -
so, whats is the problem with the rewind ?
gaz jones wrote:
> thats not _quite_ what i want though, as its not truly dynamic - thats
> including a pre-defined component into the page, not generating a
completely
> dynamic one... if i have understood your suggestion, i would need to
define
> every component i ever might need in the jwc or using annotations...
>
> whatever the case, this isnt the real major problem - as annoying as it
may
> be. its the 2nd point that causes most grief... accessing loooped
components
> in the rewind phase. that gives me _the fear_
>
> On 1/26/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>
>>you don't need to, you add the PageLink to your component using the .jwc
>>or annotation, and then call
>>
>>getComponents().getComponent("myPageLink").render(writer,cycle);
>>
>>Cheers,
>>Ron
>>
>>
>>
>>gaz jones wrote:
>>
>>>you CANT add a PageLink component to your page using java in a
component
>>>inheriting from AbstractComponent. that is the problem (or one of
>>
>>them)...
>>
>>>its the 2nd issue that is the real stinker though...
>>>
>>>On 1/26/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>>Maybe I am too long in Tapestry develpement, but I really can't see
the
>>>>problem here.
>>>>
>>>>If you want to link to a page, you add a PageLink component to your
>>>>page, done.
>>>>
>>>>If you want the page name the link references to be dynamic, you make
>>>>the page parameter binding of the PageLink component read its value
from
>>>>a property in your page's / component's class using ognl. done.
>>>>
>>>>So what is really the probelm?
>>>>
>>>>Cheers,
>>>>Ron
>>>>
>>>>
>>>>gaz jones wrote:
>>>>
>>>>
>>>>>hi,
>>>>>
>>>>>i have already posted a question about this regarding dynamic
insertion
>>>>
>>>>of
>>>>
>>>>
>>>>>content into the page, but i thought i would bring it up again
because
>>
>>i
>>
>>>>>think not being able to do so violates the DRY principle (O_o).
>>>>>for example, if i have a component inheriting from AbstractComponent
>>
>>and
>>
>>>>i
>>>>
>>>>
>>>>>want to put a page link in the page, i have to (if i understand it
>>>>>correctly):
>>>>>
>>>>>add a reference to the engine service in the component:
>>>>>
>>>>>@InjectObject("engine-service:page")
>>>>>public abstract IEngineService getPageService();
>>>>>
>>>>>then in renderComponent...
>>>>>
>>>>>writer.begin("a");
>>>>>ILink link = getPageService().getLink(true, "MyGreatPage");
>>>>>writer.attribute("href", link.getURL());
>>>>>writer.print("Go to my great page");
>>>>>writer.end("a");
>>>>>
>>>>>when what i SHOULD be able to do, if tapestry were truly a component
>>>>
>>>>based
>>>>
>>>>
>>>>>framework is:
>>>>>
>>>>>in renderComponent...
>>>>>
>>>>>PageLink pageLink = new PageLink();
>>>>>pageLink.page = "MyGreatPage";
>>>>>getPage.addComonent(pageLink); // or something similar
>>>>>
>>>>>otherwise i am repeating the effort of the original PageLink author
am
>>
>>i
>>
>>>>>not? there may be a better way to do this that i dont know about
though
>>>>>obviously...
>>>>>
>>>>>not creating a proper hierarchy of components is also causing other
>>>>>problems, such as processing components when in loops. you cant get
at
>>>>>specific instances of components in the rewind cycle because they all
>>>>
>>>>share
>>>>
>>>>
>>>>>the same pooled component - is that correct?
>>>>>
>>>>>do the authors of the framework have any comments on these points
above
>>>>
>>>>or
>>>>
>>>>
>>>>>any indication if this will change in the future? you can do both of
>>>>
>>>>these
>>>>
>>>>
>>>>>things in other component based web frameworks, and i would see it as
a
>>>>>benefit if you could also do so in tapestry. does anyone else agree?
>>>>>
>>>>>cheers
>>>>>gaz
>>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.22/239 - Release Date: 2006. 01.
24.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]