Re: Injection Time

Splash Forums PrettyFaces Users Injection Time Re: Injection Time

#21257

RedShadow
Participant

Btw this problem is also related to: http://ocpsoft.com/support/topic/form-action-is-not-rewritten-correctly-1

The first call to getViewPath() delivers a wrong view because the menuEntryName is not injected at that time. The parameters are definitely injected before calling action methods but after the call of the dynaview expression(Just debugged through it to verify).

Because of that, the form action is not rewritten correctly, am I right?

I tried to use the following processor to get things working but it will break the whole JSF Lifecycle(No action methods executed anymore):

public class OutboundUrlProcessor implements Processor{

private static final Logger log = LoggerFactory.getLogger(OutboundUrlProcessor.class);

@Override

public String processInbound(HttpServletRequest hsr, HttpServletResponse hsr1, RewriteRule rr, String url) {

return url;

}

@Override

public String processOutbound(HttpServletRequest hsr, HttpServletResponse hsr1, RewriteRule rr, String url) {

if(!url.endsWith(“.xhtml”) || url.startsWith(“/javax.faces.resource/”))

return url;

return com.ocpsoft.pretty.PrettyContext.getCurrentInstance().getRequestURL().toString();

}

}

Could you give me any hint how to get that whole stuff working?