
Ayuda basica Primefaces inputText
Publicado por steven (6 intervenciones) el 25/04/2018 23:45:30
Buenas, estoy iniciando con primefaces y estoy algo perdido.
Como puedo cargar datos de una clase de Java y mostrarlos en un inputText, con eso me baso para realizar el resto de mi solución gracias.
Siempre me sale en blanco.
Index:
Clase
Como puedo cargar datos de una clase de Java y mostrarlos en un inputText, con eso me baso para realizar el resto de mi solución gracias.
Siempre me sale en blanco.
Index:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8"?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h1>Hello World PrimeFaces</h1>
<h:form>
<p:inputText>
</p:inputText>
<p:inputText value="#{editor.text}" />
</h:form>
</h:body>
</html>
Clase
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package org.primefaces.showcase.view.input;
import javax.faces.bean.ManagedBean;
@ManagedBean
public class EditorView {
private String text = Prueba";
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
Valora esta pregunta


0