How to bind the 'Visible' attribute programmatically

I use 11.1.1.6 JDeveloper.


I have a MyBean method:

Boolean isImgVisible() {}

a logic here

}


If I have a page fragment with

< af:image visible = "#{pageFlowScope.myBean.imgVisible" "

ID = "i2" source="/Images/img.gif"/ >

The 'Visible' link is ok


But I want to do it programmatically


In my bean, I created a RichImage


RichImage img = new RichImage();

img.setSource("/Images/progress.gif");

IMG.setVisible("#{pageFlowScope.myBean.imgVisible");  This does not of course

How to link the method above (isImgVisible()) 'Visible' attribute programmatically?

Thank you

In case someone needs it:

RichImage img = new RichImage();

img.setSource("/Images/progress.gif");

img.setValueExpression ('visible' createValueExpression ("#{pageFlowScope.myBean.imgVisible"));

Helper method

public createValueExpression (string expression) {} ValueExpression

FacesContext facesContext = FacesContext.getCurrentInstance ();

Application app = facesContext.getApplication ();

ExpressionFactory elFactory = app.getExpressionFactory ();

ELContext elContext = facesContext.getELContext ();

ValueExpression valueExp =

elFactory.createValueExpression (elContext, expression,

Object.Class);

Return valueExp;

}

Tags: Java

Similar Questions

  • How to set the initial value programmatically in af:selectOneChoice

    Hi all

    How to set the initial value programmatically in af:selectOneChoice

    filled with view object instance, but I want to show the value initial programmactically

    This can help you: Re: how to set the default value of the component selectOneChoice in ADF

    and the default af:selectOneChoice programmatically from backing bean

  • No logic in the visible attribute?

    FB 3.1

    I have the following code which determines whether a key should be displayed

    < mx:Button id = icon = "{app.nextIcon"nextButton"}" label = "Next" visible = "{wizard.selectedIndex < 0}" / > "

    I get this error:
    The value of the 'visible' attribute must not contain the ' < ' character

    I found this bug that relates to the text attribute, which is marked as closed (cannot fix). It is not a bug quite serious but serious in the context of the 'text' attribute with the attribute "visible."

    had a similar problem. Solved by reversing the logic. use:
    visible = "{0 > Wizard.SelectedIndex}" "

  • How to set the ToolTip text programmatically?

    Anyone know how to set the ToolTip text programmatically? forms10g, db10g.

    Thank you
    m.

    Hello

    You can use the SET_ITEM_PROPERTY to define the criterion of an element tool tip.

    SET_ITEM_PROPERTY('.', TOOLTIP_TEXT, '');
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • How to change the connection attribute in ODSEE?

    Hello
    Can someone help me how to change the default login of ODSEE attribute? By default, cn is used as username to sign in on ODSEE but I want to change it to the new attribute for example uid. All relevant information not found online? Anyone has an idea about this?

    Thanks in advance.

    Thank you
    Olga

    It isn't really a "connection attribute" for LDAP.

    As mentioned above, how you "login" really depends on the application.

    "Connect" (BIND) in the most common way, you send a LINK demand, and the DN of the user input and the password of the user.
    The LDAP server locates the input from the user through the DN, then encrypts the password provided and compares the encrypted value to the one stored in the user input.
    If they match, the CONNECTION succeeds, and this particular TCP connection is "connected".

    Where things differ between applications is in the way they get the DN of the user.

    No request (AFAIK) only requires the user to type in its DN.
    The user will enter his login name. This name will be stored as an attribute in user input. The only real constraint on the attribute is that he must have a syntax that allows human readable characters as the value (the login name) and there must be a method to ensure that the value is unique in all instances of the attribute (not 100% true, but suggests so for our purposes here).

    So we have a name - say "Fred".
    Using this name, that we must find the one and only entries that has the attribute that we will use (say cn) to contain the user name.

    There are basically two ways to do it.

    The most traditional method assumes that all user entries are stored under a specific node - lets say "or is people, dc is company, dc = com"
    so that the user DNs use CN as the RDN, would be Dn of Fred: cn = Fred, or = people, dc = company, dc = com.

    Simplistic applications will simply have a dn, something like skeleton: cn =, ou = people, dc = company, dc = com

    They will take the name of the user supplies and replace with this name, then use pray DN deadlocked.
    The problem is that this is not always the case that user input is stored together like that and some really pathetic apps will be "cn =" party hard coded so your user was worth better have a DN beginning with cn = and not uid =.

    Modern applications most often perform a search to locate the unique name. The research will use a filter something like (uid = fred) fo find the DN of the entry where the UID attribute has the value "fred". This unique name is then used in the BIND request.

    This second method is much more flexible, especially if the application allows you to specify your own search and does not assume its always going to start with "uid ="... Unfortunately, many applications still do.

    The only downside to this second method (apart from a little bit more work for the application developer) is that the application requires permissions to perform its search, the attribute he seeks REALLY needs to have an index of equality and, of course, overhead of a supplementary search for each user authentication.

    So - as noted above, you can use any attribute you want, but do depend on so your application is able to use.

  • How to change the visibility of an indicator programmically using a checkbox

    1. How do I change the visibility of an indicator of programmically using a checkbox?

    2. How can I change the color of a thermometer? I mean, this is how I can change the color when the temperature reaches a certain value?

    Nodes property.

    Right-click on your indicator.  Create > property Node > Visible.  Your Boolean checkbox wire that.

    For the thermometer to create a property node and choose FillColor.  A constant color box wire to one that is in its graphics & > range of image feature.

  • How to bind the elements in the PC, items added in the "edit items...". "list of combobox

    Hello

    Could someone please tell me how can I bind the items added in the "combo box" could be linked to files saved in my PC and if a new file is added in the same folder in my PC, it could be added directly to the list of the combo box items... Thanking you in advance

    Concerning

    Julien

    Thank you very much...

  • How to add the transient attribute for LOV (object of the view read-only)

    I have a view called CustomerView and attribute DepartmentId is present in it.

    Also exists DepartmentView and CustomerView.DepartmentId has an LOV from this point of view.

    I need to add a transient attribute to CustomerView which express the DepartmentName attribute in the LOV.

    Because of the view are read-only there is no entity object don't match them.

    How can I write the groovy for the transitional object expression.

    The name of the view accessor Lov's DepartmentView1

    Looking for your help. Thank you.

    Hi gcoban

    I do not understand your question correctly,

    you are not able to write to the expression property in viewObject?

    or you want to know how to write groovy for that?

    for writing groovy you need viewAccessor and you who have, you can try as Alejandro Tovar Lanz suggested

    or you can write code in RowImpl to fill in the name of the Ministry of the accessor

    See -https://blogs.oracle.com/adf/entry/combo_lov_how_to_display

    Thank you

  • How to limit the visibility of the GSM Spec

    Hello

    an our client ask us whether it is possible to limit the visibility by business unit for the Specs of the wording, but not for other GSM specifications.

    for example: a user should be able to access all materials (BU 'A', 'B', 'C'), but can access the formulation in BU 'A' only.

    I thought to divide the workflow of formulation based on BU.

    In this way, we have to create:

    1 wf for formulation in BU 'A '.

    1 wf for formulation in BU 'B '.

    1 wf for formulation in BU 'C '.

    1 wf for formulation in BU 'A B'

    1 wf for formulation in BU 'A C'

    1 wf for formulation in BU 'B, C '.

    The problem is that we have 7BU and this way, to create a workflow for each combination of BU (too)

    Is there another way to restrict access to the GSM Spec?

    I hope my question is clear, otherwise do not hesitate to contact me.

    Thank you very much.

    Best regards

    Stefano.


    Can you provide the business case for use around this problem so I can understand how you are eager to take advantage of business unit?  It may just be a different way of thinking about the business organizational unit.  For example, you can set up your business as follows unit structure:

    Formulation

    > A

    > B

    > C

    Material

    > A

    > B

    > C

    There may be some minor usability, but these concerns can be solved with future improvements of the user interface or UI extensions.

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

    The information that I have, and if you do not want to reorganize your BU you could do the following:

    1. give the user access to BU A, B, c in the UGM so they will be able to see the materials in their search results.

    2. use visibility Tags in your model of formulation of CCA to hide formulations BU B and C of the user in the search results

    3. use our extension of veto of specification plugin to restrict read access to the sheet of formulation based on business rules.  Our right of veto plugin allows you to restrict access to any user based on specific rules.  For example, even if the user has access to A, B and C, they still would not be able to open the specification because it is a language specification and they are not in Group X.   You can even get fanciful, if the user only has read access to all specifications of the child, then they cannot open the spec parent etc.

    If your rules are simple, then this may be the easiest to manage.  It really depends on how predictable and simplistic your access rules are. You can learn more about our veto spec plugin extensibility Guide.   You can learn more about the tags of visibility in the white paper EQT visibility with our other user guides.

  • How to use the VO attribute in the URI of the destination link added in customization

    Hello

    The notification of approval of application, I need to add a link to a custom page. This custom page requires the id of the request as a parameter header.
    For the page, we have a function. The function is called in the link.

    If I add this link on the row requisiton area, it works because I can just refer to the VO attribute and the value is transferred.
    But this means that the link is placed on each line.
    The user wants to see this link only once.

    So I tried to add a link on another level.
    The problem seems to be that I can't reference requisiton header value in the URI of destination when the link is created out of the box 'lines '.
    The value IS available and displays in any element of Message Style text create in customization.
    But in a link element, I don't know how to get the value of the URI of the destination.

    Can someone help me please?
    What is the correct syntax to do this?

    Thank you
    Ronny

    Hi Ronny

    Maybe you need to explicitly specify the Name property of the VO on your item link, depending on which area it is in.

    Thank you very much

    Richard

  • How to change the focus of programmatic way?

    Hello

    1. how to change the orientation of a programmatic way?

    2. is it possible to set the tab order?

    With respect,
    Wai Phyo

    (1) http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17491/tagdoc/af_scrollComponentIntoViewBehavior.html
    (2) without

  • How to read the value attribute and put inside?

    What happens if we want to read the attribute value? And want to put the data of runtime on the value of the attribute as

    < psoID ID = "user id" / >

    How to get the value of the ID as the user id. And how to put the run value on it?

    I can think about is that

    /psoID/@ID/value GOLD psoID/@ID/*[local-name () = 'value']

    And how to put the value inside ID ="? »

    Thank you

    Because we are dealing with a structure of type anyType you must use the functions of node (local name) in combination with predicates ([]) to read or write values (node) of the element:

    To read the value for example use the copy rule:




    This wil read:

    /processResponse/result/psoID/@ID

    on the message:





    You will see the value 'B '.

    To write, you use:




    Kind regards

    Melvin

  • How to assign the sequence attribute

    Hello

    I want to create the new record in the employee table, but the emp_id column must be fill in sequence.

    There where I should write coding to do this next sequence val when I press the button to create employee.

    That means I want newly created record with following number based on the sequence.

    How to approach the issue?

    Please explain to me the steps to do this.

    Thanks in advance,
    SAN

    SAN,

    The same logic as specified above, will work for you.
    Initialize the VO based EO & attach the employeeId of the bean attribute, you get depressed your condition.

    Kind regards
    GYAN

  • How to control the visibility of TextField based on segments of chronology?

    Hello

    I have 3 text fields that display weather web service XML from Weather.com.  3 text fields should be visible for a certain segment of Flash video which is defined in the context of the application.  AS3 use to specify the visibility?  If so, how to reference a certain range of images in which fields should be visible?

    Thank you

    SID

    Yes, you can set the visible property to true/false to any DisplayObject instance. Use the property currentFrame of a clip to know what segment you are in...

  • How to add the XML attribute to an element using BPEL assign

    I have a xml request to a bpel process that contains no attribute.
    After some process, I need to create this missing attribute and specify a value.

    I tried to use the XML fragment in the business to be divested. But how do I create an attribute?
    This XML node which I am trying to create an attribute is a very large knot with many dynamic typing(xsi:type). I can just re - create the complete xml code with the required nodes.

    Anyone know how I can create an attribute xml using the BPEL entitlement? I don't want to use the Java code in my process.

    Thank you.

    You can use the attribute bpelx:insertMissingToData on the item to copy, for example:




    Query="/client:process/@time"/ >

    If not there is time of the attribute in the process element, it will be added.

Maybe you are looking for