Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 66b28c13
authored
Feb 14, 2010
by
tuomari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
https://dev.intra.insomnia.fi/svn/trunk@21
8cf89bec-f6a3-4178-919f-364fb3449fe5
1 parent
7ebee0a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
5 deletions
code/LanBortalWeb/.classpath
code/LanBortalWeb/WebContent/user/create.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
code/LanBortalWeb/.classpath
View file @
66b28c1
...
@@ -6,11 +6,7 @@
...
@@ -6,11 +6,7 @@
<attribute
name=
"owner.project.facets"
value=
"jst.java"
/>
<attribute
name=
"owner.project.facets"
value=
"jst.java"
/>
</attributes>
</attributes>
</classpathentry>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"
>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish v3 Java EE 6"
/>
<attributes>
<attribute
name=
"owner.project.facets"
value=
"jst.web"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.web.container"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.web.container"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.module.container"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.module.container"
/>
<classpathentry
kind=
"output"
path=
"build/classes"
/>
<classpathentry
kind=
"output"
path=
"build/classes"
/>
...
...
code/LanBortalWeb/WebContent/user/create.xhtml
0 → 100644
View file @
66b28c1
<!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"
>
<ui:define
name=
"title"
>
CreateUser
</ui:define>
<ui:define
name=
"header"
>
Header
</ui:define>
<ui:define
name=
"content"
>
<h:form>
<h:inputText
value=
"#{userView.name}"
/>
<h:commandButton
action=
"helloPage"
value=
"Save"
/>
</h:form>
<h:form>
</h:form>
</ui:define>
<ui:define
name=
"footer"
>
footer
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
0 → 100644
View file @
66b28c1
package
fi
.
insomnia
.
bortal
.
view
;
import
javax.ejb.EJB
;
import
javax.faces.bean.ManagedBean
;
import
javax.faces.bean.SessionScoped
;
import
fi.insomnia.bortal.UserBeanLocal
;
import
fi.insomnia.bortal.db.User
;
@ManagedBean
@SessionScoped
public
class
UserView
{
@EJB
private
UserBeanLocal
bean
;
private
User
currentUser
;
private
String
nick
=
"default"
;
private
String
password
=
"default"
;
private
String
realname
=
"default"
;
private
String
address
=
"default"
;
public
String
saveUser
()
{
// Luodaan uusi kyttj UserBeanin funktiolla createNewUser jolle
// annetaan parametrina pakolliset tiedot ( nick ja salasana )
// Paluuarvona saadaan uusi uljas kyttj-olio.
currentUser
=
bean
.
createNewUser
(
nick
,
password
);
if
(
currentUser
==
null
)
{
return
"fault"
;
}
// asetetaan muut kentt..
currentUser
.
setName
(
realname
);
currentUser
.
setAddress
(
address
);
return
"edit"
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getRealname
()
{
return
realname
;
}
public
void
setRealname
(
String
realname
)
{
this
.
realname
=
realname
;
}
public
void
setCurrentUser
(
User
currentUser
)
{
this
.
currentUser
=
currentUser
;
}
public
User
getCurrentUser
()
{
return
currentUser
;
}
}
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