I am currently working on providing a customized logout view for CAS. I am following this tutorial:
https://dacurry-tns.github.io/deploying-apereo-cas/ui_how-cas-themes-work.html
I have the custom-theme.properties and everything was set as shown in the tutorial. I also provided customized structural views under templates/[custom-theme]/ and CSS and JS files under static/themes/[custom-theme]/css and static/themes/[custom-theme]/js.
The login screen shows the customized view and renders the custom CSS and JS; however, the logout view is the original default one that is packaged automatically by CAS and not the custom one provided.
It is only when I put the customized structural views under templates/ directly would the custom logout page be shown instead of the default one. The issue here however is that all the static resources (CSS,Scripts,images) can't be accessed and do not work so only the HTML would be changed and not the styles.
How can I make the logout take into consideration all the static resources given to it?
Related
I have created a minimal web app with maven following the tutorial
I want to add my own Java components into the webapp. I found these guides: guide1 and guide2
But I still cannot make a page in Pages App using templates from links above (just do not have that templates)
What am I doing wrong? Should I try smth else? Thanks.
There are 2 types of templates that Magnolia supports if you want to use it to render content as well as supply it. There is a page template that is associated with over page and then there is a component template that is used to render components within the page. Each page can have only one page template associated with them while it can contain multiple components of different type and multiple instances of those components as well.
From what I can see, your first guide will only create structure for templates in the generated module, but not actual templates. And your second guide will only create templating function and component template to demonstrate that function, but not a page template.
So first, you should check that in your module structure, somewhere under /src/main/resources/<your module name>/templates you have subfolder called pages and in that folder you have defined page template. And second, you might want to follow this guide for creating and registering page template.
Or if you want to skip java module altogether and do it just as a light module you can follow the guide here.
I have a custom navigation portlet which includes links to several pages in my portal. Some of these links, though, are "submenu" options that are actually actions of a specific portlet. For instance, take a look at this image:
I have a portlet that displays a list of movies, and can also apply a filter by genre. Those links I've circled in my image should be links to the page with the Movie List portlet, but with a different action for each link.
How can I achieve that? I can only make actionURLs within a portlet, not for other portlets.
You can create actionURLs to another portlet using the following tag provided by liferay and not by the portlet standard:
<liferay-portlet:actionURL plid="" portletName="" />
where "plid" is the layout id of the page that the portlet is in and "portlet name" is the portlet id of the portlet that defines the actions that you want to call.
However, if the links you mention, apply filters to the movies list, then you could also do the filtering on page render and not necessarily using action processing.
I have added a custom page to my GAE app. Everything works fine except that the Admin Console limits the size of the custom page content to 73 em. This is done by the CSS class g-doc-1024.
.g-doc-1024 {
width: 73.074em;
}
Is there a way to change the CSS on this page so that we can benefit from big monitors when using the Admin Console? Is this something that can be achieved (1) through configuration or (2) from the iframe of the custom page?
We want to use custom pages so that everything stays in one place. But the CSS of the Admin Console stops people from using our custom pages.
Updates:
Looks like there is a feature request about this in issue 6629. Please star the issue!
As a workaround, a custom chrome extension could be used to fix the CSS of the Admin Console.
Im new to Liferay . I have downloaded the Liferay Tomcat bundle v5.2.3 Community Edition from the Liferay website. I am able to run it successfully.
I am now trying to create an intranet portal for our company using Liferay . I created an Organization in Liferay and added some pages and child pages to it.
How to add content to a page ?. I mean, i would like to add some text and images etc to the home page and other pages on the portal. I tried the Web Content Display portlet, but it always appears minimized and i have to maximise it by clicking on the maximize button. And also the option to minimize/maximize the portlet is available only when im logged in.
Is there any other way to add HTML content to a page, to make it look like a normal html page which anybody can view when they visit the portal ?
Thank You.
Web Content Display is indeed the easiest choice. You probably just made a mistake when using it.
Add the web content display portet
Click on "add web content" icon at the bottom-left of the portlet
You get a rich text editor, but you can also toggle to HTML view
When you're done click on "Save and approve".
Liferay CMS is built on the concept of template, structure and article.
structure: the element to be rendered, e.g. one text area + one image
template: the rendering of the structure, e.g. image in top-left + text around the image
article: the actual data that corresponds to a structure
But you should be able to edit your first Web Content Display without having an structure nor template. But I suggest you to have a look at them once your are used to the portal.
Once you have added the web content portlet and then added content, you need to configure the layout template you want. Choose the one column layout to let the portlet take up the whole screen.
I think you are asking how to create a new page of type web content.
note the content_id of your web content
make sure your web content is approved, published, and viewable (permissions)
create your page, entering your content_id into the Web Content ID field
I think when you do it this way, you forsake some of the portlet functionality that Liferay brings you.
I am quite new to GWT and going to develop the UI for user-management application using GWT.
I am planning to use existing module which created using Spring/Hibernate. I figured out how to integrate GWT with Spring but I am not sure how to design the layout.
I want two pages:
User registration page (want to embedd GWT widget in HTML)
Administration page (seperate HTML as above with GWT widget embedded)
I am planing to use Spring Security,shall I use simple JSP login page or can I use RIA GWT login widget?
What can I use for above requirements? multiple GWT modules?
You could make 2 modules, one for the login widget, and another for the admin widget. Each widget will insert itself into a div in whichever html (or jsp) page you want.
For example, create a *.gwt.xml for each module, for example: login.gwt.xml and admin.gwt.xml. These files should both be created at the root of your gwt package, for example: com.gwt.example.
Next, create an "Entry Point" class for each (each class will implement EntryPoint). For example, Login.java might look like:
package com.gwt.example.myproject.client;
public class Login implements EntryPoint {
public void onModuleLoad() {
... create loginWidget ..
RootPanel.get("my-login-div").add(loginWidget);
}
}
So, now, when you do a gwt compile, it should create a bunch of files under war/com.gwt.example. The two you're interested in are com.gwt.example.login.nocache.js and com.gwt.example.admin.nocache.js.
Now, you can add these two js scripts into any html and/or jsp page as needed.
To complete the example, you could add the following html to add the login widget:
<html>
....other stuff...
<script type="text/javascript" language="javascript" src="com.gwt.example.login.nocache.js"></script>
....other stuff....
<div id="my-login-widget"></div>
....the rest of your html markup....
</html>
So, when you browse to this html page, it loads compiled gwt javascript, which knows to load onModuleLoad, which looks for div with id="my-login-widget" and inserts the login widget.
I've never used Spring Security, so can't be much help, other than this article looks like it might describe how to make Spring Security work over ajax.
You can create two modules or use only one.
I recently created an application where there was only one page, and the login panel was shown first, like an inner dialog box. When the session expired, the user was prompted to enter his credentials again. But I was going for a 100% no-page-refresh approach. It is nice, but the disadvantage is that the browser will have to download everything upfront. Well… at least until GWT 2.0.