-
1. Re: Any way to access login-required flag from EL?
gavin.king Jun 2, 2007 12:30 PM (in response to lowecg2004)Add the following class:
@Scope(ScopeType.APPLICATION) @Intercept(NEVER) @Name("org.jboss.seam.core.pages") public class Pages extends org.jboss.seam.core.Pages { public getCurrentPage() { return getPage( getCurrentViewId() ); } }
And then use #{org.jboss.seam.core.pages.currentPage.loginRequired}. -
2. Re: Any way to access login-required flag from EL?
gavin.king Jun 2, 2007 12:37 PM (in response to lowecg2004)Or, alternatively:
@Factory("loginRequired", scope=STATELESS, autoCreate=true) public boolean isLoginRequired() { return Pages.instance().getPage( Pages.getCurrentViewId() ).isLoginRequired(); }
And then use #{loginRequired}.
That's less code in the templates ;-) -
3. Re: Any way to access login-required flag from EL?
lowecg2004 Jun 2, 2007 12:52 PM (in response to lowecg2004)Nifty! Thank you.
-
4. Re: Any way to access login-required flag from EL?
jamoreno Jun 19, 2007 5:37 AM (in response to lowecg2004)i have problems with cache.
My template.xhtml.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//ES"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta content="no-cache" http-equiv="Pragma" />
<meta content="no-cache" http-equiv="Cache-Control" />
<meta content="no-store" http-equiv="Cache-Control" />
<meta content="max-age=0" http-equiv="Cache-Control" />
<meta content="1" http-equiv="Expires" />
Asterisk
<ui:include src="menu.xhtml">
<ui:param name="projectName" value="Asterisk"/>
</ui:include>
<ui:insert name="body"/>
Powered by Seam.
Generated by seam-gen.
But jboss is using cache. I don't want to use cache because i watch old values. Can somebody help me?
Sorry for my bad English and thanks.