10.1.3: how the client ID of the elements in a specified af:table?

Hi all

I have an af:table (let's say the departments) with some columns (say DeptName) is one of them and (say) a range of 15 ranks. Normally, modulo naming containers, the clientId of the field DeptName is of the form:

Departments: 0_indexed_row_in_af_table:DeptName

So, for example, DeptName field in the third row of the table will be

Departments: 2:DeptName

The problem occurs when, due to, say, a data change and refresh, a partially separate set of lines appears in the table when updating. Then, all the old lines reappear will keep their old , but News clientIds lines will get new numbers, from 15. So, if the update the first and third rows in the first and fourth, retains, and retrieves new lines for the second and third position the client ID for the first fields in four departments such as they appear in the table will be:


Departments: 0:DeptName

Departments: 15:DeptName

Departments: 16:DeptName

Departments: 2:DeptName

If new data completely , the table will be rendered starting with departments: 15:DeptName.

My question: is there a way to understand, by program, what the customer for a particular area of DeptName ID will be, assuming that the table could have been refreshed with partially or completely new data in an arbitrary number of times?

Thanks much for any help.
Avrom

Hello

Try something like the following:

RichTable table = // Get the table component instance somehow;
int rowIndex = // Find the right row and get its INDEX in the ResultSet and/or data, not the row key

// Save row state
Object oldRowKey = table.getRowKey();
try
{
    table.setRowIndex(index);
    UIComponent field = table.getChildren().get(columnIndex).getChildren().get(0); // Get the field from column columnIndex
    field.getClientId(FacesContext.getCurrentInstance()); // Since setRowIndex was called, the id should be correct
}
finally
{
    // Restore state
    table.setRowKey(oldRowKey);
}

The idea of rowKey vs rowIndex is rowKey is stable to ensure that a key to the given line is always the same line (very useful to avoid a strange problem with sorting), while the line index change with the position of the line.

Kind regards

~ Simon

Tags: Java

Similar Questions

  • read the elements and index of a table

    Hello

    I use the function buildArray to build a table 1 d of 1024 items.

    Aferwards I want to extract all items + index of all the elements in another goal.

    I mean if e.g. the 1st element of my table is 10, the second is 45, the third is 65 and I want to have (0.10), (1: 45), (2, 65).

    Can you please help me.

    Use a loop FOR.  AutoIndex your table.  Use the table to build inside the loop TO create a table of the index (starting from the terminal i) and your indexed element.  Connect the new array to the output of the loop FOR (again, use autoindexing) to create a 2D array.

  • How the elements tag with two tags?

    With the following function I can tag with bold and italic tags xml elements. The problem is, I also need '< b > < i >' for example. Now my question is, how is that possible?

    function tagStyles (myXmlElement) {}

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

    app.findChangeTextOptions.caseSensitive = false;

    app.findChangeTextOptions.includeFootnotes = app.findChangeGrepOptions.includeFootnotes = false;

    app.findChangeTextOptions.includeHiddenLayers = false;

    app.findChangeTextOptions.includeLockedLayersForFind = false;

    app.findChangeTextOptions.includeLockedStoriesForFind = false;

    app.findChangeTextOptions.includeMasterPages = false;

    app.findChangeTextOptions.wholeWord = false;

    objectToTag = myXmlElement;

    italic conversion

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "italic";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

    myShift += 2;

    }

    }

    conversion "BOLD"

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "Bold";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    }

    }

    bold italics conversion

    need to be developed for other styles

    attention to the problems of nested xml tags

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.fontStyle = "Bold Italic";

    var myFindTexts = myXmlElement.findGrep ();

    If (myFindTexts.length > 0) {}

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    }

    objectToTag = myXmlElement;

    for (var j = 0; j < myFindTexts.length; j ++) {}

    var myText = myFindTexts [j];

    var myStartIndex = myText.characters [0] .index;

    var = myText.characters [-1] .index myEndIndex;

    objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})

    }

    }

    }

    When there is an element with the "Bold Italic" style it looks like this: 'my element with < b > < /b > < i > "BOLD" and the italic text < /i > '. There it looks like this: ' my element with < b > < i > bold and italic < /i > < / b > text.

    Does anyone have an idea on this?

    Thanks in advance!

    Dear Stamm,

    Try this...

    objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})

    App.Select (objectToTag.texts);

    App.Selection [0] .associatedXMLElements [0].xmlElements.Add ("i", app.selection [0]);

    Kind regards

    Bala

  • How the elements of knot delete\retract?

    Hello

    I want to delete\retract node using my server (c#) elements, as in the Console of the room (see picture to attach it)lccs.JPG

    How can I do this?

    Thank you

    Eyal.

    With the latest version of the SDK, available at DevPortal, we have added operations node to the server API, so now you can call retractItem and removeNode of a server environment.

  • How the elements of provision correctly

    I am struggling to align 2 imagebuttons vertically and horizontally on the dev c alpha and z10, regardless of orientation.

    Without defining preferredHeight of containers that I'm now trying the container on the alpha c dev does not fill the whole screen vertically so I don't get a full black background - only about 2/3 of the full black screen vertically, but it works well on Z10.

    So now, I try to get the background black everything at the bottom of the screen on the dev c alpha using preferredHeight but then items start at the top of the screen rather than centered vertically.

    What is the right way to do it?

    Container* container = Container::create().background(Color::Black)
                                   .layout(DockLayout::create())
                                   .add(Container::create().background(Color::Black)
                                   .preferredHeight(display.pixelSize().height())
                                   .horizontal(HorizontalAlignment::Center)
                                   .vertical(VerticalAlignment::Center)
                                   .layout(StackLayout::create()
                               .orientation(LayoutOrientation::TopToBottom))
                                   .add(imageButton1)
                                   .add(imageButton2));
    

    Try this:

    Container* container = Container::create().background(Color::Black)
        .layout(DockLayout::create())
        .vertical(VerticalAlignment::Fill)
        .add(Container::create()
            .horizontal(HorizontalAlignment::Center)
            .vertical(VerticalAlignment::Center)
            .layout(StackLayout::create())
            .add(imageButton1)
            .add(imageButton2));
    

    Orientation for the StackLayout TopToBottom is by default, so you don't need to specify it. Also, one thing you pouvez have to do is give the internal container a "setMinHeight '... I'm not entirely sure at this moment if the two ImageButtons displayed correctly...

  • How the output content as they are processed

    It is probably a very simple question, but I wonder how the elements on a page of output, because they are treated, instead of having to wait for the entire page processing to do before you post anything. Does make sense? Thank you!

  • Set the color of the element table (active/inactive)

    Hello

    I have an array whose elements are in the date format. is it possible to programmatically change the color of the elements for the active/inactive States?

    Thank you

    Hello labviewette,

    If you mean the colors of the elements in a simple constant table in the active/inactive case you cannot change the colors.

    In Active mode, the text is always black with white background and in idle mode it's the two grey-white.

    I hope I have understood you.

    Kind regards

    Stefan

  • Y does it does anyone know how many client can connect at the same time on the Microsoft VPN server?

    Hello everyone

    Is there anyone know how many client can be connected same time on microsoft VPN Server?

    Thank you

    Original title: VPN Windows Server 2012

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • How the program e-mail later in compare with Google GMail, especially in the treatment of spam or are both about the same?

    How the program e-mail later in compare with Google GMail, especially in the treatment of spam or are both about the same?

    Firefox does not include an email client. You ask about the suite Seamonkey? Seamonkey support options are here: http://www.seamonkey-project.org/community

  • Trying to understand how the Eloqua cookies work and relate to a user

    Greetings,

    I'll just start where I think my basic understanding is for the moment and move what I seek to clarify and accomplish.

    High level understanding:


    • The user hits your Web site that contains the "Eloqua traceability Code" in this topic.

    • Cookie is created that is grouped with ".". Eloqua.com.

    • The user goes to a form and submits their contact information OR surfed a bit before hitting a form

    • … At this point, I get a little misty... *.

    • Eloqua treats the presentation (or create a new record or at the e-mail address and adds the information as prescribed in the existing record)

    • (Will not enter treatment programs because they are not relevant to my question)

    • Eloqua is to the top of the confirmation page

    * So here's what I'm foggy on...

    1. How/where the cookie will be created. I followed to this 'image' tag in the elqImg.js file. (http://now.eloqua.com/visitor/v200/svrGP.aspx?pps=3 & siteid ={SITEIDHERE} & ref2 = elqNone & tzo = {TIMEZONECODE} & ms = 933 & elqCookie = 1). This is the only method of creation of the cookie, calling this URL?

    2. This GUID in the ELOQUA cookie, is the one that is now linked to the folder of the user once they succeeded to convert?

    The goal

    What I do, it is a construction of a method aside server to validate users return, those who have converted for example via a form and are known to me.

    I have an idea what happens to the code, I'm just here to chop the process on the side of Eloqua how it handles data as well as what look for it system to properly attach the USER = this cookie GUID (if that even happens).

    If it's worth whatever it is we're always on Eloqua 9 If this has an impact on the method.

    Any help is appreciated.

    Thank you kindly

    Hello Adam,.

    I'm not quite clear on the use cases that explained you at the end, but I'll explain how the creation of cookie:

    When you followed the scripts on your page - in this case, you have the old synchronous tracking scripts, the call to the function img.js below

    results in the creation of cookie. Please note that there is no code client which translates into the creation of cookie, but when this line of code above is executed, this triggers a call to our svrGP.aspx page - as you have already noticed, and exist on our server-side. This page performs certain functions among which is to create a GUID and drop a cookie on the browser if it isn't one already. This page is also responsible for the creation of a visitor profile, which is a record in our visitor table in the database that has a GUID primary key - which is what contains the Eloqua cookie.

    Thank you

    Tarek

  • How my client sign documents using a pen on an iPhone or an iPad?

    How my client sign documents using a pen on an iPhone or an iPad?

    Hello

    In order to sign documents with the stylus, iPad/iPhone; the user select my draw your signature.

    When you select this option, click the signature box to draw your signature using the stylus or touchpad.

    Kind regards

    Mohamed

  • How to replace the element on the page master on master spread [JS CS5]

    Hi all

    There is a big media (scripts) on how to replace the element template on a page of a specific document, but my problem is, I've added new Master spread based on a further propagation where newly added distributed Master I need to replace all the elements to master basic page.

    pageItems [curPageItem] .override (destinationPage)

    works well if you replace the elements of master page on the pages of a document, but what works for replace page elements master master page for example

    pageItems [curPageItem] .override (destinationMasterPage)

    Thank you

    Mac

    Similar code worked for me (in CS4 - the machine, I had very practical is the one I use to accompany clients on older versions). Are you sure that your destinationMasterPage is a page and not a spread? This would cause a failure.

    Dave

  • How the line prefetch impact using memeory on oracle.

    Support, we have a table whose structure is like (a varchar2 (4000), b varchar2 (4000), b varchar2 (4000), b varchar2 (4000)). If we fill the with row table of maximum length, i.e.: all ranks will be have4 * 4 k = 16 k data. Then set line prefetch (in sqlplus, arraysize) 5K, then for each extraction, oracle will send 16 K * 5 K = 80 M data to the client. My question is: whence these 80 M stored in oracle?

    I first thought these 80 m will get PGA/UGA, but my tests show me the UGA and PGA are less than 5 M, that size is not enough to store the data of 80 M. Oracle will store the data in the buffer of the decision-making level operating system once all the data is ready? Such as: get 15 K data, put it in the socket buffer, get the data from 15 K one another, put it in the socket buffer, so there is no need for oracle store these 80 M within the oracle database? But 80 M data is too large for the buffer of the socket.

    user646745 wrote:
    My question is if the customer will use super great memory if set prefetch too high. The trace file said oracle is occupied on sending data of 5000 lines without interruption. If the customer must have little need of memory to store. My perl above test has confirmed that it takes a lot of memory to the high setting prefetch.

    Yes. It depends on how the OCI (Oracle Call Interface) is used. The [Oracle® Call Interface Programmer Guide | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci04sql.htm#sthref645] States:

    >
    In order to minimize the server back and forth and optimise performance, the SPOUT can preload lines of result set when executing a query. You can customize this prefetching by setting an OCI_ATTR_PREFETCH_ROWS or OCI_ATTR_PREFETCH_MEMORY of the statement handle attribute using the OCIAttrSet() function. These attributes are used as follows:

    * OCI_ATTR_PREFETCH_ROWS sets the number of lines to be read beforehand. If it is not set, the default value is 1. If the OCIStmtExecute() iters parameter is 0 and prefetching is enabled, lines are buffered during calls to OCIStmtFetch2(). The value of read-ahead can be changed after the execution, as well as between extractions.

    * OCI_ATTR_PREFETCH_MEMORY sets the allocated memory to be a prior extraction lines. The application then retrieves lines as much as can fit in this amount of memory.

    When both of these attributes are specified, the Prerecupere BEAK of the lines up to the OCI_ATTR_PREFETCH_ROWS limit, unless the limit OCI_ATTR_PREFETCH_MEMORY is reached, in which case the NOZZLE return so many rows than fit in a buffer of size OCI_ATTR_PREFETCH_MEMORY.

    By default, the preload is turned on, and the SPOUT recovers an additional line all the time. To enable disable prefetching, define the attributes of the OCI_ATTR_PREFETCH_ROWS and the OCI_ATTR_PREFETCH_MEMORY to zero.
    >

    Therefore, if either prefetch value is high. client memory use will also increase at the same time. The '+' safer + two methods would be to OCI_ATTR_PREFETCH_MEMORY the value that you specify then a size of buffer extraction absolute memory... whereas the use of OCI_ATTR_PREFETCH_ROWS can cause a heavy memory hit to extract lines very large and in turn use very little memory when you read the small lines.

  • How the batch of photos of change in Version 2.0 of Photos... impossible to find the function.

    How the batch of photos of change in Version 2.0 of Photos... impossible to find the function.  If it has been deleted to "improve" the Photo experience?

    Lot, what exactly will change?

    Titles, Descriptions and capture date - Yes.

    Select the images you want to change the title or the description and to set-up the info (command-i) pane.  Enter the title or the description in the appropriate field and he will be assigned to all selected pictures.

    If you want to batch, change the title with sequential use attached many Applescripts provided by users in the Photos for Mac user tips section.

    Batch change/correction of dates is provided by the Image ➙ setting Date and time menu option:

  • How the work of automatic channel selection?

    Hi all

    I was wondering how the AUTO function works on an Airport Extreme/TimeCapsule channel selector 2.4/5 GHZ?  He selects a channel only started upward or is constantly searching for the best channel and according to the needs of switching?

    Thank you.

    Hi solomani,.

    At startup.

Maybe you are looking for

  • WiFi: no hardware is installed

    Hi, I'm on macbook pro retina 15 ", CPU 2.2 GHz Intel Core i7 memory 16 GB 1600 MHz DDR3, Intel Iris Pro 1536 MB graphics card. El capitan 10.11.5 OSX yesterday, once I close the lid of my laptop for a while suddenly I can't connect to the internet.

  • I get double Firefox screens declined downloads articles. With the help of FF19

    FF19 opens fine. However when I go to open an article reduces the brightness of the screen and when he returns to retouch the brightness, there are now two screens, one behind the other. When this happens, I am unable to do anyhting in FF and must en

  • Photosmart 8250 works on Windows 7 comp., but can not find the box tool

    Hello I have a Photosmart 8250 installed on a Windows 7 computer.  The printer works well and I know now that the HP Solution Center is no longer available for Win 7 so no Toolbox is available here.   However, HPs link called "What Happened HP Soluti

  • HP OFFICEJET 8500 A. slow to start printing

    HP OFFICEJET 8500 a take sometimes several minutes to begin network printing.

  • Dell Inspiron 15 speakers out from time to time?

    It's strange, I'm new to this forum and I'm sure this has been asked over and over again. However I can't find an answer to my particular problem. First off, I love this phone I got it one year exactly. No problem whatsoever so far. A week ago, I tur