smk1
(smk)
September 5, 2011, 12:13pm
1
I have a common task inbox results table (many task types but single task inbox results). In that task results table, I have created a column.
For every row in the table, i want to call an action which will then take taskdata (documentlist) and loop over the list and concatenate all the items and then populate the column in that row.
How to do that ?
smk1
(smk)
September 6, 2011, 8:08am
2
Hi,
I got some clue with the help of my old project mates.
Here it goes :
Add an action (say flattenDocList() ).
Add a data variable of type string in the managed bean
In the beforeRenderResponse() method call this action
In this action created in step 1, iterate over the taskSearchProvider and get the taskdata and convert the doclist to a string.
set the variable created in step 2 with the value got in step 4
Add the data variable as one of the columns of the task list results table
Please do this only if you expect low task volumes. As this is going to evaluate for each row in the task which may have performance hit.
public void flattenDocList() {
String strDocListString = "";
int rowList = this.getTaskSearchProvider().getRowCount();
try{
for(int i=0;i<rowList;i++) {
this.taskSearchProvider.setRowIndex(i);
if(this.taskSearchProvider.isRowAvailable()) {
strDocListString = <<logic>>
}
}
}catch(Exception eException){
error(eException);
log(eException);
}
this.setStrVariable(strDocListString); // set the data variable created
}
protected void beforeRenderResponse() {
// add to refresh task inbox results
this.getTaskSearchProvider().refresh();
this.flattenDocList();
//----------------------------
super.beforeRenderResponse();
try {
PrincipalPickerModalDialog dialog = getDelegatePrincipalPicker();
...
...
...
// add to refresh task inbox results
getTaskDisplayProvider().reset();
//----------------------------
}
catch (Exception ex) {
...
...
}
// reset the display providers so they reload fresh task info
// if we ask for task info that the provider is alreayd aligned on
getTaskDisplayProvider().reset();
getTaskDisplayProviderForDialog().reset();
}
Hi smk,
you can show me how to create common task inbox results table (many task types but single task inbox results) - in step by step
I’m new member in Software ag.
thanks you so much!