You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by José Paumard <Jo...@orange.fr> on 2009/04/29 15:45:23 UTC

InjectContainer and ProperyEditors

Hello all,

I'm trying to get a page from a component. I know two ways to do this : 
@Inject the ComponentResources and get the page from that object, or use 
the @InjectContainer to get it directly.

Now my problem is the following : I am in a PropertyEditor, declared in 
an AppProperyEditor page. This component is used by the bean editor 
mechanism, and rendered in the page that holds the bean editor. The flaw 
is that in this case, the injected container is still the 
AppPropertyEditorPage, instead of the page that holds my bean editor.

IMHO it's a bug, I dont see any use case where I would be interested in 
the AppPropertyEditor page.

Is there a way to get the page that holds the bean editor when I am in a 
property editor component ?

Thank you,

José


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


Re: InjectContainer and ProperyEditors

Posted by José Paumard <Jo...@orange.fr>.
 From the docs I red "this page is not normally rendered itself, but 
acts as a container for one or more blocks" concerning the page where 
the ProperyEditor blocks live. So I understood this page as being merely 
a placeholder (those blocks have to live somewhere...). And from there I 
thought that componentResource.getPage could have returned the page 
where the beaneditor lives, not that placeholder. This is why I called 
it a "bug", my apologies. Probably a few words could explain that point 
in the PropertyEditor docs.

José

Howard Lewis Ship a écrit :
> It's not a bug, it accurately reflects the structure of the page and
> the application.
>
> What you should be saying is  that you need new API for your needs.
>
> 2009/4/29 José Paumard <Jo...@orange.fr>:
>   
>> Hello all,
>>
>> I'm trying to get a page from a component. I know two ways to do this :
>> @Inject the ComponentResources and get the page from that object, or use the
>> @InjectContainer to get it directly.
>>
>> Now my problem is the following : I am in a PropertyEditor, declared in an
>> AppProperyEditor page. This component is used by the bean editor mechanism,
>> and rendered in the page that holds the bean editor. The flaw is that in
>> this case, the injected container is still the AppPropertyEditorPage,
>> instead of the page that holds my bean editor.
>>
>> IMHO it's a bug, I dont see any use case where I would be interested in the
>> AppPropertyEditor page.
>>
>> Is there a way to get the page that holds the bean editor when I am in a
>> property editor component ?
>>
>> Thank you,
>>
>> José
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>     


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


Re: InjectContainer and ProperyEditors

Posted by Howard Lewis Ship <hl...@gmail.com>.
It's not a bug, it accurately reflects the structure of the page and
the application.

What you should be saying is  that you need new API for your needs.

2009/4/29 José Paumard <Jo...@orange.fr>:
> Hello all,
>
> I'm trying to get a page from a component. I know two ways to do this :
> @Inject the ComponentResources and get the page from that object, or use the
> @InjectContainer to get it directly.
>
> Now my problem is the following : I am in a PropertyEditor, declared in an
> AppProperyEditor page. This component is used by the bean editor mechanism,
> and rendered in the page that holds the bean editor. The flaw is that in
> this case, the injected container is still the AppPropertyEditorPage,
> instead of the page that holds my bean editor.
>
> IMHO it's a bug, I dont see any use case where I would be interested in the
> AppPropertyEditor page.
>
> Is there a way to get the page that holds the bean editor when I am in a
> property editor component ?
>
> Thank you,
>
> José
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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