[JBoss Seam] - Re: NPE in BusinessProcessContext
by talekar
Seam 1.2.1.GA
The NPE is caused by context.getVariables() returning null at line number 109 in BusinessProcessContext.
| 98 private Set<String> getNamesFromContext() {^M
| 99 //TODO: note that this is called from Contexts.destroy(), ^M
| 100 // after the Seam-managed txn was committed, but ^M
| 101 // this implementation requires a hit to the database!^M
| 102 HashSet<String> results = new HashSet<String>();^M
| 103 org.jbpm.taskmgmt.exe.TaskInstance taskInstance = getTaskInstance();^M
| 104 if (taskInstance==null)^M
| 105 {^M
| 106 ContextInstance context = getContextInstance();^M
| 107 if ( context!=null ) ^M
| 108 {^M
| 109 results.addAll( context.getVariables().keySet() );^M
| 110 }^M
| 111 }^M
| 112 else^M
| 113 {^M
| 114 results.addAll( taskInstance.getVariables().keySet() );^M
| 115 }^M
| 116 return results;^M
| 117 }^M
|
This method is called when the context is destoryed.
Should line 107 be changed to:
| 107 if ( context!=null && context.getVariables()!=null ) ^M
|
(Sorry about the ^M) Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066668#4066668
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066668
18Â years, 9Â months
[JBoss Seam] - Multiple row selection
by trouby
Hey,
I have created a CRUD actions for a specific entity via Seam-Gen which seems to be nice and clean using EntityHome/EntityQuery,
I would like to add to the generated list another column that has a boolean jsf tag in order to support multiple row selection,
I thought about adding a map to the EntityQuery seam component such as:
| Map<MyEntity, Boolean> rowSelection;
|
and in my facelets code (per row):
| datatable...
| <column>
| <h:selectBooleanCheckbox value="#{myEntityList.rowSelection[myVarOfDataTable]}" />
| </column>
|
I was wondering if there's a better way to pass the selected rows to an java action since this way is a little bit annoying due to the fact that -all- rows are passed but only the selected entities are equal to true,
so iteration + if conditions is required, etc...
Thanks,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066663#4066663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066663
18Â years, 9Â months