FAQ
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by WernerPunz:
http://wiki.apache.org/myfaces/AliasBean

New page:
= <x:aliasbean/> =

The aliasbean tag is a pseudo tag, which allows the encapsulation of web parts into reusable pseudo components. Similar mechanisms exist currently in Webobjects, Struts, Tapestry and Webforms.

== Usage and functionality ==

=== pseudo content of a subpage ===

...
<h:outputFormat value="#{holder.title}"/>
<h:outputFormat value="#{holder.description}"/>
... some other code


... main form using the alias bean
<x:aliasBean alias="#{holder}" value="#{databean1}">
<f:subView>
<jsp:include value="subpage"/>
</f:subView>
<x:aliasBean/>
<x:aliasBean alias="#{holder}" value="#{databean2}">
<f:subView>
<jsp:include value="subpage"/>
</f:subView>
<x:aliasBean/>
<x:aliasBean alias="#{holder}" value="#{databean3}">
<f:subView>
<jsp:include value="subpage"/>
</f:subView>
<x:aliasBean/>

The form subpage is reused on three different places in the main form.
The include is not mandatory. Between the alias tags there can be
any kind of jsf code.

*Note, trying to bind a controller delegate to the alias bean wont work, the alias
bean is rendered in a later phase of the jsf rendering cycle.

== Combining alias beans ==
In MyFaces 1.0.9 combining alias beans only works, by nesting them, this restriction might be removed
in later incarnations of MyFaces.

Search Discussions

  • Apache Wiki at May 31, 2005 at 6:14 pm
    Dear Wiki user,

    You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

    The following page has been changed by WernerPunz:
    http://wiki.apache.org/myfaces/AliasBean

    The comment on the change is:
    removed incorrect xml syntax in the alias bean tags

    ------------------------------------------------------------------------------
    <f:subView>
    <jsp:include value="subpage"/>
    </f:subView>
    - <x:aliasBean/>
    + </x:aliasBean>
    +
    <x:aliasBean alias="#{holder}" value="#{databean2}">
    <f:subView>
    <jsp:include value="subpage"/>
    </f:subView>
    - <x:aliasBean/>
    + </x:aliasBean>
    +
    <x:aliasBean alias="#{holder}" value="#{databean3}">
    <f:subView>
    <jsp:include value="subpage"/>
    </f:subView>
    - <x:aliasBean/>
    + </x:aliasBean>
    +

    The form subpage is reused on three different places in the main form.
    The include is not mandatory. Between the alias tags there can be
  • Apache Wiki at May 31, 2005 at 11:24 pm
    Dear Wiki user,

    You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

    The following page has been changed by WernerPunz:
    http://wiki.apache.org/myfaces/AliasBean

    ------------------------------------------------------------------------------

    === pseudo content of a subpage ===

    + {{{
    ...
    <h:outputFormat value="#{holder.title}"/>
    +
    <h:outputFormat value="#{holder.description}"/>
    ... some other code
    + }}}

    -
    + {{{
    ... main form using the alias bean
    <x:aliasBean alias="#{holder}" value="#{databean1}">
    <f:subView>
    @@ -32, +35 @@

    <jsp:include value="subpage"/>
    </f:subView>
    </x:aliasBean>
    -
    + }}}

    The form subpage is reused on three different places in the main form.
    The include is not mandatory. Between the alias tags there can be

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedMay 31, '05 at 6:12p
activeMay 31, '05 at 11:24p
posts3
users1
websitemyfaces.apache.org

1 user in discussion

Apache Wiki: 3 posts

People

Translate

site design / logo © 2019 Grokbase