webtier@glassfish.java.net

Re: JSF 2.0 need idea for

From: Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
Date: Sat, 19 Nov 2011 20:50:11 +0100

I have not checked with JSF 2.0 but can't you use #{controlWeb.contenido} ?

The 'getContenido' and 'setContenido' method will be called by the
framework in the different phases ...

If the 'link' has an actionListener it could change the value ...

-Bernhard

On 11/19/2011 11:48 AM, forums_at_java.net wrote:
> Hey guys.
>
> Im making a web 100% based on JSF and i found a problem when i want to do
> this:
>
> My index:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"> <h:head> <meta
> http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link
> href="./resources/css/default.css" rel="stylesheet" type="text/css" />
> <link
> href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
> <title>Parallelized Bioinformatics Algorithms built on Multicore
> Processors</title> </h:head> <h:body><!----> <div id="top"> <tr>
> <td>#{controlWeb.getContenido()}</td> <td colspan="2"><img
> src="img/header.jpg" alt="Parallelized Bioinformatics Algorithms" /></td>
> </tr> </div> <div> <div id="left"> <ui:decorate template ="cabecera.xhtml">
> </ui:decorate> </div> <div id="content" class="content"> <ui:decorate
> template ="#{controlWeb.getContenido()}"> </ui:decorate> </div> </div> <div
> id="bottom"> <ui:decorate template ="/pie.xhtml"> </ui:decorate> </div>
> </h:body> </html>
> All zones except one are always the same. The zone (id = content) I want
> that
> when you click a link in any parts of the website all links back to the
> index.xhtml and in that area the name change to the appropiate webpage. My
> idea was create a ManagedBean with a String and if you click on a link,
> that
> link modify somehow the variable of ManagedBean and when the link return to
> index that will read from the variable and it will change the web.
>
> The problem is i cant use a setter function called
> #{controlWeb.setContenido("STRING")} because that command is executed in
> compile time and doesnt work.
>
> I need one solution or another idea for make that please.
>
>
>
>
> --
>
> [Message sent by forum member 'eL_NiTrO']
>
> View Post: http://forums.java.net/node/865886
>
>
>


-- 
Painstaking Minds
IT-Consulting Bernhard Thalmayr
Herxheimer Str. 5, 83620 Vagen (Munich area), Germany
Tel: +49 (0)8062 7769174
Mobile: +49 (0)176 55060699
bernhard.thalmayr_at_painstakingminds.com - Solution Architect
This e-mail may contain confidential and/or privileged information.If 
you are not the intended recipient (or have received this email in 
error) please notify the sender immediately and delete this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.