[jboss-user] [JBoss jBPM] - Re: Combo Box in Form
jorges38
do-not-reply at jboss.com
Wed Jun 13 10:14:34 EDT 2007
I am sendig the coding that I have:
faces-config.xml
<!-- Catalog-->
<managed-bean>
<managed-bean-name>product</managed-bean-name>
<managed-bean-class>org.jbpm.webapp.bean.Product</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>product</property-name>
</managed-property>
<managed-property>
<property-name>description</property-name>
#{description}
</managed-property>
<managed-property>
<property-name>situacao</property-name>
#{situacao}
</managed-property>
<managed-property>
<property-name>embalagem</property-name>
#{embalagem}
</managed-property>
<managed-property>
<property-name>tipo</property-name>
#{tipo}
</managed-property>
</managed-bean>
</faces-config>
In the Form:
ex. form.product.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:tf="http://jbpm.org/jsf/tf"
xmlns:jbpm="http://jbpm.org/jsf"
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt">
.
.
<ui:define name="body">
<!-- These aliases will save us a lot of typing -->
<ui:param name="bean" value="#{taskInstanceBean}"/>
<ui:param name="ti" value="#{taskInstanceBean.taskInstance}"/>
<ui:param name="td" value="#{taskBean.task}"/>
<ui:param name="pd" value="#{processBean.processDefinition}" />
<ui:component>
.
.
<jbpm:datacell>
<f:facet name="header">
Product ID
</f:facet>
<h:outputText value="#{ti.product}"/>
</jbpm:datacell>
.
.
Product.java
package org.jbpm.webapp.bean;
public class Product {
private Integer product=1;
private String description;
private String situacao;
private String embalagem;
private String tipo;
public Integer getProduct(){
return produto;
}
public void setProduto(Integer product){
this.product = product;
}
public String getDescription(){
return description;
}
public void setDescription(String description){
this.description = description;
}
public String getSituacao(){
return situacao;
}
public void setSituacao(String situacao){
this.situacao = situacao;
}
public String getEmbalagem(){
return embalagem;
}
public void setEmbalagem(String embalagem){
this.embalagem = embalagem;
}
public String getTipo(){
return tipo;
}
public void setTipo(String tipo){
this.tipo = tipo;
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053995#4053995
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053995
More information about the jboss-user
mailing list