Element of the ADF: access attribute a component when it is inside a foreach statement

I have the following components:

< af:foreach >
< af:table binding = "#{BackingBean.table}" >
< af:outputtext rendered = "#{BackingBean.table.activeRowKey eq thisRow}" / > "
< / af:table >
< / af:foreach >


When there is only one table, it works fine.
However, when there is more than one table, for all tables, BackingBean.table.activeRowKey always returns the actieRowKey of the last table.


I need either to have a smart link who knows which table to return whenever I'm back there, or a way to get rid of the link by doing something like this:


< af:foreach >
< af:table >
< af:outputtext rendered = "#{parentComponent.activeRowKey eq thisRow}" / > "
< / af:table >
< / af:foreach >

The problem is that I have not found a way to get the parent component by using an expression EL (parentComponent.activeRowKey)

Any Suggestions?

Thanks in advance!

Published by: user13362247 on December 1st, 2010 13:40

Hello

a table can have a defined selectionListener. He points to a managed bean. As the selection event, you have access to the item (table). I think that should do the trick

Frank

Tags: Java

Similar Questions

  • How can you specify a class of custom style for an element of the ADF (column)?

    We use 10_1_3_3_0 ADF on Tomcat.



    We want to specify a class of extra style for a column header. We have specified the following style:



    {color: #808080} af | column.formHeader:header - text

    {

    text-align: right;

    background-color: Brown;

    border-color: #999999;

    do-family: Verdana, Arial, Helvetica, without serif.

    color: Blue;

    } {color}



    {color: #808080} & lt; sortable AF:column = "true" formatType = 'text' styleClass = "formHeader" & gt; {color}



    This doesn't seem to work. In our tests, the CSS is generated, but the new class style for the column header doesn't seem to be generated/mapped. I have reveiwed this post: Re: Jdev 11 g: how to set the width of some components on formatting of Panel. This specification (component. className::selector) is applicable for the 10g version of the ADF?



    Also, are their service/details for these selectors (e.g. ora-rule-ref - rt-rule-ref, - tr-rule-ref). I'm not clear on what they are mapped to, and how they are used.



    Thank you

    Published by: user10477345 on October 27, 2008 06:48

    Hello

    The style of the column classes will be added on theelements, not the header unfortunately. So for your use case, you will need to place the class on the table, and then use the selector

    af|table.MyStyleClass af|column.formHeader::header-text{}
    

    Unfortunately, this will affect all columns, not one so I don't know if it's going to spruce your need.

    Kind regards

    ~ Simon

  • element of the cluster access cluster

    Hello

    I am trying to remove an element of the void visible or invisible according to another cluster

    I was able to first-level access, but not more, and I don't think I've used a good way to do

    How can I make ringmenu visible option if the method 1 and not visible if method 2?

    here an attachment that I tried...

    Best regards

    Tinnitus

    Hi tinnitus,

    I can't open your vi for the moment, but maybe I can help without it. You can use a reference to it to make it visible or invisible. If you want to hide to element, you must then two references. You can get the refernce right-clicking in the mode of development, or search during the race.

    It will be useful.

    Mike

  • To access the elements of the scene, via a SWF file that is loaded inside the scene

    -J' I A.fla.

    -A.fla includes buttons, video clips and also B.swf is loaded in A.fla with a CHARGER

    -I want to access the elements in A.fla, from codes actionscript inside B.fla to change these video clips and buttons based on the actions going on in B.swf

    for example, lets say there is an X button in A.fla and there is a button there B.fla, B.swf is loaded into A.fla, and I want the key Y to delete X when you click the button.

    General question: to access the elements in a stage, via a file SWF loaded in this stage.

    This is a way silly to explain: there is this pregnant mom, a child is loaded inside him, now, I want the codes inside the child, access to MOM

    elements, such as lets say, I want the code of the child can make the eyes of MOM flashing faster. logically there is something inside something else, but I want to have access to the bigger picture of what is loaded. I hope I can get my point across.

    I repeat what I replied to your other psoting for this same question and adding just a little bit more...

    If you load a swf into another using the Loader class, then the charger itself is the parent of the loaded swf file, so MovieClip (parent.parent) could help you target the timeline that the charger was born.

    The way to have a loaded file to speak to a parent file is through the sending of events that the parent assigns headphones for after the file has been loaded.  Here is a link to an announcement that could help explain how to implement this.

    http://forums.Adobe.com/thread/470135?tstart=120

    And here's a quick example...

    Example:

    Add something to raise the event in the child:

    dispatchEvent (new Event ("eventTriggered"));

    In your SWF to loading/parent, listen for the complete event on the Loader.contentLoaderInfo.  In the complete event handler, add a listener for the event on the loaded swf file.

    triggered when external swf loading event handler
    function loaderCompleteHandler(event:Event) {}
    (event.currentTarget.content as MovieClip) .addEventListener ("eventTriggered", eventHandler);
    }

    function eventHandler(event:Event):void {}
    trace ("event sent in loaded swf");
    }

    So in your A.swf, you should have the other event and functions of event handler that would take care of control buttons.   Event listeners could be assigned to the B.swf after that that it has loaded.  In your B.swf you just have it dispatches an event and the A.swf manage self adjustments you need taken care of.  This allows the two files to be independent of each other on a functional level.

    Regarding the buttons that you want to disable, you can either use the removeEventListener() method to remove the listeners you have assigned, or you can set the mouseEnabled property to false, or you can set the visible property to false.

  • Objects of the class defined by the user for an element of the ADF (button, inputfield)

    How to set a class object defined by the user for objects of the ADF?
    My requirement is that when I make a change to the object of the class, it should get reflectected to all instances on my page.
    For example:-I'll have the class object clsInputField, and all my fields entry in my pages are based on this object. So when I change clsInputField it should get reflected to all my controls based on this class object.
    Help, please!

    It's the classic use of a library of component declarative ADF.
    Put your postal code entry filed in an adf library, as well as any other code you will need to manage the entry, pack it as a library of the adf and reuse the item (and its formatting, validation) on each page as you like.
    If you change the component changes are global to all instances of the component.

    Take a look at this demo

    Timo

  • Restoring the State of an element of the ADF

    Hi all

    Jdev version: 11.1.1.7.1

    I'm iteration on a nested list and adf creating components at runtime from my bean in scope session based on the user input, now the problem is that I have to reset available to the Group Panel again when the user clicks the button of rest and recreate all children, based on a different user input.

    The layout of the Panel group is not even when using resets:

    or the other

    searchResultPanel = new RichPanelGroupLayout();

    or

    searchResultPanel.restoreState (FacesContext.getCurrentInstance (), null);

    Can someone tell me how can I reset the State of the provision of the Group Panel in my managed bean.

    Hello

    You create the PGL programmatically? If you are only his children to programmatically create, then bind the PGL to a bean, as well as in the valueChangeListener get PGL and then remove all its children, and then add accordingly. Also, be sure to trigger a partial update after adding.

    Arun-

  • What is the network access Protection Agent and when should it be on?

    It seems to be disabled by default in the Action Center Security Section.  What does if it is turned on?

    Hello

    The network access Protection agent service collects and manages health information for client computers on a network. The information collected by the NAP agent are used to ensure that the client computer has the required software and settings. If a client computer is not compatible with the health policy, it can be equipped with restricted network access until their configuration is updated. Depending on the configuration of health policies, client computers may be automatically refreshed allowing users to quickly regain full network access without having to manually update the computer. By default, the startup type of Network Access Protection (NAP), agent service is manual under services.msc.

    See also:
    What is the network access Protection?

    http://Windows.Microsoft.com/en-us/Windows7/what-is-network-access-protection
    Networking of information that it pros

    http://Windows.Microsoft.com/en-us/Windows7/networking-information-for-it-pros

  • required = true attribute of the element of the adf

    I have the component an select radio with selectItem yes and no. I want to display some fields if I click Yes value of radio.
    now I have these fields as display is required then I set its required property to true.
    now I can display them using javascript based on selection or not in this case, if once I clicked Yes and I click the "submit" button then dosent my work of submit button because he expected to fill the required fields.
    using clientlistner and serverlistner. What happens is when I click Yes it displays error messages at the beginning before entering any value to the component. because it takes the click event.
    What will be the right approach to meet this requirement?

    Use of PPR, autosubmit = 'true', immediate = "true" and a ValueChangeListener in a manner similar to that described in the documentation:
    4.3.1 you know using the immediate attribute and the optimized life cycle

    Dimitar

  • First element of the ADF/JSF select a drop-down list is empty

    Hello

    I'm using ADF/JSF and SelectOneItemList. Everything works fine, but the first item in the drop-down list is empty. Therefore, unless the user clicks on the drop-down menu, empty everything he sees is a text box with a drop down arrow. How do I:

    1. Add "Select" to the element highest in the list, so that the box is not empty. For example. If the list has 'empty here', 'Car', 'Train', 'Plane' - how to have the first item indicated as "Select"?

    2 get the first item in the list to display in the empty box. For example. If the list has 'empty here', 'Car', 'Train', 'Plane' - how to have the first item indicated as "car"?

    Thank you

    Use the attribute unselectedLabel of the component
    unselectedLabel = "Select".
    or
    Assistant of VO value for 'No. Selection' point.

  • Pagination of the ADF - ScrollPolicy attribute is not recognized

    Hello

    I'm having a problem of paging in my application. The application is developed with JDeveloper 11.1.1.7 and I followed the steps of Andrejus Baranovskis Blog: ADF 11 g PS6 - ADF 10g Table Pagination feature is back finally.

    On my local Weblogic Server, I was able to deploy the application and confirm the paging behavior in my paintings, but when I deploy the same application (EAR) on the development environment (Weblogic) I'm not able to validate it because of an unexpected exception when opening the page.

    I found this on the server logs:

    < i > caused by: weblogic.servlet.jsp.CompilationException: could not compile JSP untitled1.jspx

    Untitled1.JSPX:34:57: this attribute is not recognized.

    rowSelection = "single" id = "t1" scrollPolicy = "page" < /i >

    Are there property of Weblogic Server that I need to turn off or to recognize this property?

    Thanks in advance,

    Manual

    Have you checked that the right (11.1.1.7.0) adf runtime is installed on the weblogic environment development?

    The error that you normally get is if you use an older adf execution on the server.

    Timo

  • Skin class customized for the element of the ADF.

    Hi all

    I use jdev 11.1.1.5.0 version

    I create a skin (css) for my adf application.

    where I set my table adf column property.

    af|column::column-header-cell {
        background-image: url("../images/yellow_bg2_rep.jpg");
        background-position: center center;
        background-repeat: repeat-x;
        color: #C4112F;
        font-size: 12px;
        font-weight: bold;
        height: 25px;
        /*    line-height: 29px; */
        /*    padding: 5px 15px; */
    
    
        border-right: 1px inset #8C8E95;
        background-color: transparent;
    }
    
    

    and is applied to all components of adf table exist on request. but my question is I want to set a different style for different table not even for all the table.

    So how can I achieve this.

    any Suggestion?

    Thank you

    Manish

    Hello

    You can create named style classes and set the table accordingly styleClass property.

    Ex:
    .table1Style af | : column-to-head-cell {}

    }

    .table2Style af | : column-to-head-cell {}

    }

    and then set the table/column accordingly styleClass property.

    Arun-

  • Open a URL within an element of the adf as PanelBox

    Hello world

    I want to enter a URL and the URL get must open in this component alone and not in a different tab. I tried with "Display URL" but page open in the same tab and I was out of view of the application root. Can someone help me?

    Have you tried af:inlineFrame to see if it does what you want

  • How to include jointly or by building criteria display elements in the ADF

    Hello

    I use Jdev 11.1.1.7

    Requirement: Here's the condition I need to run in my where cluause, although I put together "OR" during the creation of viewCriteriaItems to viewCriteriaRow, I still see AND operator to the place where

    ((STATUS_A = 'VALIDER' ET STATUS_B = "SERVICE") OR (STATUS_C = 'POST' AND STATUS_B IN ('ADMIN', 'CONSTRUCTION')))

    Here is the code

    Private Sub (ViewCriteriaRow vcRow, String status) {} populateCriteria

    vcRow.setConjunction (ViewCriteria.VC_CONJ_AND);

    ViewCriteriaItem rowViewCriteriaItem = vcRow.ensureCriteriaItem("STATUS_A");

    rowViewCriteriaItem.setValue (status);

    vcRow.setConjunction (ViewCriteria.VC_CONJ_OR);

    ViewCriteriaItem rowSrcViewCriteriaItem = vcRow.ensureCriteriaItem("STATUS_B");

    If CS is selected, then always filter the Source against the "SERVICE."

    rowSrcViewCriteriaItem.setValue (TkeModelConstants.SOURCE_SERVICE);

    }

    any help is greatly appreciated

    Thank you

    Looks like you hit a bug here. Check the https://java.net/jira/browse/ADFEMG-252 which has more details.

    You should open a SR with support.oracle.com and request a patch (payable contract support).

    Timo

  • Configuration of the system "access denied" Error Message When change of selective startup to Normal startup

    I tried to get my XP to start without using the XP CD. I changed my system Config of selective startup to Normal startup, but I get the following message:

    "ACCESS DENIED ERROR WAS RETURNED WHILE ATTEMPTING TO CHANGE A SERVICE. YOU MAY NEED TO LOG ON USING AN ADMINISTRATOR ACCOUNT TO MAKE THE SPECIFIED CHANGES. »

    How, where and what is my administrator account. I'm the only one using this pc. What is my normal name & passowrd normal or what?

    Thank you

    Thomas

    Thomas,

    Follow the step on the next page to start the computer in Mode safe.
    Once you start the computer Safe Mode, the built-in "Administrator" account should appear. I'm not saying that your user account is not an administrator account, but just to be sure to use the one built for all purposes it may serve you.

    See you soon ~!
  • To access the ADF UI components programmatically

    How to locate an element of the ADF UI by its ID and access it programmatically, without the help of the Binding property?
    What is the problem with the following code?

    {} public void onButtonPressed (ActionEvent actionEvent)
    FacesContext fc = FacesContext.getCurrentInstance ();
    ELContext elctx = fc.getELContext ();
    ExpressionFactory ef = fc.getApplication () .getExpressionFactory ();
    ValueExpression ve = ef.createValueExpression (elctx, "#{it1}", UIXComponent.class);
    RichInputText he = (RichInputText) ve.getValue (elctx);
    System.out.println (IT. GetAttributes () .get ("label"));
    it.setValue ("hehe");
    }

    'it1' is the Id of my InputText.

    Published by: Alex October 30, 2011 23:54

    Hi Alex,

    This isn't the right way to get the part #{it1} is not valid.

    Here is the code example for the component by id, but is not recommended that you need to know the parent ID of component as well and it would be difficult to maintain in the long term:

            FacesContext context = FacesContext.getCurrentInstance();
            context.getViewRoot().findComponent("")
    

    What is your exact usecase?
    No reason to not use binding property?

    Jean Lou

Maybe you are looking for

  • Offers Firefox for the Blackberry operating system soon?

    I LOVE Firefox and refuse to use anything else... except when I'm on my phone and Tablet because I have Blackberry devices. So, please don't tell me that you don't plan on a version of BB! BB is perhaps not the most popular thing, fashion, hipster ou

  • Button for loading problem

    Hi, I installed Android 5.1 (System version is 23.26.1) test of impregnation in my Moto E 1 st Gen My touchscreen is unresponsive while mobile in charge. Cannot drag it to another page. Thank you

  • Bluetooth Stack COM Server has stopped working

    When you start Windows Vista Home Premium, I get an error message saying "Bluetooth Stack COM Server has stopped working" I also received a message BTTray saying "ERROR: unable to start Bluetooth stack service". How can this problem be solved? Thank

  • Keyboard does not not - computer laptop windows vista

    When I type information online, my keyboard intermittently unresponsive. Each several keystrokes, the keyboard is not recognized, and I have to retype the special characters. As I'm typing fast enough, it's extremely frustrating. When I work on my ha

  • Nasty problem with resizing a list and a class custom CellRenderer

    Create a list (_myList) in a class with a custom CellRenderer class. In the custom CellRenderer class, I draw a rectangle with a gradient in the data() function: override public function set data (value:Object) : void { super.data = value; var tab_co