Pl/sql portlet development; MODE_SHOW_EDIT_DEFAULTS
Hiya, I've got my cool portlet up and running (provider and all), now I need to make it customizable.
I'm having a hard time understanding the preference-stuff and how to utilize it.
I understand to the point where we either show the portlet contents (MODE_SHOW) or one of the other options. specifically MODE_SHOW_EDIT_DEFAULTS.
* How do I render the input form for updating the prefs? The input and the buttons for instance. What should be the target for the form?
* where exactly are preferences stored and how? ok, I think I've got this bit. The preference path and name. Both have to be "initialized" in the register procedure of the portlet (and deleted in the deregister procedure). But at what point/what procedure do we save them after updating the defaults? How to define the default values, are they automatically overwritten when we save the form values?
* when user clicks a button (apply) what to do then?
I'm looking for a simple tutorial(s) or explanation of the basics, so I can get started. Portlet development guide examples went over my head (not very easy to understand), nor are they very plentiful.
I looked at the example files (site_index_portlet), and had a hard time understanding those too... bit too complicated for a beginner.
Thanks,
Edited by: Baguette on 26-Apr-2009 23:48
You could take a look at this, here you should find all the information you need to make your portlet customizable :
http://download-uk.oracle.com/docs/cd/B14099_15/portal.1014/b14135/pdg_pdk_plsql.htm#CHDFDCFJ
Similar Messages
-
Sample PL/SQL Portlet Source Code for Oracle Portal 9ias
Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
I would create a PL/SQL portlet that realizes the following functions:
1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
Thanks a lot....Hi
Here's the code from Helloworld_Portlet example:
procedure show
p_portlet_record wwpro_api_provider.portlet_runtime_record
is
l_portlet wwpro_api_provider.portlet_record;
begin
if (not is_runnable(
p_provider_id => p_portlet_record.provider_id
,p_reference_path => p_portlet_record.reference_path)
) then
raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
end if;
Retrieve the portlet information.
l_portlet := get_portlet_info(
p_provider_id => p_portlet_record.provider_id
,p_language => p_portlet_record.language
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;
Draw the portlet borders.
The has_border property is set at the page region level.
wwui_api_portlet.open_portlet(p_portlet_record.has_border);
Display the content of the portlet in the show mode.
Use the wwui_api_portlet.portlet_text() API when
generating the content of the portlet so that the
output uses the portlet CSS.
htp.p(wwui_api_portlet.portlet_text(
p_string => 'Hello World - Mode Show'
,p_level => 1
if (p_portlet_record.has_border) then
wwui_api_portlet.close_portlet;
end if;
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
Display the about page for the portlet.
htp.p('Hello World - Mode Show About');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
Display the edit page for the portlet.
htp.p('Hello World - Mode Show Edit');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
Display the help page for the portlet.
htp.p('Hello World - Mode Show Help');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
Display the edit defaults page for the portlet.
htp.p('Hello World - Mode Edit Defaults');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
Display the details page for the portlet.
htp.p('Hello World - Mode Show Details');
elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
Display the preview page for the portlet.
htp.p('Hello World - Mode Show Preview');
end if;
end show;
I think you need to add this:
You can get the values of your html-form with this command:
v_hidden_1 varchar2(256);
v_hidden_2 varchar2(256);
v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
You can get the actual URL with this command:
v_url := p_portlet_record.page_url;
Hope that helps.
Regards,
Mark -
PL/SQL Portlet with edit defaults. HOW ???
Hi !
I created a pl/sql portlet that renders html. Now I want a customization option on the "Edit Defaults" page of the portlet. How do I do this ??
In the code of the portlet I set "l_portlet.has_show_edit_defaults" to true. So the Edit Defaults page is show, but it's empty.
On that page I want a variable where you can choose between 3 options. In the procedure where I render the html, I want to read this variable so I can render 3 different things.
Can someone please help me ?I suggest you look at the database services provider in the PDK which is an example provider showing how to do the basic things within a provider/portlet - like customise and edit defaults.
You could also generate a provider using the pl/sql generator - that will produce code that you can use as a starting point for your development.
Basically you have to add code to the show procedure of the portlet to render a different page if the mode is 'MODE_SHOW_EDIT_DEFAULTS'. Look in the samples - it should be clear.
Hope this helps. -
Keeping pl/sql portlets state...
Hi!
I'll keep this as short as possible :)
On my Portal I have one pl/sql menu/navigation-portlet and one or more java portlets.
The menu portlet expands end extracts depending on where you click.
The menu knows its own state (the way it is extracted) by posting parameters (id's) whenever it's clicked on.
Url example:
http://host/portal/page?_pageid=35,66260&_dad=portal&_schema=PORTAL&menu.id=111&menu.p_id=222
By getting the parameters above the menu can restore/reload its own state.
Now to my problem:
When the user navigates to a page where I have a java portlet, the menu is extracted a certain way.
My javaportlet has navigation on itself.
When the user navigates by clicking a link on the java portlet the menuparameters are lost because the javaportlet can't see them, thereby the menus state is lost and "closed".
I find it very awkward/clumsy to put "menulogic" on all portlets in order to be able to keep the state of the menu.
The menuparameters must always be present somehow so that the menu knows how to restore its state!!!
Public parameters perhaps? (how do I make the parameters public for a pl/sql portlet?)
Any hints on how to solve this?You would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
Regards,
Deepak -
PL/SQL Portlets accessed through WAP
Hi,
we have developed some PL/SQL portlets (using portal 10g version 9.0.4.0.99) which needs to be accessed in a WAP enabled mobile. need some documents or references for the same.
Thanks
RamyaYou would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
Regards,
Deepak -
Need advise on SQL,plsql developer career and future
Hi all,
I need all your advise in making an important decisions of my career path.I work in the IT field and have about total 4-5 years of work experience involving development and testing in a product based organization.
Presently-i have got chance since last 4-5 months to work with writing PLSQL code,SQL etc on a part basis. I am very much interested to continue my career path as a PLSQL developer.
But, unfortunately -in the total of my work experience-in the past 2-3 years-i worked with a internally developed DB query language(similar to SQL) and then from last few months with plsql. But this chance to work with PLSQL has been for less time and limited scope after which i will have to work on something different.
Ii want to fully take on my career in SQL,PLSQL as Database Developer.
Please advise me if my thinking seems logical and good and if I could do it. I have planned on applying for relevant SQL,PLSQL profile jobs.
Now, My serious worry and concern is I feel that since i have worked very less with PLSQL-so am low in confidence that I feel i wont be able to answer ,or tell or not knowledgeable enough to be able to clear the technical interviews for SQL,plsql development profile which would need at least some years of experience.
I have started studying and practsing PLSQL,sql by myself for from internet. So, can you all please advise me on how could i prepare myself for hard core technical interviews of SQL,PLSQL knowledge for about 2-3 years expertise.
I know its not much possible to be competent so much in the subject by just studying and practicing.Its easy as saying to study and get it by myself-but i want to try and will put my best for it.
Please help me with your inputs,all interview questions,hard ones-suggestions,links,any study materials, real time problems which i can try solving of SQL, PLSQL development.
Thanks AllHi,
A very good starting point is (in my opinion): [Steven Feuerstein PL/SQL Obsession|http://www.toadworld.com/Knowledge/DatabaseKnowledge/StevenFeuersteinsPLSQLObsession/tabid/153/Default.aspx]. Also the official site [PL/SQL Technology Center|http://www.oracle.com/technology/tech/pl_sql/index.html]
Regards, -
Templates with pl/sql portlets
We plan to have several custom pl/sql providers. What do we have to do if we want to use templates and styles with our custom portlets?
Nilay,
PL/SQL portlets can (and should) utilize the wwui_api_portlet user interface portlet API package to render the portlet content. For additional font classes (not availble through the API) you can simply generate the appropriate HTML output using PL/SQL Web Toolkit (htp.p). -
Problem with public pages having PL/SQL portlets
I am having problem with a public page which has PL/SQL portlets.
When I try to access that page without doing login, it displays everything but the portlets which are database driven.
Is this the way this public page should behave?
Is there anyway by which I can display data to my public pages from PL/SQL portlets without doing login?
FYI PL/SQL portlets are in portal30 schema.Yes, it has is_runnable function and it looks like this :
function is_runnable
p_provider_id in integer
,p_reference_path in varchar2
return boolean
is
begin
If p_reference_path is null the caller may be the provider
framework (i.e. the Refresh operation of the Portlet
Repository).
if (p_reference_path is null) then
The following if statement is the security mechanism that
the portlet implements. It does not have any other semantic
meaning. Any portlet is expected to implement their own
security mechanism.
This security mechanism checks if the current user is logged
on or just accessing the portal through the public account.
if (wwctx_api.is_logged_on) then
return true;
else
return false;
end if;
else
If p_reference_path is not null the caller makes this call as
a security check against the portlet instance.
The security mechanism implemented by this portlet for portlet
instances is null so true is returned. Returning this value
indicates that all users have access to this portlet instance.
return true;
end if;
end is_runnable;
+++++++++++++++++++++++++++++++++++++++++++
What should I need to change with that function? And what exactly is its use?
FYI : The code which I wrote for my portlet is by doing some modification in downloaded service portlet. But I have not altered is_runaable function. -
Is it possible to use ESI within pl/sql portlets?
The idea being to only re-execute the query and redraw the resulting HTML rather than re-load the whole portlet.
Any ideas ?Not sure. I'll look into it. In the meantime, you may get a faster response if you repost your question to the Portal Caching forum. A lot more Portal expertise there.
-
JSF 2.0 portlet development
Hi there,
I'm new in the world of J2EE and I'm trying to develop JSF 2.0 portlets to run on JBoss Portal 2.7.
Unfortunately no JSF 2.0 portlet bridge standard exists (only for JSF 1.2), JBoss Portlet bridge still only supports JSF 1.2 and I didn't find any tutorial to make even a "Hello World" JSF 2.0 portlet.
The only thing I found is the project portletfaces, a JSF 2.0 portlet bridge, but it can only make it work on Liferay (for wich it is optimized), not on JBoss Portal (or even GateIn). Unfortunately for my project I absolutely need to use JBoss Portal...
Can anyone help me? Is it mandatory to use a portlet bridge for JSF 2.0 portlet development? Am I screwed?
Thanks a lot!
Nicolas!802101 wrote:
Hi gimbal2, thank you for your answer :)
So yeah, you confirm what I thought: it's to soon, better wait the maturity of the thing
However, I still have this question: is it possible to develop portlets WITHOUT using a portlet bridge ? Don't I just have to add a few config files (like portlet.xml, jboss-web.xml) and it is on?
Thanks a lotOf course you can. The bridge is there for interoperability between portlets and other (mostly JSF-based) frameworks. There is nothing stopping you from creating portlets without the bridge and you should just do that until you find you actually need it. My development take on 'management by exception' :) -
PL/SQL portlet not showing up in portlet respository for existing provider
I hope you can spare a minute to help. I've created a new PL/SQL portlet and added it to an existing provider package. I've refreshed the portlet repository and refreshed the provider, but the new portlet still doesn't show up. The other portlets in the provider show up fine. Could web cache be the culprit? I'm using Portal R2 9.0.2.6 and PDK July 2003.
Thank you,
KendraThanks!
I did what you suggested, and the page came back:
Portlet Repository Refresh Status
View information about the most recent Portlet Repository refresh, such as who initiated the process, when it was started, and whether it is complete or still in progress. If the refresh is complete, this page also shows when the process finished and whether it was successful. Click View Details to view a more detailed log of the refresh process.
Started By: PORTAL
Started On: April 08, 2002 19:13:38
Completed On: April 08, 2002 19:13:57
Refresh Status: Complete
Refresh Result: Succeeded
View Details
Note that since I had just done a refresh, I would have expected the date to be today's, assuming that the date refers to when the refresh was done, but instead it's April 8th. Strange?
When I clicked on the View Details link, it brought up a page:
Monitor Log Detail Report
Advanced
Error: Unable to perform query (WWV-10202)
ORA-01722: invalid number (WWV-11230)
No row returned.
Not too helpful an error message, huh?
Clicking on the Advanced/Basic links produced identical results (the same exact error message).
The Add Portlets to Region still does not show the portlet I wish to add.
Any additional help much appreciated...
Thanks
Bryan -
Upgrade from SQL server developer 2008 R2 to SQL Server developer 2012
Hi,
We have bought 5 licenses of SQL server developer 2012.
This licenses provided us an option to use SQL server 2008 R2. And we have been using 2008 R2 till now.
But now we want to upgrade to SQL server developer 2012 edition
I want to know the process for up-gradation. When I looked at the licensing portal, it says "This product does not require a product key"
My questions are:
1) Should I download the 2012 version from licensing center and pass the downloaded copy to respective team members?
2) Can the team member download the SQL server 2012 developer edition from Microsoft site and install it on their machines?
3) Do we need to first un-install 2008 R2?
4) How the licensing can be managed in cases of products which say "This product does not require a product key.", i.e. how can I make sure that no more than 5 installations are done by the team
ThanksHi,
We have bought 5 licenses of SQL server developer 2012.
This licenses provided us an option to use SQL server 2008 R2. And we have been using 2008 R2 till now.
But now we want to upgrade to SQL server developer 2012 edition
I want to know the process for up-gradation. When I looked at the licensing portal, it says "This product does not require a product key"
My questions are:
1) Should I download the 2012 version from licensing center and pass the downloaded copy to respective team members?
2) Can the team member download the SQL server 2012 developer edition from Microsoft site and install it on their machines?
3) Do we need to first un-install 2008 R2?
4) How the licensing can be managed in cases of products which say "This product does not require a product key.", i.e. how can I make sure that no more than 5 installations are done by the team
Thanks
1. Developer edition has license associated with it .And yes you can download it if you have subscription.But please be informed that you cannot use Developer edition in production,its not allowed and illegal.
2.You can upgarde from SQL server 2008 R2 to 2012 developer edition by Inplace upgrade method ,you can also follow side by side approach.For side by side approach you have to get new box ,intall OS,then install SQL server 2012 ,move logins and jobs and move
databases by backup restore.You must see supported upgrades
http://technet.microsoft.com/en-us/library/ms143393(v=sql.110).aspx
3.No not ins any case ,please dont do that
4.Licensing question should best be asked with Microsoft licensing expert.
reg process of upgarde first run upgrade advisor and look for error if any.Then run SQL server 2012 setup and in maintenance section select edition upgrade,other process is same as SQL Server installtion
http://www.mssqltips.com/sqlservertip/2505/version-and-edition-upgrades-with-sql-server-2008-r2/
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Design patterns in portlet development
Hello,
I am a student at the Technical University in Munich, Germany and I am working on a university project on design patterns for portlets.
The focus of my work is researching the best practices when developing a web portlet, especially which design patterns are the most suitable for portlets development.
For example, the MVC pattern is one of the most popular design patterns for portlets.
I am writing to you to ask which design patterns are used in the development of your portlets from the SAP Enterprise Portal.
- What design patterns do you use for your portlets?
- Do you use MVC among others?
- Do you have your own design patterns?
- Do you use any templates or guidelines for portlet development that involve design patterns?
I am looking forward to your answer. Any answer would help with the research, as experts interviews are part of my work in the project.
I appreciate any references you consider to be related to my search.
Thank you,
Julia Alexandrescu
Department of Informatics
Technical University Munich
Email: [email protected]Hi raaj,
I have a query related to this.
I am a beginner to portlets.
Say I have an existing struts application.What all do i need to modify or add to make a .portlet file out of it so as to make it deployable in Weblogic 8.1 SP3?
Is adding a portlet.xml enough?
if yes, what would the portlet.xml look like?
Do i need to add a separate class as well?
I couldnt get any sufficient answers from other forums.
Can you please help?
Thanks & Regards,
Nishant -
Open a new window of the brosewr in a pl/sql portlet
I am designing a pl/sql portlet that the inserted thing in a page of portal and that on having executed opens the page of beginning of an own application of my organization.
I want to open this page in a new window of the mariner(browser) but that father remains the area in the page.
Since I can do this?siply add some javascript code that "window.open" in your portlet.
-
How to install SSIS on SQL Server Developer
I have SQL Server Developer. I know I can add in SSIS. Can you tell me the steps to install SSIS on my machine?
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.Hi ryguy72,
Based on my research, in the version of SQL Server 2014, SSDT BI is no longer included in setup. If we require Integration Services design-time features, we must also install SQL Server Data Tools (SSDT). Installs Microsoft SQL Server Data Tools Business
Intelligence project templates for Analysis Services, Integration Services, and Reporting Services that support Visual Studio 2012.
Please download and install Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012 from there:
http://www.microsoft.com/en-in/download/details.aspx?id=36843
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Maybe you are looking for
-
HP Officejet Pro 8500 Premier prints only in black/MAC USER & won't align?
PROBLEM # 1) I've replaced all my ink cartridges, but can't find out why my printer is now only printing in black? I'm a MAC user, so I want to print in color, and am trying to find instructions for a MAC on how to get back to printing in color? ACTI
-
Would like to know the meaning of the Input Signal Channel Indicators on Denon 2311CI
The manual has no information on the meaning of these indicators on the display. For example, why is it that when I have a DVD or Apple TV as the source, the Input Signal Channel Indicators on the left side of the display show only LF and RF (left fr
-
Dear all, Following is my requirement. My condition (ZPPV)is at both header& item level (In M/06, header & item level condition check boxes are ticked). My client requirement is if at header level, I enter condition amount say $ 50 & that perticula
-
Very big problem with JSF about FORM and "id=" for HTML form's elements and
I have discovered a very big problem with JSF about FORM and "id=" for HTML form's elements and java instruction "request.getParameterNames()". Suppose you have something like this, to render some datas form a Java Beans : <h:dataTable value="#{Table
-
i can't stop the scrolling. it is driving me crazy and I can't get any work done. What to do?