jsf - Disabling bean construction with a ThrowIllegalArgumentException -
how can disable (under circumstances) direct access group pages controlled single bean without using serlvets or filters? right have :
public somebeancontroller() { try { facescontext.getcurrentinstance().getexternalcontext().redirect("/somewhere.xhtml"); } catch (exception e) { e.printstacktrace(); } throw new illegalargumentexception("direct access disabled..."); } public somebeancontroller(integer someid) { this.someid = someid; } the default bean constructor redirect more appropriate page. other constructor called bean when need access group of pages.
thank's!
Comments
Post a Comment