IView Properties in Java

Hi,
   Is it possible to set iView Personalization properties from Java? I am writing a JSPDynpage to display some content and want to put a button on this page e.g."Remove"
this should trigger/set the "Remove iView" for that user.
I am able to read the property but want to know how to set.
request.getComponentContext().getProfile().getProperty("com.sap.portal.iview.ShowRemove")[
this is just displaing true or false whether to show this property in personalization or not.
We disabled personalization option for all users,but need this feature for one iView.
Thanks
Tegala

Hi,
The issue seems not to be with the Show Remove property -- this only indicates to the portal whether to display this option to the user.
You seem to be asking how do I actually remove the iView from the page, no?
If so, you query the PCD for the page you want, get from the page the IiView object of the iView you want to hide, and then change the avilability property.
Here is some sample code to do this:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, request.getUser());
InitialContext iCtx = null;
String pageID = "portal_content/DanielContent/DanRole/Folder1/Folder2/Page1";
try {
  iCtx = new InitialContext(env);
  IPage myPage = (IPage)iCtx.lookup(pageID);
  Enumeration myIviews = myPage.getiViews();
  while (myIviews.hasMoreElements()) {
     Binding bind = (Binding) myIviews.nextElement();
     IiView myIview  = (IiView) bind.getObject();
     myIview.putAttribute(IAttriView.ATTRIBUTE_AVAILABILITY,IAttriViewValues.AVAILABILITY_VALUE_AVAILABLE);
     myIview.save();     
I think the casting to a Binding object can be skipped, and you can cast directly to an iView. This is adapted from another code sample where you wanted to distinguish if the object was an iView or a page and then cast it.
Hope this helps.
Daniel

Similar Messages

  • Make custom Web Dynpro java iView properties

    Hi All,
    Please guide me as to creation of custom Web Dynpro java iView properties in NW 04s .
    I have already gone through the music box example but  still have doubts .
    ANy pointers?
    Regards
    Radhika Kuthiala
    Edited by: Radhika Kuthiala on Dec 13, 2011 9:49 PM

    I don't think this can be done since WDJ apps can also run standalone (not in a portal)

  • Has anybody created Iview from "Webdynpro Java" component in CE7.1 ?

    Hi All,
           Has anyone created Iview from Webdynpro Java component in CE7.1.
    Because the wizard that appears for creation of Iview has only "Webdynpro ABAP"
    component.There is no option to create iview from "Webdynpro Java" component.
               Althought in portal content--->Template folder i can see there is also
    another template for "SAP Webdynpro iview" which i think is for the Java scenario.
    But issue is, its not coming in the wizard.Can anyone tell me how to make it appear in the wizard ? It will be of great help to me.
    Thanks and Regards
    Ashis

    Hi Ashis,
    your deployed webdynpros are published under "web dynpro applications". just copy the webdynpro from there and paste it into the portal content section.
    http://help.sap.com/saphelp_nwce10/helpdata/en/ce/e0d6f54ae641fc9566501cffaa8c6c/frameset.htm
    Hope that helps you.
    Best wishes, Jens

  • How to call IAC Iview from WebDynpro java code

    Hi Team,
    I am tring to call IAC Iview from WebDynpro Java code. we are passing value but blank page  displayed and there is no error show on error log.
    Below is Java Code which i am calling.
      public void wdDoInit()
          try {
                String strURL = "portal_content/TestSRM/iView/TestSRM";                           //WDProtocolAdapter.getProtocolAdapter().getRequestParameter("application");
                 String random = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("random_code");     
                 //wdContext.currentContextElement().setRandomNumber(random);
    //below we are call URL           
    WDPortalNavigation.navigateAbsolute("ROLES://portal_content/TestSRM/iView/TestSRM?VAL="+random,WDPortalNavigationMode.SHOW_INPLACE,(String)null, (String)null,
                       WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String)null,(String)null, " ");
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    I am passing value from URL.
    http://<host Name>:<port>/webdynpro/resources/local/staruser/StarUser?random_code=111111111
    when we call above URL we getting blank screen.
    Regards
    Pankaj Kamble

    Hi Vinod,
    read this document (from pages 7 ).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62</a>
    In addition lok at these links: (Navigation Between Web Dynpro Applications in the Portal)
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm">http://help.sap.com/saphelp_erp2005/helpdata/en/ae/36d93f130f9115e10000000a155106/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm">http://help.sap.com/saphelp_erp2004/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/frameset.htm</a>
    It may be helpful for you.
    Best regards,
    Gianluca Barile

  • UWL iView Properties...

    Hi all,
    I'm Using EP7.0 and SP16.I copied the UWL iView from this location (content provided by Sap --> End User Content --> Standard Portal User --> iViews --> com.sap.netweaver.bc.uwl.iviews --> Universal Worklist).
    Changed the iView Properties:
    Display UWL Overview Page = Yes
    Initial state of Navigation Panel = close
    That iView works fine.. It displays the Overview look and feel and also hide the Detailed navigation part..
    My Problem is
    when i click the link (Tasks, Notification, Alerts and Tracking) in the Oveview page, it opens the corresponding Tab look and feel and open the Detailed Navigation part.. i want to close the Detailed Navigation part of the Tab iView also..
    what can i do? how to achieve this? please help me..
    Regards
    Thillai J

    Hi All,
    Solution:
    Goto this location
    Portal content > Portal User> Standard Portal User > Universal Worklist> Task
    Open the Task iView and close the Initial State of Navigation Panel. Its automatically close the Naviagtion Panel when we click the links in the UWL overview iView.
    Regards
    Thillai J

  • Details of CRM iView properties delivered by BP-CRM

    Hi, SDN Fellows.
    Our portal have installed with CRM Business Package (based on CRM 5.0).
    I am trying to figure out and get more detail information on different CRM iviews delivered by the Business Package. I wish to know the properties of each iview, and some guide to configure them.
    For instance,
    When I create a   "com.sap.pct.crm.app.channelmgmt iview", I can choose any of these portal component:
         CallBackiView 
         DocOverview 
         ExtAppTerm 
         GenericFSCMComponent 
         GenericICSSComponent 
         GenericISAComponent 
         ISalesShop 
         PortalTerm
    and I need to know where I can get a detail description about its functionality and its iview properties.
    This is the list of CRM iviews (par type) listed (coming with the BP):
    com.sap.pct.crm.app.activitymanagement
         com.sap.pct.crm.app.channelmgmt
         com.sap.pct.crm.app.commissionsimulator
         com.sap.pct.crm.app.erms
         com.sap.pct.crm.app.favoritecompetitors
         com.sap.pct.crm.app.favoritecustomers
         com.sap.pct.crm.app.favoriteopportunities
         com.sap.pct.crm.app.favoriteproducts
         com.sap.pct.crm.app.favoritesalesdocs
         com.sap.pct.crm.app.kmext
         com.sap.pct.crm.app.leadmanagement
         com.sap.pct.crm.app.quickcreate
         com.sap.pct.crm.app.salesmgrlistdeals
         com.sap.pct.crm.app.salesreplistdeals
         com.sap.pct.crm.app.sdbreport
         com.sap.pct.crm.app.sis
         com.sap.pct.crm.app.sisopt
         com.sap.pct.crm.core.admintools
         com.sap.pct.crm.core.centralsearch
         com.sap.pct.crm.core.drnavigation
         com.sap.pct.crm.core.factsheet
         com.sap.pct.crm.core.factsheetframework
         com.sap.pct.crm.core.masteriviews
         com.sap.pct.crm.core.services
         com.sap.pct.crm.core.userlinkrepositoryfilter
         com.sap.pct.crm.dam.dam
         com.sap.pct.crm.dam.damconv
         com.sap.pct.crm.dam.damrm
         com.sap.pct.crm.factsheet.account
         com.sap.pct.crm.mkt.calendar
         com.sap.pct.crm.simplePage
    I wonder is there a document which describe the detail of all these iviews?
    Thanks in advance,
    Kent

    Hello KC,
    Can you let me know if you can send me the business package for CRM 5.0 ( english). I cannot find the details of pdf.
    Regards
    PN

  • Reply to client by setting properties of java.rmi

    Hi All,
    I am very new to JAVA RMI.
    Is it possible for me to send a reply to client by setting the properties of java.rmi ?. I mean the reply string , if i am returning a string to client program ?.
    Shammi

    I will be more specific.
    What I meant by properties is system properties applied to the classes in java.rmi.* which we can set. For example,
    System.setProperty("java.rmi.server.codebase", "file://home/shammi/test");
    For the second portion, for example, if my server returns the string "Hello World" to the client, I will have a server method some what similar to the one given below
    public String SayHello()     {
              return "Hello World\n";
    Is it possible for me to do this in another way rather than explicitly specifying the return string.
    Shammi

  • Get IView Properties and portal details Programatically

    Hello Experts,
    I have created one WDA application and deployed the same on portal. I need to access iView properties of the iView programatically.
    Is there any class in WD which will gives me iView properties like, PCD location, application parameter etc. Also please give me the class name which gives portal details as well on which iView is running.
    Thanks,
    Prashant

    Hi,
    For portal integration we use IF_WD_PORTAL_INTEGRATION, but this interface doesnot provide those details.
    When you run the WDA application from portal, there are some portal person can fill those applciation parameters like Iview name PCD path etc...so that you can read them in WDA application like any other portal parameter.
    Can you search as IF_WD_PORTAL* and CL_WDR_PORTAL* it may  help..
    http://help.sap.com/saphelp_nw04s/helpdata/en/27/96b9c8f14e7d498b90a674710dc9c2/content.htm
    Regards,
    Lekha.
    Edited by: Lekha on Jul 1, 2011 11:27 AM

  • Configure TCP/IP system properties with java

    I'm looking to do is to be able to set my TCP/IP properties using java every time I switch physical networks so that it is configured properly. One network automatically gives an IP while the other requires a static one. I'd rather not have to keep typing it in everytime so I'm looking for a way to automatically change it.
    I'm thinking that the route to go would be through the java.lang.system to get the system properites but that'll only get me the os name and version stuff.
    Any ideas?

    I believe this will require native functionality. Each OS handles the specification of TCP/IP information differently. Getting the system properties is not going to help. The only way I can imagine doing this is to create a set of Java classes which provide a platform-independent abstraction for changing TCP/IP information and then use JNI to implement the natvie code for each platform you want to support.
    Jitender - [email protected]

  • Cannot find Display State Iview Properties

    Dear all,
    While trying to create home page, I look IView properties and find a great setting Display State.
    The problem is I cannot find this parameter in my URL IView properties.
    I use EP 6 SP13.
    Thanks for help.

    Hi Beata,
    first let us clarify some wording:
    A <i>PAR</i> is a <i>Portal ARchive</i>. It is a zip in a certain format. It contains a <i>portal application</i>.
    A <i>portal application</i> consists of <i>components</i> and/or <i>services</i>.
    An <i>iView</i> is somehow an "instance" of a <i>component</i>. It is created within the portal. There are <i>no iViews in a PAR</i> (like: "There are no objects in a JAR (but classes).").
    With this in mind, the question is if there really exist an iView with the name you are looking for.
    What you see under Portal Runtime Tools is the application with it's components. Anyhow, the default properties of an iView or the properties of a component if called without packaged within an iView are the ones defined within portalapp.xml of the corresponding application.
    But if you change values in there, the changes are somewhat "global", so you should be sure if the component in question is called via an iView or just "as the component".
    The location of the portalapp.xml is under \usr\sap\<...>\JC<...>\j2ee\cluster\server<...>\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\<appName>\portalapp.xml
    Hope it helps
    Detlev
    PS: Please consider awarding points for helpful answers. Thanks in advance!

  • List iView properties of PCD content in WebDynpro

    Hi,
    I'm having trouble listing the properties of iViews as I traverse the PCD in my WebDynpro application.
    I get this error: java.lang.ClassCastException: com.sapportals.portal.pcd.gl.PcdGlDeltaLink incompatible with com.sapportals.portal.pcd.gl.IPcdContext
    My code:
      public javax.naming.InitialContext getEnvironment( )
        //@@begin getEnvironment()
         InitialContext initialContext = null;
         try {
              IUser principalObj = null;
              // set the security principal
              principalObj = this.getServiceUser("pcd_service");
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
              if (principalObj != null) {
                   env.put(Context.SECURITY_PRINCIPAL, principalObj);
              env.put("com.sap.portal.jndi.requested_aspect",PcmConstants.ASPECT_ADMINISTRATION);
              env.put("java.naming.factory.object", "__IPcdContext__");
              initialContext = new InitialContext(env);
              IPcdContext pcmObj = (IPcdContext) initialContext.lookupLink("portal_content/epiuse/com.epiuse.dj/com.dj.epiuse.iviews/com.epiuse.ooq4");
                 Object object = pcmObj.getAttributes("").get("com.sap.portal.navigation.MergeId");
                  if(object instanceof IPcdAttribute){
                   att = (IPcdAttribute)object;
                   folderContent.setMergeId(att.getAll().next().toString());
         } catch (NamingException e) {
         return initialContext;
        //@@end
    The application fails at:
    IPcdContext pcmObj = (IPcdContext) initialContext.lookupLink("portal_content/epiuse/com.epiuse.dj/com.dj.epiuse.iviews/com.epiuse.ooq4");
    Any help?

    Hi Raju,
    If you are talking about "portal_content/epiuse/com.epiuse.dj/com.dj.epiuse.iviews/com.epiuse.ooq4" this is just an iView that I created.
    But the problem occures for any iView PCD location I provide.
    Thanks in advance,
    DJ

  • Reading Web Dynpro IView properties

    Hi gurus, I'm facing a problem during my Web Dynpro Java development:
    I created a WD application and deployed it in portal and then I created a Web Dynpro Iview to show my application in portal.
    Now I want to read the value of one of the properties that I set in this Iview and use the value in the java code of the application.
    I'm going crazy and I can't find any solution after hours of search on SDN.
    Can someone help me pelase?
    regards
    Mattia

    hi
    check this
    /thread/943895 [original link is broken]
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5f/cf9d4207e1c86ae10000000a155106/frameset.htm
    http://help.sap.com/javadocs/NW04S/current/ep/com/sap/portal/pcm/iview/class-use/IiView.html
    /message/6008598#6008598 [original link is broken]
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401
    bvr
    Edited by: bvr on Feb 13, 2009 2:41 PM

  • Iviews Properties - Maximizing the Window

    Hi All,
    I have a Page which have a Webdynpro Iview. If an user clicks a button in that Page it will be open a Iview in a new window. The maximize option is not enabled in the new Window. How to enable that?
    Regards,
    Revathi Raju.

    Hi Deepti,
    I am not sure whether these two methods are used are not.
    This is the code(method) for which the new window is opened I guess. I am using ESS/MSS implementation. Please let me know if there is any possibities?
    public boolean startApplication( java.lang.String serviceKey, java.util.Properties applicationParameters )
    LOGGER.traceEnter("startApplication");
    boolean successful = false;
    if (applicationParameters == null) {
    applicationParameters = new java.util.Properties();
    NavigationTarget serviceNavigationTarget =
              wdThis.wdGetFcNavigationInterface().getNavigationTargetServiceWithKey1(serviceKey, applicationParameters);
    if (serviceNavigationTarget.getApplication() != null) {
    this.removeURLParametersFromNavigationTarget(serviceNavigationTarget, applicationParameters);
    this.retainURLParametersInNavigationTarget(serviceNavigationTarget); // >>> OSS 855815 2007 - THX <<<
    this.fpm.navigate(serviceNavigationTarget);
    successful = true;
    } else
    wdComponentAPI.getMessageManager().reportMessage(     IMessageFcTraUtils.ERROR__SERVICE__NOT__FOUND, new Object[] {serviceKey}, false);
              LOGGER.logError(fpm, wdComponentAPI, "startApplication", "Service "serviceKey" not found.");                    
    return LOGGER.traceExit("startApplication", successful);

  • Reading cache values from iView properties

    Hi,
    I want to programmatically retrieve the value of an iView's cache properties.
    I was thinking of retrieving this the normal way, using the attributes of the IPcdContext object.
    This works for most attributes, for instance:
    <b>pcdContext.getAttributes("").get("com.sap.portal.pcm.Title");</b>
    however, the attribute names used for cache -- <b>ALLOW_BROWSER</b>, <b>CachingLevel</b>, and <b>ValidityPeriod</b> -- don't seem to return anything...
    How can I retrieve these settings?
    Thanks in advance!

    Hi,
    If they are not set from PropertyEditor and left to the default values, then these properties are not set on the PCDObject. So when you retrieve these attributes you get null. The PropertyEditor uses the same logic, but when nothing found, it shows default values. So from PropertyEditor you see them, but from API you get null.
    You can inspect this behavior by opening the PCDObject with PCDInspector and check all available attributes. Then you will see that attributes  ALLOW_BROWSER, CachingLevel, and ValidityPeriod do not exist.
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • How to Change Default Iview Properties for Role Upload?

    Hello,
    We have many roles to upload from R/3 ABAp system to NW2004s EP.
    We use the Role Upload tool in the Portal to achieve this.
    It works fine, the roles are created in the portal and can be assigned to users.
    The fall back is that we have to modify every single transaction iview in the portal after the upload to modify the SAP GuiType from "SAP GUI for HTML" to "SAP GUI For Windows".
    How can we change the default model used of SAP GuiType for uploading transaction iviews in uploaded roles?
    Also, the uploaded role is not flaged as an "Entry Point", is there a way to set this marker to "Yes" as a default value for all uploaded roles?
    Best regards.

    This is one of Acrobat's less intuitive areas!
    For defaults, right-click on the text box that is as you want it: then select menu item 'Make current properties default'
    Use Ctrl-E to bring up the Properties toolbar: its content will change depending on whether you have the box or the text selected, and selecting the box or text can be a bit clunky.
    Steve.

Maybe you are looking for