manjyu (manjyu-0.0.9) | 2012-11-21 21:12 |
- package mypkg;
- import javax.faces.context.FacesContext;
- import blanco.fw.BlancoInject;
- import blanco.gettersetter.BlancoGetterSetter;
- import blanco.jsf.BlancoJsfManagedBean;
- @BlancoJsfManagedBean(scope = "session")
- public abstract class AbstractMyBean {
- @BlancoGetterSetter
- protected String field1 = null;
- public synchronized String getLoad(@BlancoInject final FacesContext ctx) {
- return null;
- }
- }
- <?xml version="1.0" encoding="UTF-8" ?>
- <!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" xml:lang="ja" lang="ja"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets">
- <h:head>
- <title>マイ画面</title>
- </h:head>
- <h:body>
- <h:form id="myForm">
- <h:outputText value="#{myBean.load}" />
- …中略…
- </h:form>
- </h:body>
- </html>