Adding Page to Workset using Java

i am trying to add a page to a Workset using java. Can any one help me do this.
Also how can i retrieve the Worksets attached to a Role.

I am to create a workset in the fashion mentioned below.
IRoleService rSrv = (IRoleService)PortalRuntime.getRuntimeResources().getService("com.sap.portal.pcd.roleservice.roles");
IWorksetDescriptor worksetDescriptor = rSrv.getWorksetDescriptor(env);
parentCtx.bind(worksetName, worksetDescriptor);
IPortalWorkset workset = (IPortalWorkset)parentCtx.lookup(worksetName);
But adding pages to the workset is still not resolved.
Do Pass on any info regarding this.

Similar Messages

  • API FOR ADDING PAGE TO WORKSET fro PDK

    hi All,
    IPage myPage =(IPage)iCtx.lookup( "pcd:portal_content/com.intelligroup.epPractice/page/ipage");
              myPage.addiView(iViewDescriptor,"sap_transaction_iview1");
    //               //Ended By suresh.
    i am assignig iView to page , i need to add page to work set please if any one knows send the Api fror pdk i will catch , this is very urget
    Thanks & regards,
    Suresh

    Hi Praveen ,
    pcdCtx.createDeltaLink(pageDeltaName, basePcdAttributes, pagePath);
    wht is pcd Attributes ....
    wht are the API u used
    Hashtable env = null;
    //                    InitialContext iCtx = null;
    //                    try
    //                         env = new Hashtable();
    //                         env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    //                         env.put(Context.SECURITY_PRINCIPAL, request.getUser());
    //                         //env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
    //                         iCtx = new InitialContext(env);
    //                         response.write("context--->"+iCtx);
    //                         IPcdUtils pcdUtils = PcdAccess.getPcdUtils();
    //                         IPcdAttributes basePcdAttributes = pcdUtils.createPcdAttributes();
    //                         InitialContext pcdContext = new InitialContext(env);
    //                         IPcdContext pcdCtx = (IPcdContext) iCtx.lookup("pcd:portal_content/v/g/workset3");
    //                         pcdCtx.createDeltaLink("pcd:portal_content/v/g/page1", null , "pcd:portal_content/v/g/page1");
    //                    }catch(Exception e)
      i tried the similar coding dng this but not added to page to workset ..
    please tell me the result                    
    Regards ,
    venkat p

  • Read values on HTML page(flash embedded) using Java code

    Hi,
    we can normally parse a HTML and can get values on a web page using java code.
    is the same possible with HTML page indluding flash?
    my basic need is to read values on webpage displayed by flash
    thanks
    R

    flash can communicate with javascript using the externalinterface class.

  • URGENT:How can we submit a web page containing form using Java API?

    Dear Friends,
    I want to submit a form to a form action page resides in a web site. Then I need to get the response of the same.
    Is there any way to do this automatically by using Java API.
    Does java.net have anything?
    Thanks in advance
    Sarath

    Have you looked at a package called httpunit.
    http://httpunit.sourceforge.net/
    This allows form submission, Javascript, cookies etc.

  • Adding page to workset

    Hi,
    in the PCD When adding a page to worket edit mode and save button is in disabled mode.
    is this any authorisation issue

    Dear SAPforum,
    have you tried with IE instead ?
    Please try that.
    I believe Firefox is not officially supported by SAP with their SAP Portals tool.
    I also prefer Firefox to IE, but when using with SAP Portals I always have to switch to IE to avoid surprises like the one you are facing.
    Give it a try with IE and let me know if you saw any difference.
    Kindest Regards
    /Ricardo Quintas

  • Adding pages to workset??

    Hi all,
          Can somebody help me to add objects to a workset programmatically?
    Thanks in advance.
    Regards,
    M.Subathra

    Hi,
    What you want to do is similar to how you add iViews to a page, which is described in the following documentation: http://help.sap.com/saphelp_nw04/helpdata/en/fd/ea5c42da4de92ce10000000a1550b0/frameset.htm.
    You could, theoretically, do the same with role and workset objects, however, these objects are officialy not public.
    Hope this helps.
    Daniel

  • Spawn a new PDF using Java Script within LC Designer

    I am trying to spawn a new PDF file to be created from an existing PDF using Java Script within the LC designer
    I have this example but I can't get it to work
    function createPdf()
        pdf = pdf$();
        pdf.addText('Hello World');
        pdf.writeToFile('c:/temp/hello_world.pdf');
        window.open('file://c:/temp/hello_world.pdf');
    Is it possible to create a PDF like this within LC Designer?

    Hi
    I would like to see if it was possible.  I thought it would be easy, as
    there is a standard batch processing sequence (Print 1st page of all) using
    Java that comes with Acrobat 7.  This allows you to print the first page of
    a number of files that you select when the sequence is run.  Its code is:
    /* Print 1st Page */
    /* This sequence prints the first page of
       each document selected to the default printer.
    this.print
    To my uninformed mind it seemed logical that the same code, slightly
    modified to print all pages, should work from within a form.
    Anyway, if there is a way to choose individual files, I would appreciate
    that.
    Thanks
    Rob

  • Print .PDT,.DOC,.XLS files using java print API

    Hi,
    I need to print different types of documents like pdf, word, excel files etc.
    Please let me know how to proceed on this.
    I tried using the following code, but it is printing all junk/html tags on the paper.
    Please let me know how to resolve this.
    Thanks in advance
    import java.io.File;
    import java.io.IOException;
    import javax.print.DocFlavor;
    import javax.print.DocPrintJob;
    import javax.print.PrintException;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    import javax.print.SimpleDoc;
    public class PrintDocument {
      static public void main(String args[]) throws Exception {
        try {
             PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService();
            DocPrintJob printerJob = defaultPrintService.createPrintJob();
            File pdfFile = new File("C:\\temp\\sample.doc");
            SimpleDoc simpleDoc = new SimpleDoc(pdfFile.toURL(), DocFlavor.URL.AUTOSENSE, null);
            printerJob.print(simpleDoc, null);
        } catch (IOException ie) {
          ie.printStackTrace();
        } catch (PrintException pe) {
          pe.printStackTrace();
    }

    Hi
    I would like to see if it was possible.  I thought it would be easy, as
    there is a standard batch processing sequence (Print 1st page of all) using
    Java that comes with Acrobat 7.  This allows you to print the first page of
    a number of files that you select when the sequence is run.  Its code is:
    /* Print 1st Page */
    /* This sequence prints the first page of
       each document selected to the default printer.
    this.print
    To my uninformed mind it seemed logical that the same code, slightly
    modified to print all pages, should work from within a form.
    Anyway, if there is a way to choose individual files, I would appreciate
    that.
    Thanks
    Rob

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to get the page numbers of a word/mpp/execl doc using Java?

    Hi,
    I meet a problem in Java programming. I want to get the page numbers of a Word/MPP/EXECL/PDF document. For exmaple, if a PDF docment have 10 pages, I need get the 10 . How to get it using Java?
    Please advise me as soon as possible if you have any good suggestions! Thanks!
    Yin

    There are several good tools that allow you to access COM objects from Java. Here are two of the better ones:
    Bridge2Java
    http://www.alphaworks.ibm.com/tech/bridge2java
    J-Integra
    http://www.linar.com/
    Both of these tools will allow you to access MS Office products (including Word and Excel) via COM interfaces.

  • Using Java for dynamic web page content

    I've currently got a Perl program that I'd like to convert to Java. It merges two files that are stored on a web server and generates a "dynamic" HTML response.
    For example, if I have the following files on the server:
    File1:
    <Comment1>This stuff</Comment1>
    <Comment2>That stuff</Comment2>
    File2:
    <HTML>
    <Comment1><br><Comment2>
    </HTML>
    When I go to the URL
    www.mysite.com\cgibin\merge.pl?file1&file2
    the Perl program will produce a web page saying:
    This stuff
    That stuff
    The major obstical for the rewrite: NO JSP ALLOWED. It's not allowed by the ISP.
    Now for the questions:
    - Could this be done using Java?
    - How could I initiate the Java app and pass it the parameters? (applet tag, access Java inside Perl, use Java Script somehow)
    - Will an applet tag even work for this since the final page is generated completely from other files?
    Thank you very much for your help.

    If your ISP don't support JSP / Servlets,
    1.use any server side technolgy, something like ASP.
    2.Read the files and transform them as Strings (or StringBuffers).
    3.Pass these Strings as parameters to the applet (if you are forced to use java technology, otherwise you can do it using ASP itself).
    4.Construct the required format (content) in your applet.
    Don't forget that the stuff will be in applet but not a complete web page. The ideal solution is asking your ISP to provide JSP engine.

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

  • Using Java 5, how to develop customizable web-pages  like iGoogle ?

    Is it possible to develop customizable web-pages like iGoogle does, using Java 5 ( simply using JSPs, servlets, JSFs, AJAX etc. and without using portals) ?
    A simple example explaining how to provide 3-4 header graphics options ( like igoogle does) will be helpful. (iGoogle seems to create a cookie, which appears to be used to render the selected header-graphics).
    TIA
    Edited by: DevelopingJava2005 on Jul 7, 2008 9:36 AM

    Without using portals?
    Google uses RSS feeds to compile their mashups on iGoogle. The positioning of those boxes are managed with AJAX and upon placement are saved into a session so they stay there for each visit after.
    Please be a little more clear as to what you are looking for. Yes, it is possible to develop web pages using the technologies you specified to simulate something like iGoogle, so give us some more details on what exactly you're looking for.
    Code wouldn't hurt either.

  • Problem with too small page size using Java 2D Printing API.

    Hello,
    I have problem with resolution of printer using Java 2D Printing API. Despite my printer has 600 x 600 DPI, inside java.awt.print.Printable.print(Graphics, PageFormat, int) I receive page format with 600 x 840 page size.
    I have tried to set resolution using javax.print.attribute.PrintRequestAttributeSetand javax.print.attribute.standard.PrinterResolution, but with no result.
    Can anybody solve this problem?
    Regards,
    Karl.

    600 x 840 is a Point value; Point is defined as 1/72nd of an inch. Printers do have much higher DPI than this, but I believe that this DPI has to do with richness of the printed image, not an actual ability to color with that level of resolution. You might want to try calling zoom on your Graphics2D object. Otherwise, I don't know what else you can try.

Maybe you are looking for

  • Editing base value or excise duty during Posting of Excise invoice

    Hi, System is getting greyed out and not allowing to change the base value or Excise duty values during posting of excise invoice, where as it is allowing during capturing the excise invoice. How to change this? We require facility during posting. Is

  • Need advice on displays

    I am currently using a couple of Sony CRT G520/420 displays. I am looking at getting a 23-24 inch LCD and will be using it mostly at home for Photography using Photoshop, Bridge, Lightroom etc., for output to inkjet and/or Lambda. I also spend time i

  • Simple image placement problem

    I just recnetly upgraded to Dreamweaver 8 and have a crazy problem that I don't understand. I'm unable to add picutres side-by-side. I don't quite understand what is happenening but when I try and add two images side by side it forces the other down

  • MMPV for last month of year

    Hi Guru's I am going to open MM period through MMPV for jaunary 2010. i am puting period = 01 and Fiscal year 2010 and getting error message that " 2010 is not your current cleander year. so what is my fiscal year in this case?? seeking your help. Re

  • Problems installing Portal 2

    when we install Portal 2 it takes us to the steam web site where it always says that the server is busy and to try in a few minutes. We have been trying for over a week and the same message.