-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
I I have a zul where I must have a valid query param at that page. For the moment the code is like(simplified for readability) this :
@Init
public void init(@ContextParam(ContextType.PAGE) Page page, @QueryParam("catalog") String catalog) {
if (null == catalog) {
redirectToHomePage();
}
page.setTitle(catalog);
try {
checkValidCatalog(catalog);
} catch (CatalogNotValidException e) {
redirectToHomePage();
}
}
private void redirectToHomePage () {
Executions.sendRedirect("index.zul");
}
The problem is that the sendRedirect
is never called.
I did also try :
Executions.getCurrent().sendRedirect();
index.zul
to /index.zul
to ./index.zul
I'm 100% sure that the code is triggered buut the method keep on going and I get a severe error on the page.
For the ones who want more info of the error, I set a viewmodel dynamicly and get this error :
org.zkoss.zk.ui.UiException: view model of 'vm' is null at
.
Hi, I will suggest using initiator or ExecutionInit to do the validation before init the view model.
when you using initiator or ExecutionInit to do the validation, you can use Executions.forward(String)
Asked: 2014-07-03 10:41:40 +0800
Seen: 57 times
Last updated: Jul 04 '14
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]