Customize portlet header
Hi everybody,
i use Portal 902.
i just customized the color header of my portlet, i chose a non preset color by specifying the hexdecimal value i need.
I want now to define the rounded edge corner style for my portlet header. But of course the right and left images are not define so i created them and put it on the %ORACLE_HOME%/portal/images directory of my instance.
It seems like my images doesn't exist.
I think i must register my image but how?
Is anybody know how to ?
I will appreciate any help.
Thanks
bye
Florent
Hi,
Please check the following article: http://technet.oracle.com:89/ubb/Forum70/HTML/000965.html
Hope this helps.
Regards,
Jatinder
Similar Messages
-
Removing customization link from portlet header.
Hi,
Could u suggest me out of the 2 ways to remove customization link from portlet header.I am using the default stock prices portlet in my page.
Where and how should i change the provider.xml file.
If not this how can I setShowEdit(False) which is one of the methods in MutablePortlet interface.How can i find this code related to Stock portlet.I mean where can we have access this code where the provider API's are used for some of the readymade portlets that oracle provides.
I am using release 1 of oracle portal.
Thanx
VipulHi,
I see two things that you could try :
first try to set the security level at the portlet level, then allow users to display your portlet, not to customize it. I know it's possible with tabs, maybe it can apply to you.
Else you also can modify the package of your portlet (or the provider.xml file if it's not the package). You should read the pl/sql code and find the variable concerning the customization link in the rendering part. It may be set to 'tru', just set it to 'false' and recompile.
I've done it when installing some portlets and it works : that way I could translate the portlet in franch, remove the help link, remove the detail link, and so on...
Hope this helps,
Gael. -
Is it possible to substitute icons for the text specified in the portlet header for help, about, etc.?
If yes, how is this accomplished?Hi,
Its possible to replace the default text items like "Customize", "help" etc. with images in the rendered portlet. The above texts are a part of the portlet header that gets constructed by the Portlet Container. Constructing the portlet header involves constructing the title link & then adding the action parameter links for all the modes that have been enabled using the provider.xml. The title part is constructed by the method renderTitle() in oracle.portal.provider.v2.render.DefaultContainerRenderer while action parameters (i.e. "Customize","help" etc) are rendered by renderActions(). This method internally invokes renderAction() which by default would render the locale specific text for that mode. So your requirement is to change the default behaviour of this method to render images as links for respective modes in place of the default text.
You can achieve this by creating your own Container Renderer by extending the DefaultContainerRenderer and overriding the method renderAction(). While implementing the method, you can use a switch construct to add different images for different modes. -
Hi all,
Is there a way to not display the "customize" link on the portlet header? I am currently using the portlet header to display the name of the form that the user will work on, and there cannot remove the header.
ThanksHi,
Please check the following article: http://technet.oracle.com:89/ubb/Forum70/HTML/000965.html
Hope this helps.
Regards,
Jatinder -
How to add links to portlet header ?
I want to add a print link to the portlet header, along with Customize, Help, About etc
Is there any way to do this ? (Using PDK, java or pl/sql)Andrew,
From web providers' perspective, you should be able to do this. Constructing the portlet header involves constructing the title link & then adding the action parameter links for all the modes that have been enabled using the provider.xml. The title part is constructed by the method renderTitle() in oracle.portal.provider.v2.render.DefaultContainerRenderer while action parameters (i.e. "Customize","help" etc) are rendered by renderActions(). This method internally invokes renderAction() which by default would render the locale specific text for that mode. So to fulfil your requirement you will have to create your own Container Renderer by extending the DefaultContainerRenderer and overriding the method renderActions() to incorporate one more link on the header.
Having said that, all the links on the portlet header are mapped to a unique mode. I don't think that you should be creating a new mode for this (would involve extending a lot of JPDK framework classes), but am not aware of how the flow will happen once the "print' is clicked by the user. Perhaps, JPDK gurus can throw some light on this.
Regards,
Abhinav -
Changing Portlet header text dynamically
I trying to change the Portlet header text depending on the value of a selected page parameter. e.g. I selected the FTSE 100 stocks link on a page and I want the portlet to display the list of stocks and the banner to say "FTSE 100" similarly if I pick the NASDAQ link I want the same portlet to list the NASDAQ stocks and the banner to say "NASDAQ". I have the stocks changing using dynamic pages and page parameters but I can't seem to get at the portlet banner title variable. I working on the latest portal release.
Hi Lisa,
It just so happens that the "Portlet Wizard" in JDeveloper creates the default edit view to modify the page title. Here is the code it created:
<pre>
// Get the PortletRenderRequest and Writer
PortletRenderRequest pr = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
PrintWriter out = pr.getWriter();
// Display a greeting
String userName = pr.getUser().getName();
out.println("<p>Hello " + userName + ".</p>");
out.println("<p>This is the <b><i>Edit</b></i> render mode!</p>");
// Customize the portlet title
String actionParam = PortletRendererUtil.getEditFormParameter(pr);
String action = request.getParameter(actionParam);
String title = pr.getParameter("filebrowse_title");
NameValuePersonalizationObject data = null;
try
data = (NameValuePersonalizationObject)PortletRendererUtil.getEditData(pr);
catch(AccessControlException ae)
throw new ServletException(ae);
catch(PortletNotFoundException pnfe)
throw new ServletException(pnfe);
// Cancel automatically redirects to the page, so
// will only recieve OK or APPLY
if (action != null)
data.setPortletTitle(title);
try
PortletRendererUtil.submitEditData(pr, data);
catch(AccessControlException ae)
throw new ServletException(ae);
return;
// Otherwise just render the form
title = data.getPortletTitle();
out.println("<table border='0'><td width='20%'>");
out.println("<p align='right'>Title:</p></td><td width='80%'>");
out.println("<input type='TEXT' name='filebrowse_title' value='" + title + "'>");
out.println("</td></table>");
</pre>
I hope this helps!!!
-Sean -
I'm working with a report that I have displayed in a portlet,
actually, the customization form is displayed in a portlet. I
want to display the resulting report in the same portlet, but
since that looks to be pretty difficult, I'm willing to settle
for showing it in a new page. But, I'd like to have the same
type of header on the report results page. If I set the user
interface for the report to have a header, the report
cutomization form will also have that interface inside the
portlet which just looks stupid. Can someone tell me how I can
get a different interface, or at least a different header, or no
header, on a report customization form in a portlet while having
a header on the report itself in its own page?
I'd appreciate any thoughts that someone has on this.
Nate BaxleyThe page style allows you to define only one color for the portlet header. You could try adding some HTML portlets to your page that override the style used for the portlet header.
Regards,
Jerry -
Portlet header title as a link
Is it possible to make portlet headers title as a link and would be defined with my chosen URL?
I've noticed that linking (whwn editing region) is used only for Customize, Help, About, Collapse/Restore...You can achieve this if you create portlets programmatically. When you draw the portlet header you can specify what links are available from that header (i.e. details/title, customize, help, and about).
-
Customizable and non-customizable Portlets
Hello
We are trying to design a web site that will allow a central area administrator to publish a few portlets in a page (Navigation bar, banner etc.). This cannot be modified by users.
However, there are a few portlets within the same page which the user wants to modify (typically HTML portlets, news etc.)
How do I do this? Can I have portlet level security access (modifiable or not?)?
Thanks
Tam.
nullCustomization privilege can be granted by page or by tab. The right to customize a portlet is granted by the portlet developer. If the user has any level of customization privilege on a page, and the portlet supports customization, the user will see the customize link.
For folder portlets, the page owner can turn off the customize link in the Edit Defaults page for the portlet (this requires release 3.0.9 of Portal).
For other built-in portlets that display a Customize link by default (such as the HTML portlet), you can turn off the portlet header to prevent users from customizing the portlet.
If you're building custom portlets or using Portal application components, you can explicity grant customize privilege to users and groups.
As for Add/Move/Delete, in 3.0.9 the folder portlet allows you edit items directly in the portlet - you don't have to navigate to the content area.
I hope that's the information you're looking for.
Regards,
Jerry -
Supressing Portlet Header programatically
All,
I need to supress the Portlet header. I would like to do this without using the customize tab. The API says that the portlet_runtime_record has the has_title_region attribute. How can I set this value to false, so that the header is suppressed automatically.
Rgds
SanjayThat's right because you have multiple provider instances deployed. Each provider has its provider.xml for its configuration. To locate the appropriate provider.xml you need to identify the provider instance. For instance if you use the JPDK sample provider in your portal installation (http://host:port/jpdk/providers sample) then the location of the provider.xml will be $ORACLE_HOME/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/providers/sample.
Note that the location of the provider.xml within the deployed provider application is defined in the sample.properties located in $ORACLE_HOME/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/deployment.
You now have access to the provider settings and you can set the renderer for each portlet of the provider individually. By default the standard portlet renderer class is used. You need to write you own renderer class. For more information about portlet development you need to look at the documentation. Starting point is http://www.oracle.com/technology/products/ias/portal/index.html -
API to reference portlet header/title?
I am wanting to know the pl/sql api to access the actual portlet header or title bar, whatever you choose to call it. I can access subheaders, but I cannot figure out how to access the actual top header. What pl/sql api will do this?
You can achieve this if you create portlets programmatically. When you draw the portlet header you can specify what links are available from that header (i.e. details/title, customize, help, and about).
-
Repost: suppressing portlet header
All,
Since my first post, I have learnt that the header (or has_title_region) can be suppressed by setting this in the provider.
I would like the portlet to have a header when say the user is not logged in and not have a header when the user is logged in.
Any tips
SanjaySanjay,
You can control this in the show procedure of your portlet.
Add a call to check whether the user is logged in (if (wwctx_api.is_logged_on) then ... ) before calling the wwui_api_portlet.draw_portlet_header API.
The typical template portlet that PDK provides (the STARTER sample) has a piece of code you need to modify in the show procedure. Added that for your convenience.
if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
if (p_portlet_record.has_title_region) then
Draw the portlet header and specify what links are available
from that header (i.e. details, customize, help, and about).
The has_title property is set at the page region level.
wwui_api_portlet.draw_portlet_header
p_provider_id => p_portlet_record.provider_id
,p_portlet_id => p_portlet_record.portlet_id
,p_title => l_portlet.title
,p_has_details => true
,p_has_edit => true
,p_has_help => true
,p_has_about => true
,p_referencepath => p_portlet_record.reference_path
,p_back_url => p_portlet_record.page_url
end if;
------- -
I have created my first JSR-168 portlet and consumed it in the JSF page. Everything looks good with my AJAX stuff except my JavaScript does not get called when clicking on the "Refresh" action from the portlet header menu. My portlet calls the JavaScript when the page loads. It works correctly when I reload the entire page as well. However, when I use the portlet header to refresh, the script does not get called, and therfore, does not dispaly HTML content. What am I missing? Is there somewhere I need to tell in the code to call particular JavaSriipt for this action?
I have JavaScript triggered by the onLoad event. Whatever the "Refresh" action triggers, I need to kick off my JavaScript the same way as onLoad event. I just do not know where to make the connection between refresh action and my JavaScript call to the onLoad event.
-
I have created my first JSR-168 portlet and consumed it in the JSF page. Everything looks good with my AJAX stuff except my JavaScript does not get called when clicking on the "Refresh" action from the portlet header menu. My portlet calls the JavaScript when the page loads. It works correctly when I reload the entire page as well. However, when I use the portlet header to refresh, the script does not get called, and therfore, does not dispaly HTML content. What am I missing? Is there somewhere I need to tell in the code to call particular JavaSriipt for this action?
I have JavaScript triggered by the onLoad event. Whatever the "Refresh" action triggers, I need to kick off my JavaScript the same way as onLoad event. I just do not know where to make the connection between refresh action and my JavaScript call to the onLoad event.
-
How can I add an image above my portlet header ?
Hi,
Currently I am writing a portlet.I would like to add an image above the portlet header just like the standard portlets have.
Does somebody know how I should realise this ?
thanks
JeromePlease take a look at FAQ at: http://technet.oracle.com:89/cgi-bin/ubbmisc.cgi?action=getannounce&ForumNumber=66&Start=2451891.99&End=2452276&Session=
Maybe you are looking for
-
XFCE4 & Preferred Applications; Mail reader 'claws mail' wont open
Configuring my XFCE4 setup I wanted to set Claws Mail as my standard mail client, such that when I open links in my browser pointing to mail addresses (mailto:[email protected]) that specified mail clilent automatically opens and lets me type my mail
-
I have a 3G iPhone and have changed my email and Apple ID on my laptop/iTunes account. How do I get this new ID to show on my 3G iPhone. I still have the old ID and cannot update my Apps. PLEASE HELP !! thanks, Nosuh
-
How to get LOV button in Forms 10g
Hello Everyone, I have created a form in 10g and also create a LOV for item (DESIGNATION). But i can't get/see the LOV button, always i have to press Ctrl+L. And then from the list item can select. I need that button nearer to particular item for whi
-
Can't seem to activate trial version of Photoshop Elements 6 (Mac)
I downloaded the trial version of Photoshop Elements 6 for my Mac earlier this morning to check it out and purchased a license online not too soon after. The serial that was sent to me from Adobe's shop does not seem to work in activating the trial v
-
How to assiciate Aironet 802.11 adapter to a access point?
I installed a adapter in my laptop. When I tried to use it at home with a wireless router, it found the channel however "not assiciated". How can I manually associate it? Is it supposed to do it automatically? Thanks Gary