Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Java EE (J2EE) и Spring > Как можно использовать redirect в tapestry?


Автор: Irbis24 4.9.2006, 13:10
Как можно использовать redirect на google.com внутри моей формы в портлете, используя "submit" или другой компонент? 

Я пытаюсь сделать так: 

View.html 
<form jwcid="form@Form" listener="listener:doAction"> 
<input type="submit" value="send"/> 
</form> 

View.java 
public abstract class View extends BasePage{ 
@InjectObject("service:tapestry.portlet.ActionResponse") 
public abstract javax.portlet.ActionResponse getActionResponse(); 

public void doAction() throws PortletModeException, IOException { 
getActionResponse().sendRedirect("http://www.google.com"); 
} 
} 

Но это не работает!!! 

Я получаю следующую ошибку: 

org.apache.hivemind.ApplicationRuntimeException 
Property 'actionResponse' of <OuterProxy for tapestry.portlet.PortletRequestGlobals(org.apache.tapestry.portlet.PortletReque stGlobals)> is null. 

java.lang.NullPointerException 
Property 'actionResponse' of <OuterProxy for tapestry.portlet.PortletRequestGlobals(org.apache.tapestry.portlet.PortletReque stGlobals)> is null. 

Help me please!!!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)