Commit 22ff156f by Tuomas Riihimäki

Lisätty siistimpi tilapäinen ulkoasu.

1 parent 57f87311
......@@ -18,7 +18,7 @@ import fi.insomnia.bortal.model.User;
*/
@LocalBean
@Stateless
public class UserBean extends Generiimplements UserBeanLocal {
public class UserBean extends Genericimplements UserBeanLocal {
private static final Logger logger = LoggerFactory.getLogger(UserBean.class);
/**
......
<?xml version="1.0"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<application>
<resource-bundle>
<base-name>web.messages</base-name>
<var>msgs</var>
</resource-bundle>
</application>
version="2.0">
<application>
<resource-bundle>
<base-name>resources.i18n</base-name>
<var>i18n</var>
</resource-bundle>
<message-bundle>i18n</message-bundle>
<!-- Legal Country codes: http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm -->
<!-- Assigned Country codes: -->
<!-- Insomnia: IN (INDIA) -->
<!-- Stream: ST (SAO TOME AND PRINCIPE ) -->
<!-- Vector VE (VENEZUELA, BOLIVARIAN REPUBLIC OF) -->
<locale-config>
<default-locale>fi</default-locale>
<supported-locale>fi_IN_XII</supported-locale>
<supported-locale>en_ST_v7</supported-locale>
</locale-config>
</application>
</faces-config>
<!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: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>
<title></title>
</h:head>
<h:body>
<ui:composition template="/layout/default-template.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>
<title></title>
</h:head>
<h:body>
<ui:composition template="/layout/default-template.xhtml">
<ui:define name="title">HelloWorld</ui:define>
<ui:define name="header">Header</ui:define>
<ui:define name="content">
Hello Message: <i>${helloWorld.hello}</i>
<h:form>
<h:inputText value="#{helloWorld.name}" />
<h:commandButton action="helloPage" value="Say hello" />
</h:form>
<h:form>
So far said hello to the following people
<h:dataTable id="dt1" value="#{helloWorld.helloedPeople}" var="item">
<h:column>
<f:facet name="header">
<h:outputText value="id" />
</f:facet>
<h:outputText value="#{item.id}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="name" />
</f:facet>
<h:commandLink action="#{helloWorld.getDetail}" value="#{item.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="saved" />
</f:facet>
<h:outputText value="#{item.saved}">
<f:convertDateTime pattern="dd.MM.yyyy hh:mm"/>
</h:outputText>
</h:column>
</h:dataTable>
</h:form>
Foo #{i18n.teststr }
fallback #{i18n.fallbackstr }
</ui:define>
<ui:define name="footer">footer</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view locale="#{userView.locale}">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><ui:insert name="title">Default title</ui:insert></title>
</head>
<body>
<div id="header">
<ui:insert name="header">
Header area. See comments below this line in the source.
<!-- include your header file or uncomment the include below and create header.xhtml in this directory -->
<!-- <ui:include src="header.xhtml"/> -->
</ui:insert>
</div>
<!-- **** layout stylesheet **** -->
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/style/style.css" />
<div id="content">
<ui:insert name="content">
Content area. See comments below this line in the source.
<!-- include your content file or uncomment the include below and create content.xhtml in this directory -->
<!-- <div> -->
<!-- <ui:include src="content.xhtml"/> -->
<!-- </div> -->
</ui:insert>
</div>
<div id="footer">
<ui:insert name="footer">
Footer area. See comments below this line in the source.
<!-- include your header file or uncomment the include below and create footer.xhtml in this directory -->
<!--<ui:include src="footer.xhtml"/> -->
</ui:insert>
</div>
</body>
<!-- **** colour scheme stylesheet **** -->
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/style/green.css" />
</h:head>
<h:body>
<div id="main">
<div id="links">
<!-- **** INSERT LINKS HERE **** -->
<ui:insert name="somelinks">
<a href="http://www.insomnia.fi">www.insomnia.fi</a>
</ui:insert>
</div>
<div id="logo"><h1><ui:insert name="globaltitle">Y<span>ks </span>P<span>ikku </span>J<span>uttu </span></ui:insert></h1></div>
<div id="menu">
<ui:insert name="toplinks"><ui:include src="/layout/toplinks.xhtml" /></ui:insert>
</div>
<div id="content">
<div id="column1">
<div class="sidebaritem">
<div class="sbihead">
<h1>additional links</h1>
</div>
<div class="sbilinks">
<!-- **** INSERT ADDITIONAL LINKS HERE **** -->
<ui:insert name="sidelinks">
<ul>
<li><a href="http://www.openwebdesign.org">open web design</a></li>
<li><a href="http://www.w3schools.com/xhtml/default.asp">learn XHTML</a></li>
<li><a href="http://www.w3schools.com/css/default.asp">learn CSS</a></li>
<li><a href="http://www.mozilla.com/firefox">get firefox</a></li>
</ul>
</ui:insert>
</div>
</div>
<div class="sidebaritem">
<div class="sbihead">
<h1>latest news</h1>
</div>
<div class="sbicontent">
<!-- **** INSERT NEWS ITEMS HERE **** -->
<h2>01.09.2006</h2>
<p>This is where you can put your latest news.</p>
<p><a href="#">read more ...</a></p>
<p></p>
<p></p>
<h2>01.09.2006</h2>
<p>This is where you can put your latest news.</p>
<p><a href="#">read more ...</a></p>
</div>
</div>
<div class="sidebaritem">
<div class="sbihead">
<h1>other information</h1>
</div>
<div class="sbicontent">
<!-- **** INSERT OTHER INFORMATION HERE **** -->
<p>
This space can be used for additional information such as a contact phone number, address
or maybe even a graphic.
</p>
</div>
</div>
</div>
<div id="column2">
<h:messages globalOnly="true"/>
<ui:insert name="content">
Default content..
</ui:insert>
</div>
</div>
<div id="footer">
copyright &copy; Insomnia Ry, Stream Ry, Vector Ry | <a href="#">email@emailaddress</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.dcarter.co.uk">design by dcarter</a>
</div>
</div>
</h:body>
</f:view>
</html>
\ No newline at end of file
......@@ -20,8 +20,7 @@ public class UserView {
@EJB
private UserBeanLocal userBean;
private static final Logger logger = LoggerFactory
.getLogger(UserView.class);
private static final Logger logger = LoggerFactory.getLogger(UserView.class);
private User user;
......@@ -35,9 +34,15 @@ public class UserView {
setUser(items.getRowData());
return "edit";
}
public String getLocale()
{
return "en_IN_XII";
}
public String createUser() {
logger.info("Saving user");
logger.debug("Saving user");
// Luodaan uusi k�ytt�j� UserBeanin funktiolla createNewUser jolle
// annetaan parametrina pakolliset tiedot ( nick ja salasana )
// Paluuarvona saadaan uusi uljas k�ytt�j�-olio.
......@@ -61,7 +66,9 @@ public class UserView {
List<User> users = userBean.getUsers();
items = new ListDataModel<User>(users);
logger.info("Fetching users. Found {}", items.getRowCount());
return items;
}
// Getters and setters...
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!