[NEWSENDER] - Re: About the theme function - Message is from an unknown sender
dale77
Dale.Ogilvie at trimble.co.nz
Tue Jul 29 17:52:15 EDT 2008
Scott is right in that the instructions at
http://www.ja-sig.org/wiki/display/CASUM/Theme+Control refer to adding
individual <spring:theme> tags to your customized view files. This works
quite nicely on a per service basis. There are some more slightly
out-of-date instructions here:
http://www.ja-sig.org/products/cas/server/views/index.html
To override the files themselves from default we use:
cas.properties
cas.themeResolver.defaultThemeName=theme1
cas.viewResolver.basename=theme1_views
WEB_INF/classes/theme1_views.properties (which begins as a copy of
default_views.properties)
### Login view (/login)
casLoginView.(class)=org.springframework.web.servlet.view.JstlView
casLoginView.url=/WEB-INF/view/jsp/theme1/ui/casLoginView.jsp
etc....
And so in your casLoginView.jsp you might have a spring theme tag like:
<div id="header">
<div id="leftborder"> '<spring:theme code="homepage" '> </div>
<div id="rightborder"><h1 id="app-name">Central Authentication
Service</h1></div>
</div>
The above tag would refer to a value in a theme specific properties file in
WEB_INF/classes/theme1.properties:
homepage=http://www.theme1.com/
Dale
Li Wei Nan wrote:
>
> Sorry I still cannot get it work. Following the instruction on wiki,
> just the default theme will works. But the run-time configuration
> won't work.
>
>
> Here are all my configuraions:
>
> 1. in cas-servlet.xml:
> <!-- Theme Resolver -->
> <bean id="themeResolver"
> class="org.jasig.cas.services.web.ServiceThemeResolver"
> p:defaultThemeName="$
> {cas.themeResolver.defaultThemeName}"
> p:servicesManager-ref="servicesManager"
> p:argumentExtractors-ref="argumentExtractors" />
>
> <!-- View Resolver -->
> <bean id="viewResolver"
> class="org.springframework.web.servlet.view.ResourceBundleViewResolver
> "
> p:order="0">
> <property name="basenames">
> <list>
> <value>${cas.viewResolver.basename}</
> value>
> <value>protocol_views</value>
> </list>
> </property>
> </bean>
>
> 2. in cas/WEB-INF/view/jsp: we have a new set of theme: theme1
>
> .
> |-- brokenContext.jsp
> |-- default
> | `-- ui
> | |-- casConfirmView.jsp
> | |-- casGenericSuccess.jsp
> | |-- casLoginView.jsp
> | |-- casLogoutView.jsp
> | |-- includes
> | | |-- bottom.jsp
> | | `-- top.jsp
> | |-- serviceErrorSsoView.jsp
> | `-- serviceErrorView.jsp
> |-- errors.jsp
> ...
> `-- theme1
> `-- ui
> |-- casConfirmView.jsp
> |-- casGenericSuccess.jsp
> |-- casLoginView.jsp
> |-- casLogoutView.jsp
> |-- includes
> | |-- bottom.jsp
> | `-- top.jsp
> |-- serviceErrorSsoView.jsp
> `-- serviceErrorView.jsp
>
> 3. in cas.properties:
> ...
> cas.themeResolver.defaultThemeName=default
> cas.viewResolver.basename=default_views
>
> #cas.themeResolver.defaultThemeName=theme1
> #cas.viewResolver.basename=theme1_views
> ...
>
> 4. In service management console, I set the theme for :
> http://172.16.1.201
> */** to 'theme1'
>
> 5. When I access this app server, it redirect me to CAS:
> https://edupass.chinaedu.net/cas/login?service=http%3A%2F%2F172.16.1.201%2Fdiscuz%2FEdu_login.php%3Faction%3Dlogin
>
> But I still get the default theme.
>
> I don't use any style sheet so I don't have <spring:theme ..> tag in
> new theme.
>
> What I'm doing wrong?
>
>
> - Li Wei Nan
>
--
View this message in context: http://www.nabble.com/About-the-theme-function-tp18709218p18721848.html
Sent from the CAS Users mailing list archive at Nabble.com.
More information about the cas
mailing list