[NEWSENDER] - Re: [NEWSENDER] - Re: About the theme function - Message is from anunknown sender - Message is from an unknown sender
Li Wei Nan
liweinan at chinaedu.net
Fri Aug 1 01:27:20 EDT 2008
I forget to tell that I'm using phpCAS client. And using
logout('"services"=>"my service address"'); will make the logout
display correct theme.
Thanks,
- Li Wei Nan
On Jul 31, 2008, at 11:57 AM, Li Wei Nan wrote:
> Hi Everyone,
> Thanks for all your help and now the theme works perfectly!
> Here's one more question, how can I give user the customized page
> when logging out? Now the connected application call "cas/logout?"
> to do the logout. But this will give user the default theme.
>
> - Li Wei Nan
>
>
>
>
>
> On Jul 30, 2008, at 10:11 AM, Li Wei Nan wrote:
>
>> Thanks for you all. I think I get what you said. The only thing I'm
>> missing is to use spring tag inside the view:
>>
>>> <div id="header">
>>> <div id="leftborder"> <spring:theme code= "> </div>
>>> <div id="rightborder"><h1 id="app-name">Central Authentication
>>> Service</h1></div>
>>> </div>
>>
>> And this will let the whole system switch the theme correctly, and
>> it's not a simple copy-paste work from 'default' theme.
>>
>> Thanks a lot!
>> - Li Wei Nan
>>
>>
>>
>>
>>
>> On Jul 30, 2008, at 5:47 AM, dale77 wrote:
>>
>>>
>>>
>>> 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= "> </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.
>>>
>>> _______________________________________________
>>> Yale CAS mailing list
>>> cas at tp.its.yale.edu
>>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu
>> http://tp.its.yale.edu/mailman/listinfo/cas
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080801/4214574e/attachment.html
More information about the cas
mailing list