You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Matthias Wessendorf <ma...@apache.org> on 2007/10/21 17:13:18 UTC
[Orchestra] ViewController
Hi,
I am using the build from today, and I use the ViewController (as a
multi vc) like:
@ViewController(viewIds={"/edit1.xhtml", "/edit2.xhtml"})
public class Editor
{
...
@PreRenderView public void loader()
{
//do some work...
}
...
}
I'd like to parametrize the call of the loader() only on a particular viewId,
like on the first page (edit1.xhtml) and not always.
Perhaps like @PreRenderView (executeOn={"/edit1.xhtml"})
Any thoughts ?
-M
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org
Re: [Orchestra] ViewController
Posted by Matthias Wessendorf <ma...@apache.org>.
> Why would you combine all in one ViewController and then split the
> method execution per page?
to have one behind my three pages, to edit a complex object,
but I want to "load" something (like the entity) only on the first page
> However, I am open for each enhancement which we find usable in the end.
>
> What will be the semantic of:
>
> @PreRenderView (executeOn={"/edit1.xhtml"})
>
> @PreRenderView (executeOn={"/edit2.xhtml"})
>
> @PreRenderView ()
>
> Would you expect the 3rd PreRenderView to be invoked an each page or only on those not configured explicitly?
all.
-M
>
>
> Ciao,
> Mario
>
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org
Re: [Orchestra] ViewController
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> Imagine a component inside of your page:
>
> <x:viewGroup="admin"/>
>
Stuff like this might work only with Facelets or JSF 1.2 as we need this
information before any binding has been issued. A binding might request
a bean in a conversation which might be started then and so we are no
longer able to have the @ConversationRequire tag.
We already though about something like <x:viewController="#{bean}" /> so
that you have no reference to the page from your backing bean .... But
the problems above prohibits this for now.
An extra config through a bean definition might work, though.
> @ViewController(viewGroups={"admin", "edit"})
> public class Editor
> {
> ...
>
> Thoughts?
>
Sound like a good idea.
>> -----Original Message-----
>> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
>>
>> Perhaps like @PreRenderView (executeOn={"/edit1.xhtml"})
>>
Why would you combine all in one ViewController and then split the
method execution per page?
However, I am open for each enhancement which we find usable in the end.
What will be the semantic of:
@PreRenderView (executeOn={"/edit1.xhtml"})
@PreRenderView (executeOn={"/edit2.xhtml"})
@PreRenderView ()
Would you expect the 3rd PreRenderView to be invoked an each page or only on those not configured explicitly?
Ciao,
Mario
RE: [Orchestra] ViewController
Posted by "Kito D. Mann" <km...@virtua.com>.
Makes sense to me. Any thoughts of taking things a bit further, though, like
assigning identifiers to views which aren't assigned to the view id name?
This would allow you to assign a ViewController to groups of pages easily.
Imagine a component inside of your page:
<x:viewGroup="admin"/>
This could also be done via a Spring bean definition. The annotation would
then be something like this:
@ViewController(viewGroups={"admin", "edit"})
public class Editor
{
...
Thoughts?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
> Matthias Wessendorf
> Sent: Sunday, October 21, 2007 11:13 AM
> To: MyFaces Development
> Subject: [Orchestra] ViewController
>
> Hi,
>
> I am using the build from today, and I use the ViewController (as a
> multi vc) like:
>
> @ViewController(viewIds={"/edit1.xhtml", "/edit2.xhtml"})
> public class Editor
> {
> ...
> @PreRenderView public void loader()
> {
> //do some work...
> }
> ...
> }
>
> I'd like to parametrize the call of the loader() only on a particular
> viewId,
> like on the first page (edit1.xhtml) and not always.
>
> Perhaps like @PreRenderView (executeOn={"/edit1.xhtml"})
>
> Any thoughts ?
>
> -M
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org