I want a page where I can edit the properties of a UseCase entity. At the end of the page
I want to display the Step entities that belong to the UseCase.
This is the page code that I have:
| <!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:ui="http://java.sun.com/jsf/facelets"
|
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:s="http://jboss.com/products/seam/taglib">
| <body>
| <ui:composition template="/template.xhtml">
|
| <ui:define name="title">
| Editar Caso de Uso
| </ui:define>
|
| <ui:define name="body">
| <h:form>
| <h:messages />
| Caso de Uso: <h:inputText value="#{useCase.name}"
required="true" />
| <h:commandButton value="Inserir Passo" action="insertStep"
/>
| <h:commandButton value="Atualizar" action="update"
| rendered="${useCase.id != null}" />
| <h:commandButton value="Inserir" action="insert"
| rendered="${useCase.id == null}" />
|
| <h:dataTable value="#{stepList}" var="stepVar">
| <h:column>
| <f:facet name="header">Nome</f:facet>
| #{stepVar.name}
| </h:column>
| <h:column>
| <f:facet name="header">Editar</f:facet>
| <h:commandLink value="Editar" action="updateStep" />
| </h:column>
| </h:dataTable>
| </h:form>
| </ui:define>
|
| </ui:composition>
| </body>
| </html>
|
The "insertStep" commandButton shows another page where I can insert a Step and
then go back to the UseCase page. The problem is that the UseCase page does not show the
Step added.
When Step collection was a List, the application did work OK.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037933#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...