Permanent change of iView property programmatically

Hallo,
I used this code to change iView property from another iView:
private IPcmObject getPcdObject( IPortalComponentRequest pRequest, String pPcdUrl ) throws NamingException
                    IPcmObjectService pcdFactory = (IPcmObjectService) PortalRuntime.getRuntimeResources().getService( IPcmObjectService.KEY );
                    Hashtable env = new Hashtable();
                    env.put( Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY );
                    env.put( Context.SECURITY_PRINCIPAL, pRequest.getUser() );
                    IPcmObjectBuilder pcmSrv = pcdFactory.getInitialContext(env);
                    try {
                         return( (IPcmObject)pcmSrv.lookup(pPcdUrl) );
                    catch (NamingException e) {
                         throw e;
          public void onButtonClick_CV(Event event) throws Exception
                                                  IPortalComponentRequest aRequest =
                              (IPortalComponentRequest) this.getRequest();
               IPcmObject obj = null;
                         String iView = "portal_content/Example/com.example";
                                   try {
                                   obj = getPcdObject(aRequest, iView);
                              } catch (NamingException e) {
                                   // TODO Auto-generated catch block
                                   e.printStackTrace();
                              obj.getAttributes().put("StartUri","/documents");
                              obj.getAttributes().put("path","/documents");
..... and when I access property by obj.getAttributes().get("StartUri"), I get right result: "/documents". But this is not permanent change of iView property - when I access this property later, I get old value of this property.
Does somebody knows how to made changes permanent?
Best Regards,
Josef Motl

Hi All,
I want to read and modify the property of one iview from another iview.
I wrote the following code. but,I am not able to print any property from get method....
How to get and set any property of the iview.
public class MyPortalExample extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest aRequest, IPortalComponentResponse response)
          IPcmObject obj = null;
          String iView = "pcd:portal_content/example/animalselector";
          try {
          obj = getPcdObject(aRequest, iView);
          } catch (NamingException e) {
               e.printStackTrace();
          response.write("object"+obj.getAttributes().size());
          while(obj.getAttributes().getIDs().hasMoreElements())
               response.write(obj.getAttributes().get("Change By");
               response.write(obj.getAttributes().get("path");
               response.write(obj.getAttributes().get("name");
               response.write(obj.getAttributes().get(obj.getAttributes().getIDs().nextElement().toString()).+"\n");
               i++;
    private IPcmObject getPcdObject( IPortalComponentRequest pRequest, String pPcdUrl ) throws NamingException
     IPcmObjectService pcdFactory = (IPcmObjectService) PortalRuntime.getRuntimeResources().getService( IPcmObjectService.KEY );
     Hashtable env = new Hashtable();
     env.put( Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY );
     env.put( Context.SECURITY_PRINCIPAL, pRequest.getUser() );
     IPcmObjectBuilder pcmSrv = pcdFactory.getInitialContext(env);
     try {
          return( (IPcmObject)pcmSrv.lookup(pPcdUrl) );
     catch (NamingException e) {
          throw e;

Similar Messages

  • Problems changing a iview name programmatically

    hi people
    im trying to change a iview name programmatically but the application give a exception: java.lang.NoClassDefFoundError: com/sapportals/portal/pcd/pl/PlLocaleTextPair
    This class is just the class that i need for get the name and for change the name, i have this class in the jar com.sap.portal.pcmbuilderservice_api.jar located in my classpath...
    my actual test code is the next:
                   PlLocaleTextPair newName=(PlLocaleTextPair)name.get(0);
                   PlLocaleTextPair newNameEn=(PlLocaleTextPair)name.get(1);          
                   PlLocaleTextPair newNameEs=(PlLocaleTextPair)name.get(2);               
                   newName.setText("newName");
                   newNameEs.setText("newNameEs");
                   newNameEn.setText("newNameEn");
                   name.set(0,newName);
                   name.set(1,newNameEn);
                   name.set(2,newNameEs);
    someone can help me??
    thank you

    Hi Ismael,
    Can you try using a PCD Inspector to do the same.
    The name of the iview is stored using the property com.sap.portal.pcm.Title. You need to change the name in this property. Remember to update the name with the right locale i.e. the locale which is set for the Portal.
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/a4a442dc030e31e10000000a1550b0/content.htm
    I am not too sure about the coding part.
    Thanks,
    Nikhil

  • New iView property in EP7.0 SPS14 - well almost

    We have just installed SPS14 on an EP7.0 instance, and one of the new features delivered in the SP is an iView property called Show ‘Expand’/’Collapse’ Icon in Tray.
    The relevant release note can be found [here|http://help.sap.com/saphelp_nw70/helpdata/en/21/b3eff447a5424f81bef348bcc169d8/frameset.htm].
    This looked promising as we frequently get calls from users who complain that they can't see a screen in the portal, and it is usually because they have accidentally collapsed an iView.
    The problem we have found is that it doesn't seem to work with WebDynpro iViews - Java or ABAP.
    Anyone else tried using it yet?
    Regards,
    John

    Hi John,
    i have the same issue. Did you find anything to suppress the icon? The only possibility i habe in mind is changing the theme and take a blank picture.
    Any Appreciation would be fine.
    Regards,
    Thomas

  • To Change the Readonly Property

    Hi,
    In Portal  Personal data Screen for belgium , Country of Birth field (Drop Down Box) is  Read Only.
    We have to change the readonly property.
    I tried through iView personalisation ,the property of that field is Not readonly.
    2) In the WD java Application  the field property is  NORMAL .
    3) I have checked in V_T588MPROPC, there also we dont have any entry for this field.
    In Backend ECC this field is editable ,
    Can any one please let me know where should i will change to make this field as Editable.
    Regards
    Alexi

    Please check the following tables:
    V_T005
    V_T588MFPROPC
    V_T588MFPROPS
    T77WWW_SC
    V_T582ITVCHCK
    Note 1498555 - How to make a field mandatory or optional in ESS
    "V_T588MFPROPC only makes the field mandatory, optional or unused
    by the back-end business logic checks it will not change a
    UI display property like Read-Only
    You could try the Personalization options - Ctrl and Right
    mouse button over the UI element (either in the browser
    or in a PCD preview - for global changes for all users)
    - please check there for options to change the country
    field to editable
    However I suspect the field is read-only because
    1) You are on a lower release than EHP3 -foreign address
    maintainence via Country field is only available
    as standard from EHP3
    2) You do no have EHP3 business function HCM_ESS_CI_1 switched on
    these business functions activate foreign address functionality
    3) You are editing a record - try instead creating a new record
    4) Inconsistency in V_T7XSSPERFORADD - check this against client 000
    Hope this helps identify the problem

  • How to change one iView to another in portal page by clicking the third one

    Hi all!
    I have created four iViews: two speedometers with web application designer and two iViews with visual composer. I added the speedometers and a visual composer iView #1 to a portal page (default view). The requirement is that by clicking the speedometer #2, the visual composer iView #2 would replace visual composer iView #1 on the portal page. If the user then would select the speedometer #1 again by clicking it, visual composer iView #2 would replace #1 again and so on.
    I have read article http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50b65a5d-f397-2910-a78a-f5544f21c33b?QuickLink=index&overridelayout=true, but it is more about filtering VC iView values with BI web items. I don't need to filter anything, just to change one iView to another in a portal view by clicking a third one.
    I have thought of placing two VC iView to a same portal page area and defining one of the to be visible and another hidden (by clicking speedometers these properties would change), but I haven't found the way how that could be done in portal. Is there a way to define some OnClick-method to change visibility parameters or url-address of another iView?
    One solution might be¨on the other hand to transfer any value to VC by clicking a speedometer and to change the visibility of the VC iViews according to that value (the speedometer #1 should in that case transfer other value to VC than speedometer #2). I don't know if that is possible with speedometers - you can't reference any characteristics or variables with it.
    If you have an idea, what would be the best way to accomplish this requirement, I would be very glad to hear about it! We are in VC 7.0.
    Points garanteed!
    Regards
    Sari

    Hi,
    In the portal, create a page and place the iView having the three input fields on top. Place the second iView below. Keep differing the second iView for every page. In this way you can make the iView with 3 input fields only in the desired pages. You can use EPCF to invoke / navigate to another iView.
    Regards
    Srinivasan T

  • Why have colors change in new update?  And won't allow me to permanently change back - as they revert on their own?

    My iCal calendar colors changed by themself.  I have gone to "edit" and "get info" and have changed the colors back.  Within minutes, they change back to the wrong color.  It has now made these same changes on my iPhone 5 and iPad mini.  What's going on?  How do I permanently change these colors?

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • Dynamical change read only property of  columns based on a profile option

    Hi,
    We are attempting to change a Oracle iProcurement(ShoppingCartPG) which has certain readonly columns by default.
    However, we need to make these columns updateable based on a responsibility level profile option. The code goes something like this.
    if readonly_profile_option = "TRUE"
    {make columnA property = readonly}
    else if readonly_profile_option = "FALSE"
    {make columnA property = updateable}
    I read the guide about switchers and it seems confusing (to me). So if someone can provide an example with some pseudocode that will be helpful.
    Also, can I dynamically add an LOV to column A if readonly is false? Of course the LOV should be disabled if readonly.
    Thanks a lot

    Hi,
    Thanks for the feedback.
    Tapash,
    Switchers definitely don't make sense.
    Raffy,
    Didn't know it was that simple. I always thought that the controller fires--> then the page renders --> then the VO attributes get poulated. Basing my understanding on this flow, I though that the bean properties can only be set in controllers and not in VOs(via SPEL). I'll try it tomorrow.
    Aprreciate your comments on the following.
    Our requirement is to make an Oracle seeded field(SupplierName in iProcurement) updateable and with an LOV . Oracle has seeded it as ReadOnly.
    I have two options.
    1. If I change the readonly property in jedeveloper(I cannot access it via personalization) and add SPEL that would be upgrade 'unsafe' customizing - I think.
    2. So I thought I'll extend the controller, substitute it and use
    messageLOVInputText SupplierNameBean=webbean.findChildRecursive("SupplierName");
    if{profle=not_read_only)
    {SupplierNameBean.setReadOnly(false)};
    else
    {SupplierNameBean.setReadOnly(true)};
    This is more upgrade safe. I have talked to the iProc development team and they are fine with it.

  • How do I change the name property of a file in a document library?

    I am trying to come up with an Event Receiver that will change the name property of an file when it is uploaded. For instance when a file is uploaded into a document Library, currently the Title is being generated (which is fine)...I want to be able to
    change the "Name" property from whatever it is, to match exactly what is in the "Title" property. Are there any sample codes/blogs out there that I can take a look at? Has anyone  had any experience doing this? It seems like something
    that should be straight forward, to change the "Name" property to match what is in the "Tilte" property.

    Hi,     
    You can try the code below which use the SPFile.MoveTo() function to change the name of the file.
    EventFiringEnabled = false;
    SPFile f = properties.ListItem.File;
    string spfileExt = new FileInfo(f.Name).Extension;
    f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
    "/" + properties.ListItem["Title"]+ "_new" + spfileExt);
    f.Update();
    EventFiringEnabled = true;
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5cafb8e4-bb85-4147-9bda-4ab42a4d4817/sharepoint-2013-event-receiver-to-rename-files-not-working?forum=sharepointdevelopment
    A link about rename uploaded file using Event Receiver for your reference:
    http://paulgalvinsoldblog.wordpress.com/2008/01/25/quick-easy-rename-uploaded-file-using-sharepoint-object-model-via-an-event-receiver/
    Best regards
    Patrick Liang
    TechNet Community Support

  • How and Where to change ESS payslip property as READ only Mode

    Hi,
      We are SAP ECC5.0 and using EP6 for ESS payslip. We have a problem
    launching ESS payslip for those employees who have Acrobat Editor and
    Reader installed. One can actually change the payslip information via
    Acrobat Editor when click onto PRINT button.
    However, for those without Acrobat Editor installed in the PC, we do
    not have such problem. Please advise how to resolve this.
    Was told to change ESS payslip property as READ only Mode. Unable to find this in the configuration setting.
    Thanks.

    You may further look at the following help link:
    http://help.sap.com/saphelp_nw04/helpdata/en/97/ccfc3f0ac2c642e10000000a1550b0/frameset.htm
    If it helps, pl do reward.
    Thanks
    Narasimha

  • How can I make a permanent change in the zoom level?

    I want to know how I can make a permanent change is the zoom level? I dont want to constantly have to change it from the default value of 100% every time I go to a different page. Thanks.

    Hello,
    You can also use the [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint] add-on to change the default zoom level for all websites at once. After setting your global zoom level, you can fine-tune the zoom on individual sites and set the options so that NoSquint remembers per-site settings.
    After installing NoSquint, go to the add-ons page to set the per-site settings:
    * Tools (or [[Image: New Fx Menu]]) > Add-ons > Extensions
    * Click the "Options" button by NoSquint

  • How to make a permanent change to AW margins

    I had to do a erase and re-install for leopard.
    I had changed the margins so that they were a permanent change but the re-install brought be back to the original default settings.
    I can not find any notes how I did it, and there is nothing under margins in a "missing manual' that mentions it.
    Can someone remind me of the way to make the change permanently,
    obviously I can do it each time using document but its annoying.
    greg

    Hi Greg,
    You wrote:
    +My template is: Appleworks WP Options.cwk (WP) as a header,+
    By the above, I assume you mean that when you open the 'template' in AppleWorks, the document's Title Bar says "AppleWorks WP Options.cwk (WP)". This would indicate that you saved the file as a document rather than a template. A template would open as "untitled (WP)".
    +I can not tell what the template enclosed box (starting points) says : Appleworks WP.+
    I don't know what you mean by "the template enclosed box (starting points)".
    I tried the get info Command + i , but the info window would not appear.
    I did it with a click for the new template and tried clicking info with a new page,
    Where were you when you did this? From your description above, you seem to be in AppleWorks, with a document open.
    Get Info is a menu item in the Finder's File menu. In the Finder, command-I is a keyboard shortcut for the File > Get info... menu item. That menu item is not available in any ot the AppleWorks modes.
    Command-I will produce a Get Info window only if you are in the Finder (the first three items in the Menu Bar will be  Finder File), and have selected a file's icon icon by clicking on it once. When you have selected a file you can go to the File Menu and choose Get Info..., or you can press command-I.
    +So obviously I need to convert it to .cws. How do I change from cwk to cws?+
    The easiest way is probably to delete the existing file, then recreate the template.
    Quit AppleWorks, go to the Finder, Locate and Delete the file.
    Launch AppleWorks, Open a new word processor document, Set the margins (and make any other settings that you want as default values in new word processor documents), then go File > Save as...
    In the Save as dialogue, click the Template radio button at the bottom right of the dialogue window.
    Change the document name from untitled.cws to AppleWorks WP Options.cws
    (Appleworks will have changed the .cwk suffix to .cws when you clicked the Template button. The application will also have navigated to the Templates folder, which is where this template must be saved to work correctly.)
    Check that;
    —the file name is correct ( AppleWorks WP Options.cws )
    —you are in the Templates folder (popup menu below the file name says Templates)
    —the Template radio button at the bottom of the dialogue window is selected.
    Then click Save.
    The dialogue will close, leaving you in the word processor document. The document's title bar sould still say "untitled (WP)". Go File > Close (or click the red Close button) to close the file. Click *Don't Save* in the alert that warns you that you have not saved the file.
    Your new default options are now set, and will apply to any new word processor document you create using any of the four standard procedures:
    1. go File > New > Word processing
    2. press command-N
    3. click the Word processing button in the button bar
    4. click the Word processing button in the Basic pane of Starting Points
    +and would that also allow me to use the get info window?+
    It will make no change in whether you can use the Get info window. See above.
    Regards,
    Barry

  • IView Property: application parameter

    Hello,
    I have a question regarding the iView property "application parameter": how can I set several application parameters?
    For example: first parameter useractionid=UAUSER; second parameter application=V01 - how can I seperate these parameters? with blank, with comma and blank or only comma, semicolon and blank or only semicolon, or anything else?
    Thanks
    Steffi Gründemann

    Hi Steffi,
    In the application URL, you can add the required parameters. First parameter followed by '?' question mark then '&' (only AND symbol). See the example below:
    http://host:port/testApplication?useractionid=UAUSER&application=V01
    Regards,
    Satya
    [Pls reward points if helpful]

  • System not listed in url iview property

    hi all,
    I am creating an URL iview. In property editor of the URL iview I cannot see not even one system listed. I checked the system, its permission, it does have end user permission.
    Can anyone help me to view the system in the url iview property.
    Thanks in advance
    -Priya

    Hi Priya,
    Here is a complete document on the portal integration of web dynpro applications (NW 2004):
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/d35bb690-0201-0010-988a-d669c8530518
    Additionally,
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/6ee03fc2269615e10000000a155106/frameset.htm
    If you are using NW 2004s,
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9
    Hope this helps.
    Regards,
    Srinivasan T
    Points=>Helpful Answers

  • How to get the iView Property value in NWDS

    Hi all,
    I my requirement I need to get some of the iView Property Value in NWDS.
    Can anybody help me for this?
    Helpful answers will appreciate.
    Thanks & regards,
    Kathiresan R

    Steps
    1. Define the properties in portalapp.xml
    <component-profile>
    <property name="user" value="asterix">
      <property name="personalization" value="dialog"/>
      <property name="plainDescription" value="User name"/>
    </property>
    </component-profile>
    2. Within the doContent(request is a signature in doContent) method of your AbstractPortalComponent please
    add the following code to access the property:
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        IPortalComponentProfile profile = request.getComponentContext().getProfile();
        String Name = profile.getProperty("user");

  • Changing LOV VO Query programmatically

    Hi All,
    I have a requirement where I need to change the LOV query programmatically based on another component on the page. The issue is demonstrated below where I need to change the 'Owner'
    LOV query based on 'Owner Type' .
    Owner Type : EMP/GRP
    Owner : Based on value in 'Owner Type' which is EMP/GRP , two different queries are fired , based on which the LOV should be populated.
    Query for Owner incase EMP is selected in 'Owner Type'(EmpLovVO) :
    select emp_number, emp_name from emp;
    Query for Owner incase GRP is selected in 'Owner Type'(GrpLovVO1) :
    select grp_number, grp_name from grp;
    I have created two VO EmpLovVO , GrpLovVO and added to the OwnerLovAM . I have written the below code to change the Lov VO in CO(processRequest).
    if(OwnerTypeVar.equals("GRP"))
         ((OAListOfValuesBean)webBean).setViewUsageName("GrpLovVO1");     
    Can you please let me know what items are to be added to OwnerLovRN and from which VO. Please note the column names are diffent in two VO's and i am using LOV component as messageLovInput. Also let me know if i am missing any step.

    Eventhough the column names are different, while creating VOs for for the LOV use alias names and make sure that both VOs have same attributes.
    Then in your controller, based on the owner set the VO instance. In your CO code make sure you also handles both EMP and GRP ower types.
    Regards,
    Peddi.

Maybe you are looking for

  • How can I change a song setting that is protected

    How can I change a song setting that is protected

  • Satellite A305D-S6848 does not start up - Windows failed to load

    SCREEN SAYS "Windows failed to load because a required file is missing, or corrupt.." file: ntoskrnl.exe status: 0xc0000098 I DO NOT HAVE AN INSTALL DISK AND DONT KNOW HOW TO GET SYSTEM BACK UP AND RUNNING?? CAN SOMBODY PLEASE HELP ME ???

  • Add new text to dropdownlist?

    I have been able to successfully delete text from the list and add new text. But it does not add in a list. I am wondering if I will have to add the text back in one at a time. I am in a UI I neglected to mention that. Here is a little piece of it th

  • Partial field value comparison

    Hi , I have a small but tricky requirement ...atleast for me ... I have a table called ABCD in that table have field called WBS which is having data format as 1234560000.01.02 but in my project internal table got PROJECT which will be data format as

  • Compiled language with similar feel to php?

    I have written several utilities for my album program in php, but this means that if I give them to anyone else they have to install php before they can use them on their own computers. I have never used C++, but the philosophy behind php seems to be