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 395e23af
authored
Jan 20, 2013
by
Liv Haapala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IncomingFlow
1 parent
f57f1ee3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
157 additions
and
4 deletions
code/MoyaWeb/WebContent/admin/incoming/index.xhtml
code/MoyaWeb/WebContent/admin/incoming/printCard.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/reader/ReaderView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/IncomingView.java
code/MoyaWeb/WebContent/admin/incoming/index.xhtml
0 → 100644
View file @
395e23a
<!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"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
xmlns:shop=
"http://java.sun.com/jsf/composite/cditools/shop"
xmlns:reader=
"http://java.sun.com/jsf/composite/cditools/reader"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.fullscreen}/template.xhtml"
>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{barcodeView.initView}"
/>
</f:metadata>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{readerListDataView.initView}"
/>
<f:event
type=
"preRenderView"
listener=
"#{readerList.initReaderList}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<br
/>
<br
/>
<!-- reader eventtiles -->
<h:form>
<p:poll
interval=
"3"
/>
<ui:repeat
value=
"#{readerView.readerEvents}"
var=
"event"
>
<h:link
styleClass=
"userimagetile"
outcome=
"/admin/incoming/printCard"
rendered=
"#{!empty event.printedCard.user}"
>
<div>
<img
src=
"#{request.contextPath}/dydata/userimage/#{event.printedCard.user.currentImage.id}.img"
/>
<br
/>
<h:outputText
styleClass=
"usertilenick"
value=
"#{event.printedCard.user.nick}"
/>
<br
/>
<h:outputText
value=
"#{event.printedCard.user.wholeName}"
/>
<br
/>
<ui:repeat
value=
"#{readerView.getUserRoles(event.printedCard.user)}"
var=
"role"
>
<h:outputText
value=
"#{role.name}"
/>
<br
/>
</ui:repeat>
</div>
<f:param
name=
"userid"
value=
"#{event.printedCard.user.user.id}"
/>
</h:link>
</ui:repeat>
</h:form>
</ui:define>
<ui:define
name=
"sidebar"
>
<reader:readerlisttiles
/>
<br
/>
<h:form>
<reader:barcode
selectvalue=
"#{i18n['barcodeReader.readBarcode']}"
selectaction=
"#{barcodeView.readBarcode}"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/WebContent/admin/incoming/printCard.xhtml
0 → 100644
View file @
395e23a
<!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"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
xmlns:shop=
"http://java.sun.com/jsf/composite/cditools/shop"
xmlns:reader=
"http://java.sun.com/jsf/composite/cditools/reader"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:user=
"http://java.sun.com/jsf/composite/cditools/user"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.fullscreen}/template.xhtml"
>
<f:metadata>
<f:viewParam
name=
"userid"
value=
"#{userView.userid}"
/>
<f:event
type=
"preRenderView"
listener=
"#{incomingView.initView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<h:outputText
value=
"#{userView.user.user.login}"
/>
<h:form>
<user:edit
commitaction=
"#{userCartView.saveUser()}"
commitvalue=
"#{i18n['user.save']}"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/reader/ReaderView.java
View file @
395e23a
...
...
@@ -33,10 +33,6 @@ import fi.codecrew.moya.web.cdiview.user.UserView;
@Named
@ConversationScoped
/**
* @author tuukka
*
*/
public
class
ReaderView
extends
GenericCDIView
{
private
static
final
long
serialVersionUID
=
802344850073689859L
;
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/IncomingView.java
0 → 100644
View file @
395e23a
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
user
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
import
org.primefaces.model.UploadedFile
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
fi.codecrew.moya.beans.CardTemplateBeanLocal
;
import
fi.codecrew.moya.beans.EventBeanLocal
;
import
fi.codecrew.moya.enums.apps.UserPermission
;
import
fi.codecrew.moya.model.CardTemplate
;
import
fi.codecrew.moya.model.EventUser
;
import
fi.codecrew.moya.utilities.I18n
;
import
fi.codecrew.moya.web.annotations.SelectedUser
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
@Named
@ConversationScoped
public
class
IncomingView
extends
GenericCDIView
{
private
static
final
long
serialVersionUID
=
-
9115983838324313414L
;
@Inject
@SelectedUser
private
transient
EventUser
user
;
@Inject
private
UserView
userview
;
public
void
initView
()
{
super
.
beginConversation
();
}
public
String
saveUser
()
{
userview
.
saveUser
();
return
null
;
}
}
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