Or in other words, it can be used to effectively pass a "parameter" to an included page, by making the names that the included page needs ("parameter names") point to the appropriate values.

Cagatay Civici wrote:
Hi,

In addition, here's an example that might help;

http://www.jroller.com/page/cagataycivici?entry=jsf_composition_components_with_aliasbean <http://www.jroller.com/page/cagataycivici?entry=jsf_composition_components_with_aliasbean>

Regards,

Cagatay

On 1/31/07, *Gerald Müllan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi,

    the main advantage when using t:aliasBean it reusing existing pages.

    Consider having a fragment page, which you want to use in other
    pages. This
    page fragment doesn`t access components like a dataTable per
    #{managedBean.list}, it
    does its job the way like #{list}.

    E.g.:

    <t:dataTable value=#{list} ..>
       ....
    </t:dataTable>

    So, in the pages where you want to use the fragment, you can write:

    <t:aliasBean alias="#{list}" value="#{firstManagedBean.list}">
              <jsp:include page="pageFragment.jsp"/>
    </t:aliasBean>

    The next page:

    <t:aliasBean alias="#{list}" value="#{ secondManagedBean.list}">
              <jsp:include page="pageFragment.jsp"/>
    </t:aliasBean>

    It is a generic way of including pages by using a so called "alias".
    Coherent now?

    cheers,

    Gerald

    On 1/31/07, dasara <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:
     >
     > Hi All,
     > I'm new to MyFaces components. I could not understand how can we
    make use of
     > <t:aliasbean component.
     >
     > When there is a managed bean, why to go for <t:aliasbean.
     >
     > Where can i find the effective  use of <t:aliasbean. I mean in which
     > situation we can go for <t:aliasbean component.

Reply via email to