Developing portlets for dummies (sql queries)

Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)
So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.
edit: ok, stupid user error; I suck at using Toad, so I was looking at the wrong schema altogether :D So now i see the public views and packages, so forget that bit of the question.
But still, I cannot see even wwsbr_all_folders -view, much less the wwpob_page$ -table. I cannot see any way to find the pages that are in my page group. Somehow it must be doable, right?
Have I done something wrong, missed a step in enabling my test-provider / schema perhaps? I don't really know what I'm doing, but I followed instructions here: http://home.c2i.net/toreingolf/oracle/portal/my_first_plsql_portlet.htm (excellent instructions, thanks!)
So should my portlet be able to access those tables or not? How the heck has the third partly portlet maker done it?
i'm on OracleAS Portal 10g Release 2 (10.1.4)
Edited by: Baguette on 23-Apr-2009 05:13
Edited by: Baguette on 23-Apr-2009 05:32

i see your perspective now. and let me give a perspective to my first reply too.
what i proposed to you was the answer of what i quoted in the message. that is, why didn't you see those views in the new schema you created! and it is still ok but it is done in the portal schema for which you should have privielges too and i assumed you had. my mistake!
now, i can relate your privacy concerns with your earlier message:
Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
+Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)+
+So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.+
- by downloading an example portlet, you probably mean you created a new schema. because provsyns work on a schema.
- if you are not the administrator of the portal, and may not be able to access some portions of the portal, it means that you do not use the portal user (the user which serves as the owner of the portal schema).
- now, your plan to create a new schema and give those privielges would still not work. because, by creating a new schema you cannot sneak in to the oriignal portal schema if you do not have privileges to do it. obvious, right? otherwise, it would be a vulnerability of the software that you can see what you are not allowed to see by creating a new schema.
- however, there is a bright side here. the views give records based on your privileges.
- so if your administrators have generated them already or if they generate on the original portal schema, then you may see the pages and items that you have privileges to see and no more.
so now, you may ask the administrators if they have already done it, and if not, then if they would be willing to do it.
hope that helps!
AMN

Similar Messages

  • CreateDirectSqlQuery for "raw" SQL queries?

    I need a query that will return a count from a SQL query. SQL is needed (RQL not sufficient) because the query requires joins that are not part of the explicit ATG model. createDirectSqlQuery sorta seems like it might support this, since it has a "returned" props list, but there does not seem to be any documented way of passing in parameters to the query. It's funny because RepositoryPropertyDescriptor has the capability of storing a value (along with class, description, etc), but the pInputParameterClasses parameter is an array of classes with no values.
    Is this the right call for ad-hoc queries? And, if so, how do you pass in values for the "?" substitutions?

    Hi,
    I missed that GSAView is not in the API doc. It's basically the implementation class of the RepositoryView that is used. Obviously the method I mentioned is not document or supported, though I have no reason to think it won't work. I think overall you are right and there is documented and supported way to pass parameters for a direct SQL query. This sounds like an oversight in the ATG API.
    Will a SQL passthrough query work for your purposes? The only difference is that SQL passthrough query does not support stored procedures and won't preload other properties besides the id (e.g. after querying the item, to get a particular property value would involve more queries done automatically the GSA code on a getPropertyValue() call).
    Thanks.
    Nick Glover
    Oracle Support for ATG Products

  • Database package for handling SQL queries using JDBC/ODBC bridge

    I perform a package using J2ME which can stores the contact.It consisting of the fascilities of the editing,Inserting, Deleting,Updating records
    i have write import statements as
    import javax.microedition.midlet*;
    import javax.microedition.lcdui.*;
    but when i write import java.sql.* error message shown AS this package does not exist.
    So for J2ME using J2ME wireless toolkit 2.5 cldc which package i want to import to implement the sql statements i implement the Database using the text Files.
    Requirement is that all SQL statements are implemented.also Which other equivalent packages are there for handling the databases in J2ME.
    Please tell me all the package & Answer of the above problem.

    Hey
    I was told that I can (through Java code) read all the registered DSNs and that way basically modify my application to populate it with a list of databases in the system and then when the user clicks on a database, the program would function as before...i.e. read the list of tables with it..yadda yadda yadda
    Can anyone guide me on how to do that? read a list of DSNs in the system etc

  • Gtksql pkgbuild. Simple GUI for sql queries.

    This is simple program for running sql queries. I made this pkgbuild some time ago but I'm not sure how much it is good. Gtksql should support both mysql and postgresql but postgresql support is broken (probably to old). Developer promises a brand new gtk2 based application. We will see...
    Since I can't make this pkgbuild any better I'm just posting it.
    gtksql PKGBUILD
    pkgname=gtksql
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="Gtk front-end for sql queries"
    url="http://gtksql.sourceforge.net/"
    depends=('lua' 'gtk')
    makedepends=('mysql')
    source=(http://dl.sourceforge.net/sourceforge/gtksql/$pkgname-$pkgver.tar.gz)
    md5sums=('a0ba598027cd49f69f951a31342b51fd')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr
    --with-mysql
    --with-lua
    make || return 1
    make prefix=$startdir/pkg/usr install

    Hello:
    I'm trying to do add a calculated variable to my view that isn't an Entity
    Attribute, its simple really but i don't know if I'm leaving something out or
    not.
    I add the "new Attribute" , call it nCompleted, type - number
    I then check off everything as is required(as documented in Help)
    for an Sql Derived Attribute, the following code is entered in the
    Expression Box :
    Select group_services.office, count(client_group_services.clnt_group_services_id) as nCompleted
    Where group_services_id=client_group_services_id(+)
    And client_group_services_id.result="Completed";
    It isn't working, what am I missing???? Sheena:
    It probably isn't working because of missing 'group by' clause. I don't know the exact detail of your query statement, but suppose you want to count number of employees in a dept, then you're query should look like:
    select dept.deptno, dept.dname, count(emp.empno) as nCount
       from dept, emp where dept.deptno = emp.deptno(+)
       group by dept.deptno, dept.dname  // This group-by is important
    OR if you want to use nested SELECT
    select dept.deptno, dept.dname,
       (select count(emp.empno) from emp where dept.deptno=emp.deptno(+)) as nCount
       from dept

  • Stored Procedures for Simple SQL statements

    Hi Guys,
    We are using Oracle 10g database and Web logic for frontend.
    The Product is previously developed in DotNet and SQL Server and now its going to develop into Java (Web Logic) and Oracle 10g database.
    Since the project is developed in SQL Server, there are lot many procedures written for simple sql queries. Now I would like to gather your suggestions / pointers on using procedures for simple select statements or Inserts from Java.
    I have gathered some list for using PL/SQL procedure for simple select queries like
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)
    Simple select statements are much faster than executing them from Procedure
    Pros
    Code changes for modifying select query in PL/SQL much easier than in Java
    Your help in this regard is more valuable. Please post your points / thoughts here.
    Thanks & Regards
    Srinivas
    Edited by: Srinivas_Reddy on Dec 1, 2009 4:52 PM

    Srinivas_Reddy wrote:
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)No entirely correct. All SQLs that hit the SQL engine are stored as cursors.
    On the client side, you have an interface that deals with this SQL cursor. It can be a Java class, a Delphi dataset, or a PL/SQL refcursor.
    Yes, cursors are created/opened at a huge rate by the SQL engine. But is is capable of doing that. What you need to do to facilitate that is send it SQLs that uses bind variables. This enables the SQL engine to simply re-use the existing cursor for that SQL.
    Simple select statements are much faster than executing them from ProcedureAlso not really correct. SQL performance is SQL performance. It has nothing to do with how you create the SQL on the client side and what client interface you use. The SQL engine does not care whether you use a PL/SQL ref cursor or a Java class as your client interface. That does not change the SQL engine's performance.
    Yes, this can change the performance on the client side. But that is entirely in the hands of the developer and how the developer selected to use the available client interfaces to interface with the SQL cursor in the SQL engine.
    Pros
    Code changes for modifying select query in PL/SQL much easier than in JavaThis is not a pro merely for ref cursors, but using PL/SQL as the abstraction layer for the data model implemented, and having it provide a "business function" interface to clients, instead of having the clients dealing with the complexities of the data model and SQL.
    I would seriously consider ref cursors in your environment. With PL/SQL servicing as the interface, there is a single place to tune SQL, and a single place to update SQL. It allows one to make data model changes without changing or even recompiling the client. It allows one to add new business logical and processing rules, again without having to touch the client.

  • Dynamic SQL queries in HTMLDB application

    How can i build a HTMLDB page only for dynamic sql queries like the features in the HTMLDB SQL-workshop.
    I need a SQL interface for some power user running some ad-hoc queries.
    Can i call this page directly from any other HTMLDB application?
    Regards
    Martin

    Hello Martin,
    I am a beginer in APEX but I have the same problem with you. What are your solution for dynamic sql query ? For report a solution is Pl Sql procedure which return a sql query. But for a form ?

  • Portlets for blackberry access

    Hi We are trying to develop portlets for Blackberry access
    Where Can I have a sample code of such a portlet. I have been able to log into the portal also provided summary URL in webservices and checked for wireless devices but we do not see the portlets in the Blackberry though I am able to see the community and my pages.

    hi i am trying to get a new full housing for a blackberry curve 9630 in pink can you help

  • Developing portlets with Jdev 10.1.3.0 possible?

    Hi all,
    I'm currently using Jdev 10.1.3.0 and I need to develop a portal (and portlets) using AS Portal 10.1.4.
    I tried to install the PDK on jdev 10.1.3.0, but that didn't work well.... do i need to upgrade my jdev version or there's another way to develop portlets for AS Portal 10.1.4 ?
    Thanks,
    Rui

    Hello Rui,
    I experience the same problem. PDK is not compatible with JDev 10.1.3. Actually I'm developing with the prevoius release of JDev, 10.1.2.2, with PDK extension and it works fine.
    Bye,
    Maurizio.

  • It's possible to develop portlets with Jdev 10.1.3.0 ?

    Hi all,
    I'm currently using Jdev 10.1.3.0 and I need to develop a portal (and portlets) using AS Portal 10.1.4.
    I tried to install the PDK on jdev 10.1.3.0, but that didn't work well.... do i need to upgrade my jdev version or there's another way to develop portlets for AS Portal 10.1.4 ?
    Thanks,
    Rui

    Hi,
    Use Jdevloper 10.1.3.2 version which comes up with portlet devlopment stuff.
    Regards,
    Tanmai

  • Linking two PL/SQL queries in 10G reports builder

    Hi,
    I have two complex SQL queries and I want to link one to the other.
    ie. I have a class of applicants and I want to retrieve their information, I do this with query one. Then for each applicant I have a number of checks all of which must be held in a cursor, so I have query two. But for each entry in query one I want to link it to the entry in query two.
    Data links dont seem to work for PL SQL queries, so any suggestions on how I would do it?
    Thanks G.

    What is a PL SQL query?

  • UCCX 8.5 Historical report sql queries

    Hi All
    I am looking for the sql queries to use that would produce the data for default historical reports.
    I would also need to understand wich columns I would need, and how to interpret the values returned e.g.
    How would I get an outgoing call for our Q2, or an abandoned call for Q1

    Hi,
    did it ever work?
    If you try to create a report within that month (let's say, first week of that month), does it work?
    G.

  • SQL queries for finding values in 4 different tables

    I need to have certain queries to find specific data in this table, this is just an example table, but I will use the same ideas for my actual website and database.
    customers (customerID: integer, fName: string, lName: string)
    items (itemID: integer, description: string, price: float)
    orders (orderID: integer, itemID: integer, aID: integer, customerID: integer, date: date)
    addresses (aID: integer, housenum: integer, streetName: string, town:string, state: string, zip:integer)
    Values I need to find are
     List the town, first name, and last name of any customer who has shipped an item to the same town as another customer.
    Return the average amount of money each customer spent in March of 2013. (Note that the answer will be a single number
    List the first and last names of all customers who have had the same item shipped to at least two different addresses.
    List the top two states that have generated the most total revenue and the revenue they generated
    I did try a few different queries, for #3 I tried 
    SELECT customers.fName,
    customers.lName,
    COUNT(orders.itemID) AS `total items with diff address >= 2`
    FROM customers
    JOIN (SELECT customerID,itemID,
    COUNT(DISTINCT aID) AS diff_address
    FROM orders
    GROUP BY orders.itemID
              HAVING diff_address >= 2
             ) AS orders
          ON orders.customerID = customers.customerID 
    but I only got 1 result, and I do not think thats correct.
    Thanks for the help and I appreciate you taking the time to help me

    Why not post the sample data + desired result? Always state what version you are using.
    SELECT lname,A.aID,COUNT(*) cnt  FROM customers C JOIN orders O ON c.Customerid=O.Customerid 
    JOIN address A  ON A.aID=O.aID
    GROUP BY lname,aID
    Sorry  cannot test it right now...
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Documention for creating portlets using pl/sql???

    Hi,
    can anyone help me get links for any kind of documentation about creating portlets using pl/sql for Oracle Application Server Portal 10g
    thanks
    M

    I think this will help out...
    Check out Chapter 8, "Creating PL/SQL Portlets" in the Oracle Portal 10.1.4 Developer's Guide.
    http://download-east.oracle.com/docs/cd/B14099_19/portal.1014/b14135/pdg_pdk_plsql.htm#BJEFHIBH

  • Nested SQL statements for complex, detailed queries.

    Is it  possible to write nested SQL statements for complex, detailed queries. A nested query
    has a WHERE clause that includes a SELECT statement ? Is it true or false ?

    Hi wahid,
    Here are pretty good examples: 
    http://www.databasejournal.com/features/mssql/article.php/3464481/Using-a-Subquery-in-a-T-SQL-Statement.htm
    http://technet.microsoft.com/en-us/library/aa213252(v=sql.80).aspx
    Regards Harsh

  • Ruby code for sql queries

    Hello everybody,
    First off, let me apologize if my inquiry does not belong on this forum. I am confident however, that someone here has had experience with this since Oracle and ruby on rails/ruby are used frequently. My fingers are crossed, here's is my problem:
    I am currently working on a database system that utilizes ruby on rails
    with a oracle database. Here's the situation:
    the ruby on rails web application is up and running;
    my oracle database is full of tables that are populated with data;
    there is a successful connection between rails and my oracle database;
    however, what isn't finished is I currently have data mining queries in
    sql (eg. find minimum time someone has been employed = "Select
    min(time) from table...etc") and what I need to do is write one ruby
    program for each of my sql queries so that the ruby program:
    1) connects to the oracle database each time the query is called
    2) runs the sql query on the oracle database
    3) takes the results from the query and returns them in an array or
    something of that nature (so that I can use the results in an html file
    on the ruby on rails web application).
    Again, I apologize if this question does not belong on this forum. If someone however has experience with this could you please give me example code of what this would look like (using different sql queries). Thank you

    I apologize if this question does not belong on this forum. OTN does have a forum dedicated to Ruby/Ruby On Rails. I admit it doesn't seem to get much traffic. I think that's because most people working with Ruby tend to go for F/OSS products.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

Maybe you are looking for

  • Edited footage from AE not playing correctly in PPro CS4

    First- I'm a novice. I captured footage from a Canon GL2 (shot on the Auto settings) into Premiere Pro CS4 that was shot in front of a blue screen. In the timeline, I selected the blue screen footage (avi file), photo for backgroundn (jpg), and audio

  • What is the maximum amount of RAM allowed for a HP Pavilion dv6-7010eo?

    Wanting to upgrade the RAM in our Pavilion dv6-7010eo running Window 7 (64 bit). Have read some conflicting information.. Some say that this model supports 16GB (2x8GB) whereas other say that it only supports 8GB (2x4GB)...  What is correct? 8GB or 1

  • Plug in Seagate USB drive and status goes from green to yellow

    This is somewhat different from what others have posted. When I plug in or turn on my Seagate 160 gig drive on the base station USB, the status light switches to yellow and no more wireless. The disk works when direct connected to the iMac. Epson pri

  • Meeting Place Express 2.1.1.2 Web Access Issue

    Hello all,      I'am having an issue with a Meeting Place Express 2.1.1.2 server.  There was a power failure and now we can still access the server via dial-in but the web acess is not working.  From the CLI i run the mpx_sys status command and it sa

  • Project Folder or Program Files???

    I'm having problems with drive too slow error messages and system overload, and shouldn't be... I'm using an external firewire 7200rpm drive for my audio. I've reformatted my audio drive, as well as reloaded Tiger onto a freshly formatted system driv