Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 ffaa168e
authored
May 16, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rfid listener..
1 parent
b55e8ba0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
code/MoyaWeb/WebContent/shop/rfidListener.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/reader/RfidListenerView.java
code/MoyaWeb/WebContent/shop/rfidListener.xhtml
0 → 100644
View file @
ffaa168
<!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:tools=
"http://java.sun.com/jsf/composite/tools"
xmlns:products=
"http://java.sun.com/jsf/composite/cditools/products"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:p=
"http://primefaces.org/ui"
>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<f:viewParam
name=
"reader"
value=
"#{rfidListenerView.reader}"
/>
<f:viewParam
name=
"tag"
value=
"#{rfidListenerView.tag}"
/>
<f:event
type=
"preRenderView"
listener=
"#{rfidListenerView.cardRead()}"
/>
</f:metadata>
<ui:define
name=
"title"
>
<h1>
#{i18n['page.product.createBill.header']}
</h1>
</ui:define>
<ui:define
name=
"content"
>
Hi.
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/reader/RfidListenerView.java
0 → 100644
View file @
ffaa168
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
reader
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.inject.Named
;
import
fi.codecrew.moya.beans.ReaderBeanLocal
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
@Named
@ConversationScoped
public
class
RfidListenerView
extends
GenericCDIView
{
@EJB
private
ReaderBeanLocal
readerbean
;
private
String
reader
;
private
String
tag
;
public
void
cardRead
()
{
readerbean
.
checkCode
(
reader
,
tag
);
}
public
String
getReader
()
{
return
reader
;
}
public
void
setReader
(
String
reader
)
{
this
.
reader
=
reader
;
}
public
String
getTag
()
{
return
tag
;
}
public
void
setTag
(
String
tag
)
{
this
.
tag
=
tag
;
}
}
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