-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
I have to send to the new modal dialog a parameter ( the username of the logged in user)
Code of the main controller :
public void onClick$bNewTestList(Event event)
throws SuspendNotAllowedException, InterruptedException, ClassNotFoundException, SQLException, NamingException {
HashMap map = new HashMap<String, String>();
String username = ((Label)page.getFellow("lUsername")).getValue();
map.put("username", username);
final Window dialog = (Window) Executions.createComponents( "WindowNewTestList.zul",null , map);
dialog.doModal();
...........................
The controller code of the new component :
....................
public void onClick$bSaveTL (Event event) throws NamingException, SQLException {
String username = (String)execution.getArg().get("username"); <<<----- here the arg map is empty !!!
TestList testList = new TestList();
testList.setTL_CREATOR(username);
testList.setTL_NAME(tTestListName.getValue());
testList.setTL_DESCRIPTION(tTestListDescription.getValue());
TestListDAO testListDAO= new TestListDAO();
testListDAO.addTestList(testList);
self.detach();
}
.....................