Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9807fc5b
authored
Mar 07, 2010
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal
2 parents
936df2c2
d31a6b4c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
86 deletions
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
code/LanBortalWeb/WebContent/helloWorld.xhtml
code/LanBortalWeb/WebContent/layout/default-template.xhtml
code/LanBortalWeb/build/classes/fi/insomnia/bortal/view/UserView.class
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
View file @
9807fc5
<?xml version="1.0"?>
<?xml version="1.0"?>
<faces-config
xmlns=
"http://java.sun.com/xml/ns/javaee"
<faces-config
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version=
"2.0"
>
version=
"2.0"
>
<application>
<application>
<resource-bundle>
<resource-bundle>
<base-name>
web.messages
</base-name>
<base-name>
resources.i18n
</base-name>
<var>
msgs
</var>
<var>
i18n
</var>
</resource-bundle>
</resource-bundle>
</application>
<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>
</faces-config>
code/LanBortalWeb/WebContent/helloWorld.xhtml
View file @
9807fc5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
>
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:head>
<h:head>
<title></title>
<title></title>
</h:head>
</h:head>
<h:body>
<h:body>
<ui:composition
template=
"/layout/default-template.xhtml"
>
<ui:composition
template=
"/layout/default-template.xhtml"
>
<ui:define
name=
"title"
>
HelloWorld
</ui:define>
<ui:define
name=
"title"
>
HelloWorld
</ui:define>
<ui:define
name=
"header"
>
Header
</ui:define>
<ui:define
name=
"header"
>
Header
</ui:define>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
Hello Message:
<i>
${helloWorld.hello}
</i>
Foo #{i18n.teststr }
fallback #{i18n.fallbackstr }
<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>
</ui:define>
</ui:define>
<ui:define
name=
"footer"
>
footer
</ui:define>
<ui:define
name=
"footer"
>
footer
</ui:define>
</ui:composition>
</ui:composition>
</h:body>
</h:body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/default-template.xhtml
View file @
9807fc5
<?xml version="1.0" encoding="UTF-8" ?>
<?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">
<!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"
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
>
xmlns:h=
"http://java.sun.com/jsf/html"
<head>
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"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<title><ui:insert
name=
"title"
>
Default title
</ui:insert></title>
<title><ui:insert
name=
"title"
>
Default title
</ui:insert></title>
</head>
<!-- **** layout stylesheet **** -->
<body>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/style/style.css"
/>
<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>
<!-- **** colour scheme stylesheet **** -->
<div
id=
"content"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"#{request.contextPath}/resources/style/green.css"
/>
<ui:insert
name=
"content"
>
</h:head>
Content area. See comments below this line in the source.
<h:body>
<!-- include your content file or uncomment the include below and create content.xhtml in this directory -->
<div
id=
"main"
>
<!-- <div> -->
<div
id=
"links"
>
<!-- <ui:include src="content.xhtml"/> -->
<!-- **** INSERT LINKS HERE **** -->
<!-- </div> -->
<ui:insert
name=
"somelinks"
>
</ui:insert>
<a
href=
"http://www.insomnia.fi"
>
www.insomnia.fi
</a>
</div>
</ui:insert>
</div>
<div
id=
"footer"
>
<div
id=
"logo"
><h1><ui:insert
name=
"globaltitle"
>
Y
<span>
ks
</span>
P
<span>
ikku
</span>
J
<span>
uttu
</span></ui:insert></h1></div>
<ui:insert
name=
"footer"
>
<div
id=
"menu"
>
Footer area. See comments below this line in the source.
<ui:insert
name=
"toplinks"
><ui:include
src=
"/layout/toplinks.xhtml"
/></ui:insert>
<!-- include your header file or uncomment the include below and create footer.xhtml in this directory -->
</div>
<!--<ui:include src="footer.xhtml"/> -->
<div
id=
"content"
>
</ui:insert>
<div
id=
"column1"
>
</div>
<div
class=
"sidebaritem"
>
</body>
<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
©
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>
</html>
\ No newline at end of file
code/LanBortalWeb/build/classes/fi/insomnia/bortal/view/UserView.class
View file @
9807fc5
No preview for this file type
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
View file @
9807fc5
...
@@ -34,12 +34,18 @@ public class UserView {
...
@@ -34,12 +34,18 @@ public class UserView {
setUser
(
items
.
getRowData
());
setUser
(
items
.
getRowData
());
return
"edit"
;
return
"edit"
;
}
}
public
String
getLocale
()
{
return
"en_IN_XII"
;
}
public
String
createUser
()
{
public
String
createUser
()
{
logger
.
info
(
"Saving user"
);
logger
.
info
(
"Saving user"
);
// Luodaan uusi kÔøΩyttÔøΩjÔøΩ UserBeanin funktiolla createNewUser jolle
// Luodaan uusi kÔøΩyttÔøΩjÔøΩ UserBeanin funktiolla createNewUser jolle
// annetaan parametrina pakolliset tiedot ( nick ja salasana )
// annetaan parametrina pakolliset tiedot ( nick ja salasana )
// Paluuarvona saadaan uusi uljas k
ÔøΩyttÔøΩjÔøΩ
-olio.
// Paluuarvona saadaan uusi uljas k
�ytt�j�
-olio.
setUser
(
userBean
.
createNewUser
(
nick
,
password
));
setUser
(
userBean
.
createNewUser
(
nick
,
password
));
nick
=
""
;
nick
=
""
;
password
=
""
;
password
=
""
;
...
@@ -60,14 +66,15 @@ public class UserView {
...
@@ -60,14 +66,15 @@ public class UserView {
List
<
User
>
users
=
userBean
.
getUsers
();
List
<
User
>
users
=
userBean
.
getUsers
();
items
=
new
ListDataModel
<
User
>(
users
);
items
=
new
ListDataModel
<
User
>(
users
);
logger
.
info
(
"Fetching users. Found {}"
,
items
.
getRowCount
());
logger
.
info
(
"Fetching users. Found {}"
,
items
.
getRowCount
());
return
items
;
return
items
;
}
}
// Getters and setters...
// Getters and setters...
public
String
getNick
()
{
public
String
getNick
()
{
return
nick
;
return
nick
;
}
}
public
void
setNick
(
String
nick
)
{
public
void
setNick
(
String
nick
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment