[JBoss Seam] - Problems with <t:dataList>
by francisco.noguera
this is my source code
xhtml:
--------------------
<t:dataList var="marcador" value="#{EnlazarProveedor.marcadores}" layout="simple" rowCountVar="rowCount"
rowIndexVar="rowIndex"
preserveDataModel="false">
<h6>
<a href="#{marcador.url}url='javascript:EscribirValor()'" id="resultadoURL">
<h:outputText value="#{marcador.titulo}"/>
</h6>
</t:dataList>
----------------------
java Facade:
@Stateless
public class SitiosWebFacade extends ReelFacade implements ISitiosWebFacade {
public List listarMarcadores() {
String consulta = "SELECT a FROM Marcador a";
return getEm().createQuery(consulta).getResultList();
}
public Marcador guardarMarcador(Marcador marcador) {
if (marcador != null) {
if (marcador.getId() == 0)
getEm().persist(marcador);
else
marcador = getEm().merge(marcador);
}
return marcador;
}
}
-------------------------------------------------
java action:
public class EnlazarProveedorMarcadoresAction extends SitiosWebBaseAction implements IEnlazarProveedorMarcadoresAction {
private String cid;
private String arreglo[ ];
private String nombre;
private String parametro2;
/** Creates a new instance of EnlazarProveedorMarcadoresAction */
public EnlazarProveedorMarcadoresAction() {
}
private void validateCid() {
cid = Conversation.instance().getId();
}
@Destroy @Remove
public void remove() {
}
public void iniciar() {
log.info("Inicia el componente SEAM {0}",new Date());
validateCid();
log.info("CID-INICIO: '#0'",cid);
listarMarcadores();
}
public void listarMarcadores(){
marcadores = sitiosWebFacade.listarMarcadores();
Iterator it = marcadores.iterator();
while(it.hasNext()) {
Marcador m = (Marcador)it.next();
System.out.println(m.getTitulo());
}
}
}
----------------
The problem is that the dataList component only return me the first value, but the dataTable return me all the values in my DB table. I don't know which is the mistake, but I really need the help. Thanks for the answers...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094101#4094101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094101
18Â years, 8Â months
[JBoss jBPM] - Is JBPM authorization model broken ?
by Tom Brough
Ok JBPM has gone from challenging to getting on my wick !
Im using jbpm-jpdl-3.2.1 and it seems that no matter what I configure in my processdefinition.xml any user can see / act on any task.
Consider this :-
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2"
| name="IT01">
|
| <!-- Nodes -->
| <!-- start-state -->
| <start-state name="start">
| <transition name="transition1" to="getDetails"></transition>
| </start-state>
|
| <!-- end-state -->
| <end-state name="end"></end-state>
|
| <!-- getDetails - get initial details of IT01 -->
| <task-node name="getDetails">
| <task name="getDetails">
| <assignment expression="user(manager)" />
| </task>
| <transition name="Transition2" to="Check Form">
| </transition>
| </task-node>
|
| <!-- Check Form - IT Manager checks form -->
|
| <task-node name="Check Form">
| <task name="ITManagerFormCheck">
| <assignment expression="user(manager)" />
| </task>
| <transition name="Transition3" to="end"></transition>
| </task-node>
| </process-definition>
|
You would expect <assignment expression="user(manager)" /> to assign the task to manager right ?
when I log in as user, I can start a new process, this presents me with a Task, the task says its assigned to manager, which is what you would expect however when you click examine it goes on to let you fill in the associated form with the task (as user). You can then "submit" that task and transition to the next task (all done as user: user).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094099#4094099
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094099
18Â years, 8Â months
[JBoss Seam] - seam remoting problem
by barbazu
hi, I'm trying to invoke method from bean in CONVERSATION scope, and I'm getting error (NullPointerException in save() because userType is null ).
it happens because seam creates a new instance of my conversationController component instead of using existing one.
in javascript I'm invoking Seam.Component.getInstance("conversationController").save(saveAndCloseCallback);
when I set bean's scope to SESSION everything works fine except that it has to be CONVERSATION scope :(
is there any way to force seam remoting to use existing instance of my conversationController instead of creating new one ?
| @Name("conversationController")
| @Scope(ScopeType.CONVERSATION)
| @Stateful
| public class ConversationControllerAction implements ConversationController {
| ...
| private String userType;
| ...
| otherMethod(){
| setUserType="I";
| }
| ....
| @WebRemote
| public boolean save() {
| if (userType.equals("I")) {...}
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094091#4094091
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094091
18Â years, 8Â months