Definition of the properties on the managed Bean user interface component:

Hello

I use jdev 11.1.1.1.0 version.
In Managed bean, I get the component by using the id given in page .jspx.
the code I am uisng is:

FacesContext fc = FacesContext.getCurrentInstance ();
UIComponent uc = (UIComponent) fc.getViewRoot () .findComponent ("it32");


Here, the component is sometimes RichColumn and sometimes RichInputtext.
In the case of RichInputText, I need to set the readonly property to true/false depending on some condition .i found no setReadOnly() ant on the UI component.

so I think to convert the UIcomponent type RichInputText or RichColumntype. (if I convert the means I get methods like setReadOnly(), setVisible())
How is it possible.

(or is anyway to set the "readonly", 'visible' properties on UIcomponent itself in the Managedbean without conversion).


PLs help me
Sanchez.

Hello

You can get the instance of the component or use UIComponent.getAttributes () .put (attributeName, attributeValue); For example:

theComponent.getAttributes().put("readOnly", Boolean.TRUE);

Kind regards

~ Simon

Tags: Java

Similar Questions

  • How to access the managed bean taskflow action result?

    Hi all
    I have a requirement where I have two areas of text (username and password) and a SignIn button. When the user clicks login, my action managed bean will run the view object and get the password for this user name. And that's why it will compare the password presented by the user and the password came from the view object. I a taskflow, in which I have two points of view, we're signIn page and other is the home page, and the result of the action is successful.
    The managed bean method here signIn Page for SignIn button.

    public String execute() {}
    String EnteredPassword = PassEncrypt();
    ApplicationModule am = ADFUtils.getApplicationModuleForDataControl ("AppModuleDataControl");
    ViewObject myView1 = am.findViewObject("LogindetailsView1");
    System.out.println ("Usrname is" + this.) (Username);
    myView1.setNamedWhereClauseParam ("v_Username", this.) (Username);
    myView1.executeQuery ();
    DCBindingContainer links =
    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCIteratorBinding empIter = bindings.findIteratorBinding("LogindetailsView1Iterator");
    String DBPassword = empIter.getCurrentRow ().getAttribute("Password").toString ();

    System.out.println ("password is" + DBPassword);

    {if (EnteredPassword.Equals (dbpassword))}

    Here, I need to call the result of success, which will allow the user to get access to the display of the home page in taskflow.

    }
    else {}
    FacesMessage fm =
    new FacesMessage (FacesMessage.SEVERITY_ERROR, "Please check your name of user and password",
    "Please check your name of user and password");
    FacesContext.getCurrentInstance () .addMessage (null, fm);
    }
    Returns a null value.
    }

    If this can be done using the method call in taskflow then how could use it in my script?
    Please suggest.
    Thank you.

    you have a rule of navigation between these two pages
    If so, simply return the navigation rule name

    if(EnteredPassword.equals(DBPassword)) {
    return "success";
    }
    
  • The changing scope of the managed Bean to backingBean ask causes error

    Hello:

    With jdev 11.1.2 on windows xp sp2.

    I had an application to work with a scope of backingBean support bean. I made that one change... that is, changed the scope to request in the section of the managed Bean of adfc - config.Xml.
    After you make this change only, I get the following error on execution of the application. What I am doing wrong?

    Thanks for the help.



    Error 500 - Internal server error
    javax.el.PropertyNotFoundException: //C:/Documents and dsteger/Settings/Application Data/JDeveloper/system11.1.2.0.38.60.17/o.j2ee/drs/DD1/ViewControllerWebApp.war/page1.jsf @6,65 binding = "#{backingBeanScope.backing_page1.d1}": unattainable target, 'backing_page1' returned null "
    at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:133)
    at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1897)
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1109)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:511)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:157)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:167)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
    to org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ ChangeApplyingVDLWrapper.buildView (ViewDeclarationLanguageFactoryImpl.java:341)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:982)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged (Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    If you change the extent of the scope of the request, then, the value should be like

    #{backing_page1.d1}

    If its scope of the bean to support, then it will be

    #{backingBeanScope.backing_page1.d1}

    If the scope of the page flow, then it will be

    #{pageFlownScope.backing_page1.d1}

    guess you got it now...

  • Type of transaction SOUL in the management of users (additional access authorization)

    We are looking for use the feature "Request additional access" self-service in the user management to allow existing users to request additional responsibilities (we're on EBS 12.1.3, all user access is entirely in EBS without integration of SSO).

    I was able to set up so that it works very well if no approval is required for the new responsibility, but we would also like some requiring approval of line manager/supervisor until responsibility is granted - documentation related to the management of users tells us that we can add a Type of Transaction SOUL in the field "Type of Transaction for approval" when creating a new registration process , but nothing more than that. I wonder if someone could point me to any more detailed documentation that would help us to work on the question of whether we can use an existing transaction of the SOUL - or how to create a new one for this particular task?

    Thank you.

    Andrew

    In case anyone else has this problem in the future, I connected an SR and support pointed me to a really useful note on My Oracle Support on how to do

    How to create the Type of Transaction for approval of the SOUL. B or higher? (Doc ID 420387.1)

  • Cannot open the file resource user interface

    Hi all

    I have to do an interview on a 2000 project (don't remember what version of the CVI was). I have 10 files IUR in the project and open all fine in the IDE, but one. I get the following message: "cannot open the Pnl_Main.uir user interface resource file (suddenly reached the end of the file).

    I've checked all my backup and they are all identical, so if there is a file corruption, he is old enough.

    In any case, here is the file, in case, can someone tell me what is wrong with him, or maybe open and re-record with an older CVI in case it's just a problem of version...


  • Structure of the event without user interface

    I tried a quick and effective solution for a structure of event that is not a case of timeout and is part of a vi that has no user interface, but I have sent configuration data to the structure of the event.

    Let me be more clear: I have a camera that generates several events taken by a loop with the structure of the event inside.

    The provider of the camera give me this example of Labview code with all the events I'm interested and how they are implemented. I should mention that when you write a command of camera that a response to an event, but when you connect first to the camera there are more than 100 events generated by the latter, or when you download camera there are also several events. When there is no communication to the camera, the structure of the example event is inactive. The example includes a user interface to change settings and the program responds very well.

    I have to integrate this camera in great demand in which camera photo will be configured in a pragmatic way with number of the type of user interface in the example given by the manufacturer of the device.  First, I tried to design a loop with timeout cases in which a queue can send the data to the device setting configuration. Everything is good until the download when code needs to hold events in a certain way; in my case, an event is taken another goes to the time-out period and so on. After two sets of 100 images download, during the third round Labview gets blocked (Labview not responding) and I have to kill Labview. I got designer of the camera that if camera events are not taken they are kept on a pile and when the battery is full causes the Labview locked.

    Maybe I give too many details, but the question is: how to communicate with a struct event that is not a case of timeout and does not part of a user interface vi (it doesn't have a sign in my application)?

    Oops... Sorry about that.  I've attached an example what I'm talking about here.

    -Austin

  • How to change the size of the user interface component

    Hello

    How can I change the size (width and height) of the user interface component?  For example, I want to set the width of a ListField and add a scroll bar (horizontal). Thank you.

    Young

    GetPreferredWidth and getPreferredHeight methods can be rewritten to change the requested dimensions of a field.

    However, this does not mean that a field will support horizontal scrolling with only this change and can vary depending on the field.

  • createTextField() will not work with the user interface component

    I use ActionScript to create a TextField and it works very well.

    If I then add (button or checkbox) user interface component to the stage of the textfield stops displaying.

    If I remove just the button on the stage of the object TextField does not always display. If I then remove the button component symbol in my library, TextField appear again!

    Here's the script. It works as long as there is no UI component in the library.

    See Code attached. Displays text, it will stop the display if you put a button on the stage.


    Thanks for any help

    MRC06460CT

    Hello

    I thought I had fixed this problem, but you are right. If I put the arguments in the correct order, the text does not go far.

    Thank you very much

    Mike Cohen

  • How to get the value of the user interface component in managed Bean

    Hi people,

    How to access the value of a component managed bean?
    <af:inputText value="#{bindings.Name.inputValue}"
                            label="#{bindings..Name.hints.label}"
                            required="#{bindings..Name.hints.mandatory}"
                            columns="#{bindings.Name.hints.displayWidth}"
                            maximumLength="#{bindings..Name.hints.precision}"
                            shortDesc="#{bindings.Name.hints.tooltip}"
                            id="Name"
                            partialTriggers="Type">
                <f:validator binding="#{bindings.Name.validator}"/>
              </af:inputText>
    I want the input value of the component name.

    thnks

    You can use this in your managed bean

    ...
    // get the binding container
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    
    // get an ADF attributevalue from the ADF page definitions
    AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Name");
    String val = attr.getInputValue();
    
    ...
    

    Timo

  • Difference between the managed bean scopes.

    Hello.

    I have jdeveloper 11g and I wanted to know what is the difference between the scopes when managed beans (FlowScope, request, Backed Bean, etc.).

    Kind regards.

    Refer

    Blog of Ashish Awasthi (Jdev/ADF): extended memory for ADF Managed Beans - according to the directives of the Fusion developer's guide

  • [ADF, JDev12.1.3.] Where I save the managed bean used by a fragment? Main stream unlimited task or btf?

    Hallo,

    I have a fragment for which I created a managed bean extended backingBean.

    My doubt is where I save this bean.

    In the main stream task without terminals? Or in the stubborn workflow in which the frament is used?

    Thank you

    Federico

    In the BTF where the fragment is used!

  • Closing popup workflow throws exceptions of serialization is not the managed beans.

    JDev 11.1.1.6

    When a popup that is launched from a work stream is closed, this exception is thrown for a lot of managed beans I set:

    [< SessionBasedScopeMap > < writeScopeMap > ADFc: scope objects serialization failed (no serializable object), scope='viewScope[/WEB-INF/get-value-rules-task-flow.xml#get-value-rules-task-flow@GetValueRules]', objectKey = 'GetValueRuleBean', 'com.mtg.fwd.view.beans.GetValueRuleBean' = objectType.

    < SessionBasedScopeMap > < writeScopeMap >

    java.io.NotSerializableException: com.mtg.fwd.view.beans.GetValueRuleBean

    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)

    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

    at oracle.adfinternal.controller.util.Utils.verifySerializable(Utils.java:341)

    at oracle.adfinternal.controller.state.SessionBasedScopeMap.writeScopeMap(SessionBasedScopeMap.java:122)

    at oracle.adfinternal.controller.state.ViewScope.writeObject(ViewScope.java:90)

    ...

    Related Posts: ADFC-0619: check failure of popup by taskflow application approval

    I tried setting the scope of control of data in the workflow for the popup shared and isolated, the behavior is the same.  I thought that the scope must be insulated for the tf of the pop-up window.  The data-control-scope on the calling workflow shared.

    No idea why?

    Thanks - Rudy

    I don't know if you can disable registration points. However, I'd go for the second option to bind components to ask the beans reach max.

    This way you don't have problems later and it is best practice not to tie UI components to the higher bean then ask. You can adopt the UIManager (https://blogs.oracle.com/groundside/entry/the_uimanager_pattern) model.

    Or use ComponentReference as shown here https://blogs.oracle.com/ATEAM_WEBCENTER/entry/rules_and_best_practices_for

    Timo

  • Download the managed bean resource file

    Hello

    Please help me, how can I access and get the values of the resource file in a managed bean?
    Thanks in advance

    Kind regards

    Joseph Joby

    Hello
    Check

    http://technology.AMIS.nl/Blog/4076/context-sensitive-resource-bundle-entries-in-JavaServer-Faces-applications-going-beyond-plain-language-region-variant-locales

  • the managed bean error message display

    HIE

    on my page there are 3 data related to text entry boxes, and all are mandatory.

    There is a text box more input that is not bound to a data control.

    the button submit, I have a managed bean action method. In this action method I get the value of these data - not related to the input area and make a logic.
    From the I want to launch an error message on the UI for this component.

    How to do this?

    Vik
    http://adfjsf.blogspot.com
    http://Twitter.com/vikceo

    Hello

    You can do this using the FacesMessage class and this can be written anywhere within action/actionlistener/valuechangelistener/post etc...

    Example Code:

    //adding global message, which is displayed with af:messages tag
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Value entered is invalid");
    context.addMessage(null, msg);  
    
    //Component level message, need to use af:message tag. This component level message is also displayed under af:messages tag unless globalOnly property is set to true
    msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "component level message - Value entered is invalid");
    context.addMessage(FacesContext.getCurrentInstance().getViewRoot().findComponent("
    

    Jean Lou

  • Best practices for the management of user access in ESXi host without 'root '.

    What is the best way to make the management of the user access to the ESXi host after you disable the default root account. Is it better to create induvidual accounts

    Via vCenter or intergrate Active directory or any other specific way.  Please help me to clarify this point. Thanks in advance for your answers.

    With the release of ESXi 5.1 it is possible to create an account on the ESXi host and assign them Full Admin privileged but there are a lot of admins of loggin in each ESXi host and user account creation.

    I would like suggestions to add the ESXi to AD and add the authorization based on domain accounts.

Maybe you are looking for