webtier@glassfish.java.net

Re: still trying <f:metadata>

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Thu, 24 Dec 2009 15:00:29 +0100

the page:

http://fgaucho.dyndns.org:8080/arena-jsf20/faces/headlines.xhtml?type=WHEREISIT


2009/12/24 Felipe Gaúcho <fgaucho_at_gmail.com>:
> I am just trying some simple example, like:
>
> to click in a link and reload another page with a URL
> parameter........ and I want to print the value of the
> parameter.........
>
> I can debug and the value is being set.. but since it is stateless,
> when the page get the parameter value, it always return null :(
>
> ----------- bean:
> @Named("headlines")
> @RequestScoped
> public class HeadlineBean implements Serializable {
>        private static final long serialVersionUID =
> PujAbstractEntity.serialVersionUID;
>
>        private String type;
>        public String getType() { return type; }
>        public void setType(String type) { this.type = type; }
> }
>
> ----------- xhtml:
> <!DOCTYPE html
>      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>        xmlns:f="http://java.sun.com/jsf/core"
>        xmlns:h="http://java.sun.com/jsf/html"
>        xmlns:ui="http://java.sun.com/jsf/facelets" xml:lang="en" lang="en"
>        xmlns:c="http://java.sun.com/jstl/core">
> <head>
> </head>
> <body>
> <f:metadata>
>        <f:viewParam name="type" value="#{headlines.type}"></f:viewParam>
> </f:metadata>
> <ui:composition template="/template/template.xhtml">
>        <ui:define name="north-pane">
>                <p>Prêmio Universitário Java</p>
>        </ui:define>
>        <ui:define name="central-pane">
>                <p>ppp -&gt; #{headlines.type}</p>
>        </ui:define>
> </ui:composition>
> </body>
> </html>
>
>
>
>
>
> --
> ------------------------------------------
>   Felipe Gaúcho
>   10+ Java Programmer
>   CEJUG Senior Advisor
>



-- 
------------------------------------------
   Felipe Gaúcho
   10+ Java Programmer
   CEJUG Senior Advisor