Hello, Im simply trying to display a list of the jbpm users and their passwords, something very similar to what the login.jsp does on the jbpm webapp but I simply can't get it to work, this is what I'm doing:
private static List getUsers()
{
//Session session = JbpmContext.getCurrentJbpmContext().getSession();
Session session = JbpmConfiguration.getInstance().getCurrentJbpmContext().getSession();
IdentitySession identitySession = new IdentitySession(session);
return identitySession.getUsers();
}
private static List createUsersList()
{
List usersList = new ArrayList();
Iterator iter = getUsers().iterator();
while (iter.hasNext())
{
User user = (User) iter.next();
usersList.add(new Usuario(user.getName(),user.getPassword()));
}
return usersList;
}
<h:dataTable value="#{loginBean.usersData}" var="user">
<h:column>
<h:outputText value="#{user.username}" />
</h:column>
</h:dataTable>
public class Usuario {
private String username;
private String password;
public Usuario(String username, String password)
{
this.username = username;
this.password = password;
}
. . .
}
javax.servlet.ServletException: Cannot get value for expression '#{loginBean.usersData}'
I forgot to post this important part
this goes in the same segment as the first code segment
public List getUsersData()
{
if(usersData.size()==0)
usersData = createUsersList();
return usersData;
}