Get the current line in an iterator

Hello

Using jdeveloper 11.1.2.4.0.

I used af:iterator to browse the lines in my af:form. Here's the source of my jspx page.

< af:iterator id = "i1" value = "#{bindings." Var MdBhItpProblemView1.collectionModel}"="row ".

varStatus = 'vs' >

< af:panelLabelAndMessage label = "Problem statement" id = "plam1" >

< af:inputText id = "it15" value = "#{rank." ProblemStatement} "/ >"

< / af:panelLabelAndMessage >

< af:panelLabelAndMessage label = "Goal" id = "plam2" >

< af:inputText id = "tirer16" value = "#{rank." Goal} "/ >"

< / af:panelLabelAndMessage >

< af:panelLabelAndMessage label = 'Indicators' id = 'plam3' >

< af:inputText id = "sortent17" value = "#{rank." OutcomeMeasure} "/ >"

< / af:panelLabelAndMessage >

< af:panelLabelAndMessage label = 'Objective' id = 'plam4' >

< af:inputText id = "it18" value = "#{rank." Goal} "/ >"

< / af:panelLabelAndMessage >

< af:panelLabelAndMessage label = 'Intervention' id = 'plam5' >

< af:inputText id = "it19" value = "#{rank." Intervention} "/ >"

< / af:panelLabelAndMessage >

< af:panelGroupLayout layout = "horizontal" id = "pgl1" >

< af:panelLabelAndMessage label = "Date deadline" id = "plam6" >

< af:inputDate value = "#{rank." Date_cible}"id ="id_1"/ >

< / af:panelLabelAndMessage >

< af:panelLabelAndMessage label = 'Date of the resolution' id = 'plam7' >

< af:inputDate value = "#{rank." ResolutionDate}"id ="id_5"/ >

< / af:panelLabelAndMessage >

< af:commandButton actionListener = "#{bindings." Delete.Execute text}"="remove. "

Disabled = "#{!}" bindings. Delete.Enabled}"id ="cb2"/ >

< / af:panelGroupLayout >

< / af:iterator >

I added 2 buttons create insert and delete. So am clicking the button always delete the first row is deleted. I need to remove exactly same line of an iterator.

If you use an iterator, you will need to provide the current line yourself. If you use an af:table the table handles it for you.

You can use an af:setPropertyListener on the buttons push the PK line to a variable binding, or a bean as

in this case, row.id is the pharmacokinetics of the current line and bean.currentRowId the bean property save you the row id when the button is clicked.

In the removal and the method use then the currentRowId to search for the line and delete it.

Timo

Tags: Java

Similar Questions

  • JavaScript help: get the current line inside tabular

    Hello world

    I hit a roadblock for a simple JS code: to get a current line for my tabular form. My environment is: Apex 4.2.6 on Oracle 11.2 with 3 Bootstrap for styling.

    The query in tabular form is as simple as this:

    Select

    "REF #"

    «INV #»

    "MANUFACTURER."

    "DISCOUNT."

    'PRICE ',.

    "UPC",

    "DESCRIPTION."

    quantity,

    "LINE NO.",.

    "" step by step

    of Order_items

    Now the emphasis here is "stepper", it is defined as "text save any State", in the expression of the HTML, I added this:

    < div class = "btn-group" >

    < button type = "button" class = "btn, btn - lg" onclick = "plusClicked ()" > + < / button >

    < button type = "button" class = "btn, btn - lg" onclick = "minusClicked (); ">-< / button >

    < / div > <!-/-> button

    The screen is as follows:

    Screen Shot 2015-02-06 at 9.44.49 AM.png

    In the header of the Page Javascript section:

    function plusClicked() {}

    var line, qty;

    Row = $(this). Closest ("TR");

    I tried row = $(this) .parent () .closest ("tr");

    same undefined result

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The result is always: 'most clicked qty = undefined ".  Inspect the code says this:

    Screen Shot 2015-02-06 at 9.57.49 AM.png

    Any help and suggestions are greatly appreciated.

    The few I tested it seems solid to me.  I think you have to pass 'this' to plusClicked and minusClicked.

    onclick = "plusClicked (this)" "

    Then, the function can do:

    function plusClicked (btn) {}

    var line, qty;

    Row = $(BTN). Closest ("TR");

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The other approach, I like it for it's with a DA.  I would like to add a class to the buttons instead of the onclick.

    DA would be during the click on jQuery selector .btnPlus

    and the JS to run would be:

    var $row = $(this.triggeringElement) .closest ("tr");

    var qty = $row.find('input[name=f09]').val ();

    Alert ('most clicked qty =' + Qty);

    I hope this helps.

    Thank you

    -Jorge

  • get the current line by a treetable

    Hello
    How to get the selected line in a treetable. (in support)

    Thanks in advance

    Hello

    call the getSelectedRowKeys. In a single-selection model, this returns a set with a single entry, which is a list of paintings representing the rowKey.

    RowKeySet selectedRows = treeTable.getSelectedRowKeys();
    //use EL to access binding (note that you can do this in Java as well)
    JUCtrlHierBinding treeTableBinding = (JUCtrlHierBinding) executeValueExpression("#{bindings.}");
    //get first entry of selected rows (single selection case)
    JUCtrlHierNodeBinding node =  treeTableBinding .findNodeByKeyPath((List)selectedRows .iterator().next());
    ... do the work with the node here ...
    
    private Object executeValueExpression(String valueExpression){
          FacesContext fctx = FacesContext.getCurrentInstance();
          ELContext elctx = fctx.getELContext();
          Application app = fctx.getApplication();
          ExpressionFactory exprFactory = app.getExpressionFactory();
          ValueExpression valueExpr = exprFactory.createValueExpression(
                                    elctx,
                                    valueExpression,
                                    Object.class);
           return valueExpr.getValue(elctx);
          }
    

    Frank

  • How to get the current line or the entire paragraph?

    Hello.

    I am facing the following problem:

    Suppose I have the following in FrameMaker:

    It is a sentence. And (end of single line)

    There also this sentence. (end of paragraph)

    It is a sentence. And (back)

    There also this sentence. (end of paragraph)

    It is a sentence. And (end of single line)

    There also this sentence. (return)

    But there is also this sentence (end of paragraph)

    It is a sentence. And (end of single line)

    There also this sentence. (return)

    There also this sentence. (return)

    But there is also this sentence (end of paragraph)

    What I want is this:

    Download the text of the entire paragraph where the insertion point of the cursor is.

    However, when exist from the ends of the hard line I want to change their behavior.

    This is the behavior to the foregoing:

    For the first example of the paragraph if the cursor is either first or second line I want to get the whole paragraph.

    Paragraph if the cursor is in the first line, I want only the first line. And if it's in the second row, I want only the second line.

    The third paragraph if the cursor in the first or second line, I want the first and second lines must be retrieved in plain text. Also, if the cursor is in the third line I want only to the third line.

    For the fourth paragraph, it functions as the third paragraph. If the cursor is in the third row I get only this one.

    Could you please provide of the FDK in C++ to start with code?

    It's a puzzle.

    As you are in the forum script, I am related to this here. You must understand the FDK C++ code yourself.

    There's not much to tease my brain with it. You get the point where the cursor is and pick up the pieces of text more line via the GetText() method, using a bit field which includes the FTI_String and the FTI_LineEnd. Each end of the line has a modifier that tells you if it's a hard or a return. You also get the offset in the paragraph of the current position of the cursor, and then create the necessary strings from the array of items of text returned by the GetText method.

    If you want the full execution of the code, ask someone to program it for you and be prepared to pay for the work.

    Good luck

  • How to get the current line of advanced table

    Hello

    I have the following code to retrieve the value of one of the columns of an advanced table column:
    OAViewObject vo = (OAViewObject) am.findViewObject ("AAALineVO2");
    If (vo! = null)
    {
    OARow vorow = (OARow) vo.getCurrentRow ();
    ColA string = (String) vorow.getAttribute ("ColumnA");

    String message = ColA; to send a message so I can check the value of the column
    throw new OAException (message, OAException.INFORMATION);
    }
    He perks up the first value of the first column to record properly, but when I add a new line, is not picking up the column value more.

    What I am doing wrong?

    Thanks in advance,
    N

    method findRowByRef (java.lang.String) not found

    Make sure that you write it in AMImpl not in CO.

    Thank you
    AJ

  • Get a specific line of an iterator when loading of the page

    Hi all
    I m new on JDeveloper/Adf and I have a problem with that:
    I have an iterator that contains a few lines extracted from the base and I want to show the information of a specific line when I load the page. I get the values that identifies my line of parameters.
    What I want is to define an action such as 'Next' or 'Previous' in the definition of page my .jsf that I can use to get a specific line. Then invoke this action using 'invokeAction.
    I appreciate if anyone can help.
    Thanks in advance...

    Just played around with it. The carousel component does not set the current line automatically. You must add a spinListener as

    public void onSpin(CarouselSpinEvent carouselSpinEvent) {
                   List currentSelectedKey = (List) carouselSpinEvent.getNewItemKey();
    RichCarousel carousel = (RichCarousel) carouselSpinEvent.getSource();
                    CollectionModel componentModel =
                                  (CollectionModel) carousel.getValue();
    JUCtrlHierBinding carouselTreeBinding =
                       (JUCtrlHierBinding) componentModel.getWrappedData();
                    JUCtrlHierNodeBinding selectedCarouselItemNode =
                   carouselTreeBinding.findNodeByKeyPath(currentSelectedKey);
                    DCIteratorBinding dcIterBinding =
                                 carouselTreeBinding.getIteratorBinding();
                    dcIterBinding.setCurrentRowWithKey
                       (currentCarouselItemKey.toStringFormat(true));
    }
    

    to set it by code.

    Timo

  • Get the current value of the menu a cluster ring

    Hello

    I am trying to program a bunch of rings of menu to use the same options and disable the option even in the other rings of menu if it has already been chosen. It works essentially as is at the moment, but it shows each button by using a 'deactivated' option because I'm turning off the option even in the buttons that have this value. I did it using a loop knot and property and [] DisabledItems en mass. Now, I want to go to the iteration of the loop for the menu ring which already has this value.

    To do this however, I want to get the current numeric value of the ring of menu and an array of search values. If the value of menu rings appear in this table, then I want to move to the current iteration of the loop. The problem I have is that when I try to use a property node and type the property value, instead of giving me a long 32 output, it gives me the so-called 'Variant', which I have not seen before. I'm not sure how to find a table and see if the value I have is in this table. "Search table" seems just an index to be returned, I think that I want a Boolean or something. I'm also not sure how to skip an iteration of the loop (although I imagine it won't be too difficult to understand mine, I hope).

    I apologize if this is very obvious, or if my message is not clear. I started using LabVIEW, a few weeks ago and I'm still learning. I have included a picture of my Subvi downstairs.

    Thank you
    Nathan

    Variant of data allows to convert the variant to a numeric type (whatever representation you need).

    Search D 1 table returns-1 if the element was not found.  If you just compare the index with a greater or equal to zero and the result will be if the element was found in the table.

  • How can I get the current paragraph?

    I want to get the current paragraph where the insertion point is.

    How can I do this in FDK?

    Ch,

    I can answer some of these questions, but if you have decided that this thread is replied, please give credit to Mike.

    About the audit for a FO_Pgf object, you shouldn't have that. I think that there is some obscure cases where F_ApiGetTextRange() gives you an object that is not a paragraph... I forgot exactly but I think it has to with a text graphic subject line or something like that. I could be wrong. In any case, if you have a stream of regular text with an insertion point, you will get a paragraph object.

    This line will abort the operation if any text is selected. Do you really want that?

    If (insertionPoint.beg.objId! = insertionPoint.end.objId)

    This line will abort the operation if several paragraphs are selected. Do you really want that? Without this verification, you will always get the text of the first selected paragraph.

    If (insertionPoint.beg.offset! = insertionPoint.end.offset)

    Otherwise, the code looks OK to me, at least regarding the FDK calls. You have problems with him?

    Russ

  • Get the first line selected on the CommandButton Click

    Hi guys,.
    My version of jdev is 11.1.1.5.0. I have table on my Page of Adf.

    < af:table value = "#{bindings." MyvwVO1.collectionModel}.

    var = "row" rows = "#{bindings." MyvwVO1.rangeSize}.

    emptyText = "#{bindings." MyvwVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    filterModel = "#{bindings." MyvwVO1.queryDescriptor}.

    queryListener = ' #{bindings. " MyvwVO1.processQuery}.

    filterVisible = "true" varStatus = 'vs' rowBandingInterval = '1 '.

    columnSelection = 'single '.

    Summary = "Table of suppliers.

    selectionListener = "#{bindings." MyvwVO1.collectionModel.makeCurrent}.

    rowSelection = "single" id = "t2".

    "partialTriggers =": soc1: ctb2: cb22.

    fetchSize = "#{bindings." MyvwVO1.rangeSize}.

    Binding = "#{MyBN.supplierTableBinding}" >

    < af:column id = "c14" frozen = "true" align = "center" >

    < af:commandButton action = "viewNext" text = "Next view" id = "cb1" >

    < af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

    to = "#{bindings." SupplierSiteID.inputValue} "/ >"

    < af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

    to = "#{MyBN.supplier_site_id}" / >

    < / af:commandButton >

    < / af:column >


    When I'm clicking viewNext button. When debugging, I get first line provider site Id instead of the current line selected.

    I also removed the selectedRowKeys of af: table. Now his show is not first line select default, but still get the Site Id of first line supplier back Bean.

    {} public void setSupplier_site_id (number supplier_site_id)

    This.supplier_site_id = supplier_site_id;

    }

    public {getSupplier_site_id() number

    Return supplier_site_id;

    }

    No idea what I'm doing wrong.


    Thank you

    Raul

    you pass line value.right... so from value as link will not be work.try send as #{row.abc.value} go on setactionListener and so on. You pass the rank value.

  • Highlight the current line


    Apex 4.2

    Theme 21

    I am able to highlight current form fields using get focus and lose focus of dynamic actions.

    How to highlight the current line in the form of an updated report.

    I tried to use DA with

    Picker JQuery tr [headers = 'TAX'] (column in my report)

    Run Javascript

    $x_RowHighlight (this.triggeringElement, 'yellow');

    Any help appreciated

    Gus

    Gusford Hello!

    Try to update your JQuery selector to what follows, with a trigger event in the DA 'click ':

    table. Report-standard tr

    JR.

  • How to manage the current line with radio button selection?

    Hello world

    I have an ADF page with a table and a search"" button.
    I created a new attribute with VARCHAR2 (1) in the VO and dragged this attribute as the first column of the table. And changed this first column of the option button to select only a single line at a time.
    By clicking on the "Search" button, I need to get the current selected row values.

    How can I get the values of selected line?
    What code should I write to get the values of the selected line in the method of binding the button 'search '?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    I have a few comments on your case.
    >
    I created a new attribute with VARCHAR2 (1) in the t
    >
    1. you should create this attribute in the object of the entity, and then add it to the view object.
    2-do you need this radio that a button is defined for all lines? If yes then you need handle the case where the user set several lines and clear the value of the attribute for all other lines.

    >
    How can I get all the values of the current row in backing bean, binding of the Find method (method)?
    can u please give me the code for this?
    >
    If you mean by the current row is the row for which the value of the selected attribute is defined (the radio button is set to the rank), then you can write a method in the viewObjectImpl class and expose it to the customer interface and call it from your bean.
    Here is a sample Department table in the HR schema.

    //This method is written in DepartmentsViewImpl
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());
                     }
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;
            }
    
  • How selectBooleanCheckbox can set the current line?

    Hello

    Using ADF Faces 10 g, I have an af:table component that is read-only, but the last column contains an af:selectBooleanCheckbox. This checkbox is used to 'activate' and 'disable' to each line. When I click on the box, I need the valueChangeListener be aware which line has been activated (so that I can then make some changes on this line to toggle). By clicking on the box to check must call setCurrentRow, or at least pass on values I can use later to set the current line manually.

    My first thought was setActionListener, but it seems that it may not be combined with af:selectBooleanCheckbox. I searched and found the following post:
    HOW to set an ID for the component from variable
    and after reading this I tried setPropertyListener, once again, I found that this is not a valid child of af: selectBooleanCheckbox. The post dry with nuansantio mentioning several times that setActionListener and setPropertyListener cannot be used, but there is no other comments on a solution.

    Any thoughts on how I can get this to work?

    Hello

    Could you elaborate more about

    I need to make a number of manual steps (invoking request Module) when the user selects / disables the check box

    You can pretty much add a method in your Impl VO (who did all the steps you want to do) and call the method in an expression for the value of groovy / call it in valueChangedListener of the box?

    Arun-

  • I reinstalled Firefox Desktop, I downloaded my favorites of Carbonite, how can I get the current Firefox to accept?

    See above

    I reinstalled Firefox Desktop, I downloaded my favorites of Carbonite, how can I get the current Firefox to accept?

    You do backup your bookmark as a .json file?

    Restoration of bookmark

  • I want to get the current music, I have on my iPod out of it and start again. How can I do this?

    I want to get the current music, I have on my iPod out of it and start again. How can I do this?

    Open iTunes, plug in the iPod, select what you want to be on your iPod, sync.

  • Get the current value of a control of the ring

    I have a control of the ring that has the following values. See attacment. I need to get the current value of this one and use it as input for another function, but First I would like to get the current value and save ina text file. I tried this

    if (event == EVENT_LEFT_CLICK_UP) || (event == EVENT_LEFT_CLICK_DOWN)
    {
        int p;
        GetCtrlVal (panelHandle, PANEL_RINGSLIDE_1, &p);
        FILE *OutFile = fopen("C:\\Users\\Student\\Desktop\\ringtest.txt","w");
        fprintf(OutFile,p);
        fclose(OutFile);
    
    }
    

    I need to get the current value of the ring (& p) to write to the file ringtest.txt.

    Also, I need to use this value (& p) as another entry in the same program.

    IE value of & p must be used in

    b = c * 5; where c is the value of the current & p.

    Can any 1 help?

    You're right: EVENT_LEFT_CLICK_DOWN is not a valid event for the CVI. Valid events are listed in the userint.h file, and are the only events that can be caught in the trap in a point of order. On the other hand, you're assuption on EVENT_VAL_CHANGED is correct: you can trap forget the EVENT_CLICK_UP event.

    According to the second question, looking at the definition for fprintf you must pass a string format as the second parameter to the function, then the value to write to the file. In your case, the correct syntax is:

    fprintf (OutFile, "%d", p);

Maybe you are looking for

  • HP 110-000z: fix the color on my pc

    I turn on my pc, and I get an orange and bright blue color on my screen. How can I get it to color that is. I want to return to its normal color. I've tried everything.

  • USB mouse not detected at startup.

    Hello My new HP USB mouse is not detected when I start my PC. I have to unplug & plug to make it work every time. My USB ports are fine and my previous USB mouse still works fine. I deleted installation driver from the Device Manager, but no utility.

  • How can I configure the computers to stop at a specific time

    Hello good people, I work as a computer technician and my manager asked me to find a way to activate the computers in our offices off at 12:00 for example automatically. How can I do this and it is possibel to define computers to start automatically

  • Phone call from fake Tecnical Microsoft company?

    Hello.  Just had a phone call from a person accentuated heavy telling me that I had a few problems with my PC, he asked that I turn it on so that he could help me. There siad it was a Microsoft technical service and he knew that I had problems, I ref

  • L7780: ADF captures paper and it takes the first sheet, but it will not treat through.

    ADF picks up the paper and fire the first half of the page very low in rolls in the printer, the printer then makes all the normal sounds as had prepared for the task, but it just error and says to remove the paper jam.    You hear a little noise of