|
Hi, I have been having troubles using aliasBean from myfaces with the jsf-ri. I have tried the following code with both implementations: faces-config.xml <managed-bean> <managed-bean-name>person</managed-bean-name> <managed-bean-class>custom.Person</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> // Person.javapublic class Person { private String firstname; private String lastname; public String refresh() { System.out.println("person: "+firstname+" "+lastname); return null; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname;} public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname;} <!-- alias.jsp --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <%@ page language="java" %> <html><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%> <body> <f:view> <h:form><x:aliasBean sourceBean="#{person}" alias="#{holder}"> <f:subview id="form2"> <h:inputText value="#{holder.firstname}"/> <h:inputText value="#{holder.lastname}"/><p/> </f:subview> </x:aliasBean> <h:commandButton value="Refresh" action="" color=red>"#{person.refresh}"/> </h:form><h:messages layout="table" style="color: red"/> </f:view> </body></html>
|
- using x:aliasBean from myfaces components with jsf-ri Vincent Sevel
- Re: using x:aliasBean from myfaces components wit... Mathias Broekelmann
- RE : using x:aliasBean from myfaces component... Vincent Sevel

