Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
EJB-EncryptionBean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wilson Farias
EJB-EncryptionBean
Commits
d73aa431
Unverified
Commit
d73aa431
authored
5 years ago
by
Wilson de Farias
Browse files
Options
Downloads
Patches
Plain Diff
Adiciona formulário e tratamento para hash de mensagem
parent
bb178e4a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Encryption-WebClient/src/main/java/br/ufrn/imd/web2/encryption/jsf/SomeBean.java
+30
-1
30 additions, 1 deletion
...c/main/java/br/ufrn/imd/web2/encryption/jsf/SomeBean.java
Encryption-WebClient/src/main/webapp/hash/form.xhtml
+12
-6
12 additions, 6 deletions
Encryption-WebClient/src/main/webapp/hash/form.xhtml
with
42 additions
and
7 deletions
Encryption-WebClient/src/main/java/br/ufrn/imd/web2/encryption/jsf/SomeBean.java
+
30
−
1
View file @
d73aa431
package
br.ufrn.imd.web2.encryption.jsf
;
package
br.ufrn.imd.web2.encryption.jsf
;
import
javax.enterprise.context.RequestScoped
;
import
javax.inject.Named
;
import
javax.inject.Named
;
@Named
@Named
@RequestScoped
public
class
SomeBean
{
public
class
SomeBean
{
public
static
final
String
HASH_FORM_XHTML
=
"/hash/form.xhtml"
;
private
String
originalMessage
;
private
String
hashedMessage
;
public
String
getOriginalMessage
()
{
return
originalMessage
;
}
public
void
setOriginalMessage
(
String
originalMessage
)
{
this
.
originalMessage
=
originalMessage
;
}
public
String
hashnifyMessage
()
{
this
.
setHashedMessage
(
String
.
valueOf
(
originalMessage
.
hashCode
()));
return
form
();
}
public
String
form
()
{
public
String
form
()
{
return
"/hash/form.xhtml"
;
return
HASH_FORM_XHTML
;
}
public
String
getHashedMessage
()
{
return
hashedMessage
;
}
public
void
setHashedMessage
(
String
hashedMessage
)
{
this
.
hashedMessage
=
hashedMessage
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Encryption-WebClient/src/main/webapp/hash/form.xhtml
+
12
−
6
View file @
d73aa431
<ui:composition
template=
"/WEB-INF/template/layout.xhtml"
<ui:composition
template=
"/WEB-INF/template/layout.xhtml"
xmlns:a
=
"http://xmlns.jcp.org/jsf/passthrough"
xmlns:a=
"http://xmlns.jcp.org/jsf/passthrough"
xmlns:c
=
"http://xmlns.jcp.org/jsp/jstl/core"
xmlns:c=
"http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f
=
"http://xmlns.jcp.org/jsf/core"
xmlns:f=
"http://xmlns.jcp.org/jsf/core"
xmlns:h
=
"http://xmlns.jcp.org/jsf/html"
xmlns:h=
"http://xmlns.jcp.org/jsf/html"
xmlns:ui=
"http://xmlns.jcp.org/jsf/facelets"
xmlns:ui=
"http://xmlns.jcp.org/jsf/facelets"
xmlns=
"http://www.w3.org/1999/xhtml"
>
xmlns=
"http://www.w3.org/1999/xhtml"
>
...
@@ -13,9 +13,15 @@
...
@@ -13,9 +13,15 @@
<h:form>
<h:form>
<h:outputLabel
for=
"mensagem"
>
Mensagem:
</h:outputLabel>
<h:outputLabel
for=
"mensagem"
>
Mensagem:
</h:outputLabel>
<h:inputText
id=
"mensagem"
value=
""
></h:inputText>
<h:inputText
id=
"mensagem"
value=
"
#{someBean.originalMessage}
"
></h:inputText>
<h:commandButton
type=
"submit"
value=
"Enviar"
/>
<h:commandButton
action=
"#{someBean.form}"
type=
"submit"
value=
"Enviar"
/>
<c:if
test=
"#{!someBean.hashedMessage.isEmpty}"
>
<h:outputLabel
for=
"hashedMessage"
>
Mensagem:
</h:outputLabel>
<h:outputText
id=
"hashedMessage"
value=
"#{someBean.hashedMessage}"
></h:outputText>
</c:if>
</h:form>
</h:form>
</ui:define>
</ui:define>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment