Custom attributes of access in a bean managed to webcenter 12 c

WebCenter Portal: Webcenter 12 c

How can I access custom attributes in a bean managed to webcenter 12 c.. ?

I found the following blogpost to 11.1.1.8: http://blog.vassit.co.uk/knowledge/access-global-custom-attributes

It is said to add libraries:

  • Model of WebCenter spaces
  • WebCenter spaces customer

Cannot find these libraries in snapshot .ee 12 c.

Update:

The class I used in this blog post only works in 11g and it is an internal class that should be avoided to use as it may change in future versions.

It is an example of change.

It is offered in the Public Oracle Fusion Middleware Java QAnywhere for Oracle WebCenter Portal class WCApplicationContext that will allow you to access using Java through many steps.

WCApplicationContext wcAppCtx = WCApplicationContext.getCurrentInstance();
WCApplication wcApp = wcAppCtx.getApplication();
WebCenterType wcMeta = wcApp.getApplicationConfig();
CustomAttributes customAttr = wcMeta.getCustomAttributes();
...

This course may not be available in the libraries provided by JDeveloper 12.2.1 and you include library webcenter-core - api .jar manually.

I don't know why these classes are in the library and not offered public API catalog of libraries of the ADF in the JDeveloper 12.2.1

Anyway, as suggested by the use of Vinay and his colleagues the EL Expression as he goes to work.

Note: I'll blog in my personal blog

Hope this information helps everybody.

Kind regards.

Tags: Fusion Middleware

Similar Questions

  • Custom attribute OAM in the Workflow Manager user

    I need to add a custom attribute (defined in the person object class) to the User Manager workflow. I'm administrator of Master and I could see objectclass and attribute in the current configuration-> tab objectclass.
    But when I try to install 'Attribute Access Control', I don't see a custom attribute in the list.
    can you please how to make available in the workflow custom attribute?

    Thank you

    If you use OID, check if the attribute is indexed.

  • I try to install an air 320u sierra wireless card and I get an error message "could not access vb run time for custom action script. Cannot install the Manager of mobile broadband services.

    could not access vb run time for custom action script

    I try to install an air 320u sierra wireless card and I get an error message "could not access vb run time for custom action script.  Cannot install the Manager of mobile broadband services.  Any ideas?

    Hello

    I suggest you run the fixit and see if it helps:

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

    Also check out this link:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_programs/error-2738-could-not-access-VBScript-run-time-for/1a4499ae-8bc1-4534-9c6f-4d399ac70d9a

    It will be useful.

  • How to associate a bean managed with model custom content presenter

    Hello

    We use webcenter Portal 11.1.1.8.

    We have created the model of presenter content customized by using application portal Webcenter Framework. We use the Portal Server model Extension to extend Webcenter portal. The requirement is to associate a bean managed with the presenter of custom content model.

    Thanks in advance for your help.

    Nikhil,

    You can download DesignWebCenterSpaces to the URL http://download.oracle.com/otndocs/tech/webcenter/files/DesignWebCenterSpaces_11.1.1.8.0.zip

    It has the "WebCenterSpacesResources" project, which helps you to organize the active portals (including the content presenter models) and resources of portal to create/update.

    If you want to use beans controlled inside the presenter content model:

    (Development of components in ADF for WebCenter portal using the PortalExtension project http://docs.oracle.com/cd/E29542_01/webcenter.1111/e27739/jpsdg_wcsres.htm#JPSDG14173)

    1. you create the bean managed in PortalExtension project

    2. set up in faces-config. XML

     

        myManagedBean

        com.Portal.CP. MyManagedBean

        request

     

    3 deploy a part of extend.spaces.webapp.war.

    After deployment, the managed bean will be available for the presenter content model.


    K

  • Access EJB session bean in JSF managed bean

    Components of the project: Weblogic 11 G + 12 c, 12 c EJB3 JPA 2 Jdeveloper-ADF

    I need to access EJB session bean in JSF managed bean and some methods of execution by program

    Work method and return EJB below
    Is this fair? Another way

    public static Object getEjbForDataControl (String name) {}
    BindingContainer DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCDataControl cDataControl = bindingContainer.findDataControl (name);
    Return cDataControl.getDataProvider ();
    }

    Thank you

    Mohsen

    Hi Isabelle,.

    I assumed that his Session EJB bean has not been exposed as a data control (my bad, didn't read any of the discussion).

    Antonis

  • Webenter spaces: Display of Presenter content with bean managed model

    Hi all

    I use 11.1.1.6 Webcenter spaces.

    I created a content model view presenter and a bean of support. Then I bound the jsff with support bean attribute attribute.

    In the page space model is displayed.

    JSFF:

    --------

    < af:iterator lines = '1' var = 'node' varStatus = 'iterator' value = ' #{node} "id ="it0.

    First = "#{backingBeanScope.WebBanner.Rand} '"

    >


    BackingBean:

    ----------------

    public class WebBanner {}

    public WebBanner() {}

    }

    public int getRand() {}

    RN random = new Random();

    Return rn.nextInt (5-0 + 1) + 0;

    }




    Somehow the value of the first attribute is still to come as 0, even if I tried to hardcode in the bean method.


    I just wanted to know how to save the beans controlled in Webcenter spaces?


    Kindly help.



    Kind regards

    Deepak


    Hello.

    As you are not in the latest version of the WebCenter then you've to follow one of the following methods:

    First approach:

    • Go to your project to DesignWebCenterSpaces .
    • View the file adfc - config.xml hidden in the configuration of the project.
    • Save your managed bean and add the file adfc - config.xml as part of the profile of the custom.war deployment.
    • Deploy using ANT scripts and restart WC_Spaces.

    Second approach:

    • Add your managed bean to the adfc - config.xml a your deployments custom shared libs.
    • Deploy using ANT scripts and restart WC_Spaces.

    I hope it helps.

    Kind regards.

  • Change the VM with custom attributes defined in a CSV file

    Hi all

    I'm doing something that I think should be simple (but this is the first time I used powercli and am not a good code writer), but I find it hard to tell.

    I created 2 custom attributes (owner and owner of the SSG system) in vCenter for my virtual machines.  I have a list of vm names csv and their associates "owners".  I would use powercli to read the csv file and connect to the VC server and the 'owners' of entry in the appropriate field.

    I borrowed com code from various places on the internet and these forums but I can't seem to make it all work.  I managed at least to read the information in the csv file and is displayed on the screen of my laptop.  What I can't do is get 3 columns in the csv file to be recognized as variables (unless there is some default variables I don't know) I can put in the game-Annotation lines.

    The code I have is:

    # Input range, includes all IBD VM names that are registered.
    $data = import-Csv "C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\vmowners1.csv"-Header ('Hostname', 'Owner', 'SSG owner')
    # $data | Get-Member
    Write-Output $data
    # Loop over all the VMS in vCenter
    ForEach ($row in $data)
    {
    # Create variables for the current virtual and its 'Contact' and 'Description' computer that are custom attribute fields.  Also create a $note string to use Set-VM-Description
    $hostname = get-VM-name $vmname;
    # $contact = $vm | Get-Annotation CustomAttribute - user;
    # $description = $vm | Get-Annotation - CustomAttribute Description;
    # $note = $contact.name + ":'t" + $contact.value + "' not n" + $description.name + ":'t" + $description.value;
    Set Annotation - entity $hostname - CustomAttribute "Business system owner" - value $SSG_owner
    Set Annotation - entity $hostname - CustomAttribute "SSG system owner" - value $system_owner
    # Set - VM - VM $vm - $note Description - confirm: $false;
    }

    The result, I get on my screen is:

    PowerCLI C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts >.\setvmownership.ps1

    Owner of the company that owns SSG host name

    --------                                              --------------                                       ---------

    ABPPROXY-00-AH

    ACE-01-AH hung Laallmmi hung Laallmmi

    Get - VM: could not validate the argument on the parameter 'name '. The argument is null or empty. Provide an argument that is not null or empty, and then try the AGM of the order

    in.

    To C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:13 char: 29

    + $hostname = get-VM-name < < < < $vmname;

    + CategoryInfo: InvalidData: (:)) [Get - VM], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:17 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "Business system owner" - value $SSG_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:18 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "SSG system owner" - value $system_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Get - VM: could not validate the argument on the parameter 'name '. The argument is null or empty. Provide an argument that is not null or empty, and then try the AGM of the order

    in.

    To C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:13 char: 29

    + $hostname = get-VM-name < < < < $vmname;

    + CategoryInfo: InvalidData: (:)) [Get - VM], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:17 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "Business system owner" - value $SSG_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    Set Annotation: Impossible to validate the argument on the parameter "entity". The argument is null. Supply a non-null argument, and try the command again.

    C:\Program Files (x 86) \VMware\Infrastructure\vSphere PowerCLI\scripts\setvmownership.ps1:18 char: 23

    + Set-Annotation - entity < < < < $hostname - CustomAttribute "SSG system owner" - value $system_owner

    + CategoryInfo: InvalidData: (:)) [game-Annotation], ParameterBindingValidationException)

    + FullyQualifiedErrorId: ParameterArgumentValidationError, VMware.VimAutomation.ViCore.Cmdlets.Commands.SetAnnotation

    The CSV file looks like this (but continues for about 500 VMS):

    I go with the option import-csv because that said something that I read in my troubleshooting efforts would empty columns and error I received and that import-csv correctly would intrepret in empty columns.

    hostname, business_owner, system_owner,

    ABPPROXY-00-AH,

    ACE-01-AH, James Laallmmi, James Laallmmi,

    acrodev-00-ah, tflessa, Bruce Hastings,.

    ACT1DDB00AH, Bill Mancini, Mike Bruni,

    ACT1TDB00AH, Bill Mancini, Mike Bruni,

    What should I do to be able to get this script to work? I don't know that it is related to messages "argument is null." that we see in the output.

    Thank you

    Dan

    Hello, dscottimw-

    You were on the right track.  There were a couple of things to change to make it work as you want:

    1. either remove the "-header" part of the Import-Csv line or delete the actual header of the CSV itself - these are elements in conflict (the "-Header" param names of the columns in the CSV and assumes that the CSV file has already no header row)
    2. you need to access the properties of the $row variable in the ForEach loop - not only call the names of the CSV column headers (this is why you may receive errors on things 'null' - whether you use variables that have no value)

    Try this:

    # Input array, includes all VM names from DCI that are registered.$arrVMsInfo = Import-Csv "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\scripts\vmowners1.csv"#Write-Output $data
    
    ## loop through all VMs listed in the CSV, setting custom attrib values for eachForEach ($row in $arrVMsInfo) {    ## get the VM for this row    $vmThisOne = Get-VM -Name $row.hostname    Set-Annotation -Entity $vmThisOne -CustomAttribute "Business System Owner" -Value $row.business_owner    Set-Annotation -Entity $vmThisOne -CustomAttribute "SSG System Owner" -Value $row.system_owner} ## end foreach
    

    And, to give it a shot without actually play the game on annotations, to make sure things go as you like, you could add a - WhatIf to each line in Set-Annotation in the ForEach loop.

    Which works better for you?

  • Reporting to include custom attributes of Vm and organized through multiple vcenters.

    Hello
    We are just moving our production test vfoglight solution & have you come across a bit of a weird one. We had a report / discovers that would list all virtual machines in our virtual Center and displays the custom attributes in a nice - good for the management report, form etc. However, we are moving to a new instance of virtual center & we have a test instance too - all are present in vfoglight, but our report draws only the custom of the original vcentre attributes. I'm not wcf script guru, but I gave it a good look & can't see a way forward - the hero of any script out there who could take a look and help out?
    Moreover, do you think I could put in a request for support for this one & get any joy?

    Hope someone can help - I'll post all the files needed etc.

    Kind regards

    Jonathan

    Thought of it at the end - on the second vcenter vmware foglight agent did not have the ability to collect custom attributes in the service.config file set to true. After true and restart the collector and the connector, everything was fine.

  • Web, portal center-list of buddies in bean managed

    Hi all

    I'm working on the webcenter Portal project and I need to get the list of buddies from the playlists of the connection in the bean managed so that I can make a business logic on them.

    Any help appreciated.

    Thanks in advance.

    Kind regards

    Faye

    I followed the procedure to retrieve the friends/connections from a user in below managed bean. For the below work to drag and drop the data connections of people webcenter getConnetions() control on page jspx API and the corresponding bean we can access by getting links, as shown below:

    BindingContainer bc =

    BindingContext.getCurrent () .getCurrentBindingsEntry ();

    OperationBinding links =.

    bc.getOperationBinding ("getConnections");

    {if(Bindings!=null)}

    System.out.println ("Got the link to connectionLists");

    try {}

    Map params = bindings.getParamsMap ();

    params.put ("userid", loginuserid);

    params.put ("connectionListName", "");

    params.put ("filterPattern", "");

    params.put ("sortBy", "");

    params.put ("startIndex", 0);

    params.put ("fetchSize", 10);

    ArrayList buddylist = (ArrayList) bindings.execute ();

    System.out.println ("size Executed connectionLists DC," + buddylist.size () + "-> list of buddies from dB" + buddylist);

    }

    Thank you

    Kind regards

    Faye.

  • How to write the field of custom attributes the end of the backup of the VM VM?

    Hello world

    I would like to know if it is possible to write about the attributes of custom field of VM or at least in the 'Notes' field after the virtual machine has been saved?
    I know that this question involves the combination of two parts that is knowledge of VMware, Powershell and maybe Windows Server as well?

    The message that must be written every day in the custom field attribute will be "last backup time DD/MM/YYYY '.

    I used to access this feature in Veeam Backup but not since I'm now on HP Data Protector (very old and primitive software) in my new business, I work for.

    Any help and advice would be appreciated.

    Thank you.

    Hello, AlbertWT-

    To set the value of the 'Notes' field, you can use the Set-VM cmdlet such as:

    Get-VM myVM | Set-VM -Description "Last backup time $(Get-Date -Format 'dd/MM/yyyy')" -Confirm:$false
    

    To set the value of a custom attribute, you can use the method "setCustomValue()" of .net machine virtual View object, as shown in the answer to the thread "defining annotations / fields customized directly through VM object". ""

    Message edited by mattboren: added links to the documentation

  • Help of Bean managed using the definition

    I work to create a Managed Bean help for definition Help as described in "19.5.3 How to create the Managed Bean help ' section of the RPF Interface User Guide Developer Web ADF." With the help of JDev Version 11.1.2.1.0.

    Thought I had all of the artifacts assembled, but when I run the message is: < ELHelpProvider > < _getTranslationMap > ELHelpProvider helpSourceExpression has the value zero.

    Any suggestions would be greatly appreciated.

    Here is the managed bean:
    public class ELHelpProviderProjRequest extends ELHelpProvider {
        
        public ELHelpProviderProjRequest() {        
        }
        
        /* To use the HelpProvider, the EL expression in the helpTopicId attribute must point to a Map, otherwise
           * you will get a coerceToType error. */
    
        public Map<String, String> getHelpMap()
          {
              Iterator iterator = _HELP_MAP.entrySet().iterator();                 
              while(iterator. hasNext()){        
              System.out.println("hash map entry " + iterator.next());
               }
    
            return _HELP_MAP;
          }
         
        static private final Map<String, String> _HELP_MAP = new HashMap<String, String>(); 
            static {
              // each element [put] can be for a separate helpTopicId attribute 
              _HELP_MAP.put("MAPHELP_CATEGORY_CAPITAL_DEFINITION", "Map value for credit card definition");
              _HELP_MAP.put("MAPHELP_CATEGORY_OTHER_DEFINITION", "Map value for credit card instructions");          
            }
            
    }  
    Here's the adf - setting.xml in sources of demand / META-INF:
    <?xml version="1.0" encoding="windows-1252" ?>
    
    <adf-settings xmlns="http://xmlns.oracle.com/adf/settings" >  
      <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/settings">
      <help-provider prefix="MAPHELP_">
        <help-provider-class>    
            com.corpnet.abc.util.ELHelpProviderProjRequest
        </help-provider-class>
        <property>
          <property-name>helpSource</property-name>
          <value>#{helpTranslationMap.helpMap}</value>
        </property>
      </help-provider>
    </adf-faces-config>  
      
    </adf-settings>
    Here are the faces-config:
    <managed-bean>
        <managed-bean-name>helpTranslationMap</managed-bean-name>
        <managed-bean-class> com.corpnet.abc.util.ELHelpProviderProjRequest </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    In the inputText, here is the helpTopicId component:
    <af:inputText value="Test" inlineStyle="font-weight: bold;" id="it31" simple="true" helpTopicId="MAPHELP_CATEGORY_CAPITAL" readOnly="true"/>

    The two following changes should take care of this issue:

    (1) the managed bean should not exceed ELHelpProvider, i.e.

    public class ELHelpProviderProjRequest {
    ...
    

    (2) in the adf - setting.xml use oracle.adf.view.rich.help.ELHelpProvider for the help-provider-class, i.e.

    ...
    oracle.adf.view.rich.help.ELHelpProvider
    ...
    
  • Custom attributes not visible user on the user profile in OIM 11 g

    Hello

    As I have created a custom attribute in OIM11g. I'm not able to view the attribute after that I have the Fund a user to IOM.
    Please help me to solve my problem.

    Thank you
    Srikanth

    It's a very basic thing. Just trying to create a permission policy , and you know how to do it. For your reference, I am also paste the excerpt from Metalink Article

    After the creation of the UDF, please follow the steps below to make the visible UDF for editing by the user admin:
    1. navigate to create a new 'authorization Policy' as below:
    a. login to the user interface and click Administration
    b. at the top left, you'll see the authorization policy tab
    c. now, click on create a permission policy
    2. Please use the information to create the following permission policy
    a. name: policy of the UDF
    (b) name of the entity: user management
    c. Permissionsc. Permissions:
    i. edit user profile
    User profile of view II.
    Please ensure that the UDF is selected in the attributes of these permissions.
    d. data constraints: all users
    e. policy assignment: all users
    3. create a user called "useradmin" and add the below 2 roles: "."
    a. all users (this is default)
    b. identity user administrators (this will provide administrative support to this user tab so that it can administer other users)
    4. create another end user called "testuser1" people the necessary fields.
    5. now connect as "useradmin.
    6. search a user called "testuser1" and open the user.

  • Error by calling the method on Bean managed from an other managed Bean

    Hello

    (Jdev 11.1.1.2.0)

    Help please:

    I have a managed bean (page scope of stream) that is used by my homepage for navigation of flow dynamic region:

    * / public class RegionNavigationBean implements Serializable {* +}
    private String dynamicTaskFlowId = "/ WEB-INF/home-task-flow-definition.xml#home-task-flow-definition"; +

    * public RegionNavigationBean() {* +}
    *}*

    * public TaskFlowId getDynamicTaskFlowId() {* +}
    Return TaskFlowId.parse (dynamicTaskFlowId); +
    *}*

    * public void setDynamicTaskFlowId (String taskFlowId) {* +}
    this.dynamicTaskFlowId = taskFlowId; +
    *}*
    *}*

    taskFlowId is set to the homepage def to + * ${pageFlowScope.regionNavigationBean.dynamicTaskFlowId} * +.

    In a table (i.e. display on my model layer object) DB I store a menu ID and a corresponding task_flow_id.

    Then I created a class of earphone action (RegionNavigationListener - scope of stream page) which I link to my menu on my main page items (property listener action on the item of menu = + * #{pageFlowScope.regionNavigationAction.processAction} * +)

    In this action (processAction method) listening port, I retrieve rowset in the VO menu and find the record that matches my menu ID that triggered the action event, recovering the task_flow_id that needs to be accessed.

    I then try to retrieve the instance of the RegionNavigationBean with the following statement: RegionNavigationBean regNav = (RegionNavigationBean) JSFUtils.getManagedBeanValue ("regionNavigationBean"); +.
    It seems to work fine, but as soon as I try to use it I get a NullPointerException error, for example:
    regNav.setDynamicTaskFlowId (menusRow.gettaskFlowId ()); +
    or:
    System.out.println ("%" + regNav.toString ()); +

    This is quite new to me... any help would be appreciated!

    Thank you
    Mario

    Hi Mario,.

    I tried following codes to get a bean managed in a region, it is very good for me.
    ManagedBean is the name of the class.

    FacesContext ctx = FacesContext.getCurrentInstance ();
    Application app = ctx.getApplication ();
    ManagedBean MB = (ManagedBean) app.evaluateExpressionGet (ctx, "#{pageFlowScope.managedBeanName}", ManagedBean.class);

    Todd

  • Groovy expression session bean managed property

    Hi all
    I can't establish the expression of right groovy for obtaining a value of session...
    <managed-bean>
        <managed-bean-name>user</managed-bean-name>
        <managed-bean-class>ro.sinoptix.view.managed.User</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    in my VO...
     <Variable
        Name="pid"
        Kind="where"
        Type="java.lang.String">
        <TransientExpression>
          <![CDATA[sessionScope.user.id]]>
        </TransientExpression>
      </Variable>
    and the error is... Variable sessionScope unrecognized... session does not work

    Thank you
    PS: where can I find something on groovy in adf?

    You can't do that. Managed bean reside only on the side of ViewController. You do not have access to them in the part of the model.
    Expose a method in your module to request to put value on the client side to side Server and y. Alternatively, you can pass the value as a parameter to a method in the t that can then work with it.

    Timo

  • After you open an ini file, I can put deny using the attribute denying access?

    I want to open an ini file and set its attribute access to any shares with another person. But when running.

    LabVIEW crash every time.  My environment is xp + labview8.5. Help me please check my Subvi.

    If labview does support not it, how can I set attribute to access ini file?

    Thank you very much.

    The output of open Config data is a refnum for the * data * in the file and not the file itself.

    You need open (open/create/replace file) instance of the file to generate a file refnum.

Maybe you are looking for