EditDefaults page for a java portlet

Hello
I'm writing a portlet that shall call an url that returns a xml datastructure and present the data the way i want.
To avoid hard coding the url the portlet shall connect to, i want to create an EditDefaults page where i can specify the url.
I have been looking at the online courses at http://portalstudio.oracle.com/servlet/page?_pageid=832&_dad=ops&_schema=OPSTUDIO (training center).
But i am a bit confused. They are talking about an EditPageRenderer while discussing portlet customization. The way i see it, customization is a way that users can customize how they want the portlet to show, but Edit Defaults is a way that administrators can tell the portlet how to work for all users regardles of the customization. Do i have to use a NameValuePair object to store "Edit Defaults" data?
I would be grateful if someone could show me some source code how to implement an EditDefaultRenderer, and how to enable this in the provider.xml file.
Regards
Per-Jarle Sfther

You need to do go through the exact same steps to make a portlet provide EditDefaults functionality than the steps for Customization.
The two differences are in the provider definition file:
1) Enable rendering the Edit Defaults link for page administrators:
<showEditDefault>boolean</showEditDefault>2) Define a renderer (class, jsp, html,...) that is being used to render the edit defaults screen if different from the customization screen:
<editDefaultsPage>
</editDefaultsPage>If you don't define any renderer, the one specified for customization (editPage) will be used for the edit defaults screen.

Similar Messages

  • Create customised page for adding removing portlets

    Hi All,
    I want to make a customised page which has checkboxes preceeding the portlet name which the user can use for adding/removing portlets . This requirement is similar to the add/remove portlet page provided on my.oracle.com when we go for customization of our page. I would like to know how to go about it and if any reference code exists for the same.
    thanks

    The problem - IF we were the only company using the product - AND this were only an internal portal. That might be acceptable.
    The problem with that is that we are using portal in a way that was not considered by the developers.
    We are using portal to customize (not per department) - but per CLIENT or CUSTOMER. That means - when we implement a site for one of OUR customers. We are not going to be customizing in house per customer. We will be allowing the CUSTOMER to customize their own site (AND their portlets).
    Now - a customer from "ABC Company" does NOT want to customize something and see a whole bunch of generic stuff. They want to see THEIR stuff in "ABC Company" format with their logo etc. Any other way is unacceptable.
    This use case needs to be revisited by the Oracle development team to address this issue if the only option is that we can't customize the page. (I assume that by hunting through the JDK, and looking through code - I might have a chance... but I was hoping for an easier solution).
    -RP

  • Set Java Portlet margin at zero?? specifivally java portlet?

    Hello,
    I have a strange situation.. I have external CSS controlling the margin around HTML code for HTML & Java Portlets (among other things). For HTML portlets it works fine, and visual alignments are ok with the other regions in the page.
    But the same HTML code (keeping aside forms and validations etc) when depolyed as a java portlet shows a margin all around... maybe 5 pixels.
    im working with this in css...
    body {
         margin-left: 0px;
         margin-top: 0px;
         margin-right: 0px;
         margin-bottom: 0px;
    I tried with "Zero" spacing around regions & portlets in the region attributes...
    any ideas?

    Please check to see if the errorneous XML files have zero size. If so, the installation will fail. Try to copy a sample XML from somewhere else.
    BTW, I didn't install the Portlet Container on a standalone OC4J container. I did it on a Oracle 9iAS container in which I have OC4J_xxx where I can copy the sample XML files.

  • Remote Debugging Java Portlets

    Dear experts,
    I am a newbie to JDeveloper and Oracle9iAS Portal.
    I created some Java Portlets with the JDev and the Portlet Wizard and would like to debug them when they are executed in the Portal.
    Any help on how to setup the remote debugging? Are there any documents about this out there?
    Your help is much appreciated.
    Cheers,
    Erik

    Erik,
    This is something we are looking at for enhancements for the Java Portlet Wizard, but for now you remote debugging from the Oracle9iAS OPMN. You can find out more about it here:
    http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-logging-debugging-technote.html
    Sue Vickers

  • Set and read page parameter using a java portlet

    I created a portlet that takes a parameter. I wantt his parameter to be set by the admin in the page parameter section. The portlet that I crated has a parameter. In the providers it has the following:
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>param</name>
    <displayName>displayParam</displayName>
    </inputParameter>
    However, when I go to the page propertie/parameter, I can "bind" a parameter. How can I do that?
    Thanks,
    Marcelo

    Marcelo,
    This was what I've given you above...
    From 7.1.3 Passing Parameters and Submitting Events jump to Section 2.12, "Public Portlet Parameters Support".
    Public portlet parameters:
    You can use a public portlet parameter to pass a value to a portlet. Using portlet parameters, the information that is displayed in a portlet can be specific to a particular page or a user. Portlet parameters are created by the portlet developer and are exposed to the page designer, through the user interface. After adding a portlet to a page, page designers can assign values to the public portlet parameters to make the information displayed in the portlet specific to the page.
    Page designers can assign values to public portlet parameters by providing a specific value (constant), a system variable (for example, the portal user name), or a page parameter. At run time, the portlet receives the values from the sources specified. In this way, page designers have complete control over the source of the parameter, whereas you have complete control over how the data is used after it is transmitted to the portlet.
    ...and in 7.1.3 Passing Parameters and Submitting Events as assumption is "You have followed through and understood Section 6.3.2, "Building PDK-Java Portlets".
    This why I've said to read it carefully... I hope this helps you further...
    Cheers,
    Pedro.

  • Using SSO username/password in java portlet for Database Connection

    Hi all,
    We implemented java portlet with environment Oracle Application server 10.1.2 and Portal 10.1.4
    At present we are picking the database username and password and connect string in properties and our
    java class is reading the properties file and connecting to database to fetch the records.
    Our idea is to not to pick the username/password and connect string from the properties file or
    not to configure the datasource in data_source.xml.
    Our Requirement is who ever login to the Portal(SSO) our java class should pick the sso username/password and
    connect to database to fetch the record(s).
    Because our database users are one to one mapped to sso user(s) of portal.
    We request anyone to guide us how can we do it or suggest any suitable solution for our requirement.
    Thanks
    Dan Tey

    I think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.

  • Problems with page and event paramters in java portlets

    Hi there!
    Following the documentation in "A primer on Portlet Parameters and events" and "Adding Parameters an Events to Portlets" I tried to develop two portlets (who will be at the same page), one showing some content of a repository (with possibilities to browse throw it) and another showing a sitemap of the repositories whole content, presenting links to the content's pages to be shown in the content portlet.
    So I added:
    1. a page parameter called pageMenuID to identify the current content page to be shown in the content portlet
    2. an input parameter for content portlet called portletMenuID. This input parameter is mapped to the page parameter pageMenuID
    3. an event for content portlet called changeContent with output parameter contentMenuID. When this event rises, "go to page" is set to the current page and the output parameter contentMenuID is mapped to the page parameter pageMenuID.
    4. an event for sitemap portlet called changeContentFromSitemap with output parameter sitemapMenuID. When this event rises, "go to page" is set to the current page and the output parameter sitemapMenuID is mapped to the page parameter pageMenuID.
    This is the code for some constants and a function to build the links in the content portlet, that I want to use:
    // page parameter (shouldn't be used here)
    private final static String pageParamMenuID = "pageMenuID";
    // parameter names as given in providers.xml:
    // portlet input parameter
    private final static String inputParamMenuID = "portletMenuID";
    // event name
    private final static String eventName = EventUtils.eventName("changeContent");
    // parameter name for event parameters
    private final static String eventParamMenuID = EventUtils.eventParameter("contentMenuID");
    String getEventUrl( PortletRenderRequest portletRequest, long menuID) {
    NameValuePair[] eventParams = new NameValuePair[2];
    eventParams[0] = new NameValuePair(eventName,"");
    eventParams[1] = new NameValuePair(eventParamMenuID, "" + menuID);
    try {
    return PortletRendererUtil.constructLink(portletRequest, portletRequest.getRenderContext().getEventURL(),
    eventParams,
    true,
    true);
    } catch (Exception e) {
    return "null";
    This is the analog code from the sitemap portlet:
    // page parameter defined on "edit page mode" (shouldn't be used here)
    private final static String pageParamMenuID = "pageMenuID";
    // parameter names as given in providers.xml:
    // event name
    private final static String eventName = EventUtils.eventName("changeContentFromSitemap");
    // parameter name for event parameters
    private final static String eventParamMenuID = EventUtils.eventParameter("sitemapMenuID");
    String getEventUrl( PortletRenderRequest portletRequest, long menuID) {
    NameValuePair[] eventParams = new NameValuePair[2];
    eventParams[0] = new NameValuePair(eventName,"");
    eventParams[1] = new NameValuePair(eventParamMenuID, "" + menuID);
    try {
    return PortletRendererUtil.constructLink(portletRequest, portletRequest.getRenderContext().getEventURL(),
    eventParams,
    true,
    true);
    } catch (Exception e) {
    return "null";
    But what actually happens is nothing. I also tried to construct the links with EventUtil.constructEventLink() with the same result. Checking the produced html-code in the browser shows that the same URLs are produced. So I'm of the opinion, that proper event links are created.
    After checking the sent and received request parameters I came to the conclusion, that the event output parameters are never mapped to the page input paramters, as they should. So I changed the code to the following:
    // page parameter (shouldn't be used here)
    private final static String pageParamMenuID = "pageMenuID";
    // parameter names as given in providers.xml:
    // event name
    private final static String eventName = EventUtils.eventName("changeContentFromSitemap");
    // parameter name for event parameters
    private final static String eventParamMenuID = EventUtils.eventParameter("sitemapMenuID");
    String getEventUrl( PortletRenderRequest portletRequest, long menuID) {
    NameValuePair[] eventParams = new NameValuePair[1];
    eventParams[1] = new NameValuePair(pageParamMenuID, "" + menuID); <-- Note that the page parameter and not the event output parameter is used here -->
    try {
    return PortletRendererUtil.constructLink(portletRequest, portletRequest.getRenderContext().getEventURL(),
    eventParams,
    true,
    true);
    } catch (Exception e) {
    return "null";
    Now everything works fine, including addition of persistent private portlet parameters and further input/page/event parameters as well as working with a third portlet with performs a search (and presents the search results as links which change the content in content portlet).
    But this is actually NOT the way it should work: The names of the page parameters are hard-coded in the portlets, so the roles of page designer and portlet developer are not separated in the way it is presented in the documentation. I coulnd't find a way to map the event output parameters to the page parameters to work this out.
    Now I wonder whether there's some known bug in PDK or perhaps a mistake in the documentation or wether I'm just missing doing the right things. I've already read some postings in this forum concerning this problem (for example how to change the query??? but I think I've done all the things that are suggested there (checked the entries in provider.xml and the proper mapping of page parameters, public (input) portlet parameters and event output parameters, also the way I read the received request parameters and build the links)
    Has anybody an idea what's wrong here?
    Best regards
    Torsten

    Hi Amjad,
    thank you very much for time and effort you spent on helping me solving this problem.
    Unfortunately, I think I already tried what you suggest in your answer, but without success. From my experience, the following two calls:
    1.
    <%!
    private static String eventName = "changeContent"
    private static String eventParamID = "menuID"
    String getEventUrl(PortalRenderRequest prr, long menuID) {
    NameValuePair[] eventParams = new NameValuePair[1];
    // no addition of eventName in the array
    eventParams[0] = new NameValuePair(eventParamID, "" + menuID);
    return EventUtils.constructEventLink(prr, eventName, eventParams, true, true);
    %>
    <a href="<%= getEventUrl(portletRequest, 1234) %>">some link for ID 1234</a>
    2.
    <%!
    private static String eventName = EventUtils.eventName("changeContent");
    private static String eventParamID = EventUtils.eventParameter("menuID");
    String getEventUrl(PortalRenderRequest prr, long menuID) {
    NameValuePair[] eventParams = new NameValuePair[2];
    eventParams[0] = new NameValuePair(eventParamID, "" + menuID);
    eventParams[0] = new NameValuePair(eventName,"");
    return PortletRendererUtil.constructLink(prr, prr.getRenderContext().getEventURL(), eventParams, true, true);
    %>
    <a href="<%= getEventUrl(portletRequest, 1234) %>">some link for ID 1234</a>
    produce identical links. I took the second way because it is easer to add private portlet parameters to the link: just as additional NameValuePairs in the eventParam- Array (name constructed with HttpPortletRendererUtil.portletParameter()), instead of constructing the link "by hand" as mentioned in the javadoc for constructEventLink(). I have to add these private portlet parameters here because when an event from a private parameters owning portlet is fired, the private parameters are lost (in difference to when an event from ANOTHER portlet is sent).
    So I think, when you also look closely to the code snippet I added in the first posting, I made shure that I added the name of the event and not just the event parameters to the link.
    I hope that I understood your answer right. Perhaps you have another idea what might be wrong. Thank you again,
    best regards
    Torsten

  • Passing value to a dynamic page from a pdk-java portlet

    Hi everyone.
    I'm quite new to portlets, so I'll try to present my problem as well as I can:
    I have a PDK-java portlet in which I read some information (like name, location) about user.It works ok.Now I want to use that infomation in another portlet, which is build as a Dynamic Page ( with portletbuilder). How can I do this? I was thinck at session variables, but....
    Thanks a lot

    have you ever got any response??
    i'm facing the same problem.
    thanks

  • Single customisation page for multiple portlets - possible ?

    Is it possible to create a single page to customise multiple portlets ?
    Example : select star sign for Horoscope, city for weather, etc on the same page.
    The preference store APIs allow us to set values, but always assuming that we are in a portlets 'edit' mode - we cannot provide the portlet instance ID ourselves.
    Any ideas ?
    Thanks

    You could save your customization information into a custom DB table, rather than using the preference store (which can only be accessed by a particular portlet instance).

  • Custom Edit Page for Portlets

    Hi
    I'm looking to customize the look and feel of the edit page for a portlet programmatically. I have extended my own class from the DefaultContainerRenderer class and have overridden the renderDesignFormBodyBegin() method.
    And have also made an entry into the provider.xml for this as follows
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>3</id>
    <name>SynergyLatestIDDBDrugs</name>
    <title>SynergyLatestIDDBDrugs</title>
    <description>SynergyLatestIDDBDrugs</description>
    <timeout>40</timeout>
    <showEdit>true</showEdit>
    <showEditDefault>true</showEditDefault>
    <showDetails>true</showDetails>
    <containerRenderer>com.tysynergy.container.SynergyLatestIDDBDrugsContainer</containerRenderer> <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="com.tsynergy.renderer.SynergyLatestIDDBDrugs"/>
    <editPage class="com.tsynergy.renderer.SynergyLatestIDDBDrugsEdit"/>
    <editDefaultsPage class="com.tsynergy.renderer.SynergyLatestIDDBDrugsEdit"/>
    </renderer>
    <personalizationManager class="oracle.portal.provider.v2.personalize.PrefStorePersonalizationManager">
    <dataClass>com.tsynergy.personalize.SynergyLatestIDDBDrugsPersonalize</dataClass>
    </personalizationManager>
    </portlet>
    But I get the following error -
    oracle.portal.utils.xml.v2.NodeHandlerException: Class oracle.portal.provider.v2.DefaultProviderDefinition has no set or add method for tag "containerRenderer"
    Has anyone come across this before?
    Deepak

    Hi
    Thanks.
    I got rid of my earlier error as I was using the conatinerRenderer tag in the wrong way. It should have been
    &lt;containerRenderer class="com.tsynergy.container.SynergyLatestIDDBDrugsContainer"/&gt;
    Now I get to display the my edit content; But I still haven't been able to get rid of the top default portal banner that appears on my edit page. It has the default logo gif and the link to the home page.
    I can now put my own form and &lt;input&gt; types, Just need to get rid of the default banner now.
    Deepak

  • Creating a web provider for java portlets

    Hi all,
    i'm using
    - Oracle Database Server 8i (Rel3 - 8.1.7.1.1)
    - Oracle 9i Application Server (Rel2 - 1.0.2.2.2)
    - Oracle Portal 3.0.9.8.2
    I'm trying to crate a web provider in order to use java portlets, but there's a problem with:
    "An unexpected error occurred: ORA-29531: no method getPortletList in class oracle/webdb/provider/web/HttpProviderDispatcher"
    Does anyone know why?
    I've searched for the class mentioned above but I can't find it..
    thanks for the reply,
    Alessio ([email protected])

    The problem is probably caused by prohttp.jar becoming invalid or corrupt inside the database. The file is found in <IAS_HOME>/portal/lib (or jlib). Use the following command to reload.
    loadjava -resolve <portal user>/<portal pass> <file path>/prohttp.jar

  • Changing Default Portlets on My Pages for All Users

    Hello,
    I want to add the Collaboration My Projects Portlet on the default My Pages that comes out of box during a portal install.
    I did trying going to Default Profiles - Edit Profile Layout - went to the My Pages as the default profile and added My Projects.
    Then finished up.
    However, when logging in as a user (via Active Directory which was previously synced) - nothing had changes.
    Suggestions how to add My Projects on a My Page for all users?
    Thanks,
    V

    Vivekvp wrote:
    Great...I added a new one, and it dropped it to the bottom of the page, in the middle column.
    Any idea on how to move it to the top left by default?
    Help...again?
    VRandom thought, but you might want to try changing the "Mandatory Portlet Priority". I know the portlet isn't mandatory, so it SHOULDN"T work, but I've seen whackier things:)
    Good luck!

  • Error in configuring Custom Error Pages for Faces Portlets

    According to
    http://e-docs.bea.com/wls/docs92/schemaref/controls-netuix/http.www.bea.com.servers.netuix.xsd.controls.netuix.1.0.0/element/facescontent.html
    you can specify an errorUri attribute on the facesContent object for the error page.
    <netuix:facesContent contentUri="/testList.jsp" errorUri="/error.jsp"/>
    WebLogic Workshop even allows setting this in the tool.
    However, the errorUri never gets picked up and the following error shows up.
    <BEA-423266> <No setter for property :: errorUri.>
    Anyone faced this problem. Is there any other alternative to specify a custom error page for JSF portlets.
    Please note that the errorUri works fine for the jspContent tag used for JSP Portlets.

    Hi Sanjeev,
    You need to check if you have access to AXF_CONFIGS table. Check if you have ran GRANT_ACCESS.sql script which has below grant commands.
    grant execute any type to apps;
    grant create type to AXF;
    grant select on AXF.AXF_CONFIGS to apps;
    v_formId AXF_CONFIGS.FORMID%TYPE; means tableName.columnName%type;
    so looks like when you are running AXF_EBS_SOLUTION_DATA.sql you are not able to access AXF_CONFIGS table.
    Hope this helps.
    Regards,
    Amol Gavali.

  • JDeveloper setup steps for pdk java and portlet container - ver 10.1.2

    Hi fellows,
    Can someone please point to some really not-confusing guide to setting up pdk java and portlet containers on jdeveloper 10.1.2.
    Problem is, I went through several documentation links and they keep pointing around to steps that are followed if you wish to have a stand-alone OC4J. JDeveloper 10.1.2 also had a preconfigured OC4J with it. I wish to make use of that and configure it for Oracle Portal editings for version 10.1.2.
    thank you for your help.

    I have some documentation that I tried following:
    For PDK-Java installation, here is the link to documentation.
    http://www.oracle.com/technetwork/middleware/ias/installing-089002.html
    However, what is confusing is what to do if you just wish to use the preconfigured OC4J container that comes with Jdeveloper 10.1.2.
    Experts, can you please clear this out please?
    Thanks!

  • Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Nope. The iPad (and iPhone and iPod touch) cannot execute Java applets. It's a limitation in iOS from the beginning (just like lack of Flash). You will either need to use a desktop computer or access a desktop computer via RDP or VNC to access that page on iPad.mIn short: there is no native way to use a Java applet on iOS.

Maybe you are looking for