Add more rows with LOV

I have an LOV based on a VO containing on transient attributes.
The LOV has 3 return items, 1 is the item the LOV is attached to, the second is a messageStyledText field and the thirds is a formValue.
When I click on Add more rows (above fields are the sole fields in a classic table) I get a new row, however the value in the messageStyledText is not retained.
I was planning on storing the same value as the messageStyledText in a formValue and perhaps grabbing the addRows event and setting the values to be the same. Now I have not quite got this working yet.
So the question is - is this the right approach and if so any pointers?
If I continue to add rows will I have to continually look through the VO and re-map the formValue back to the messageStyledText?

Thanks sumit
This works perfectly. The issue I had was the formValue and messageStyledText were associated with different VO attributes. I was therefore catching the addRows event and setting the attribute manually.
Thanks a lot

Similar Messages

  • Row Level PPR in Advanced Table with Add More Rows Button

    <br>
    I have programmatically fired PPR event on MessageChoice. But it is in Advanced Table with
    Add More Rows Button. When the value is changed in MessageChoice I Show/Hide Custom LOV
    through SPEL like this ${oa.BioEmployeePVO.EmpManagerRender} .
    But it is <b>hiding the all the ROWS</b> not just the row where the value has been changed.
    I even tried with this code and get NULL for rowReference.
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    In Processrequest()
    String pageName = pageContext.getRootRegionCode();
         Hashtable params = new Hashtable (1);
         params.put ("param1", pageName);
         Hashtable paramsWithBinds = new Hashtable(1);
        paramsWithBinds.put ("param2",new OADataBoundValueFireActionURL (mcb, "{$AttendeeType}"));
        mcb.setFireActionForSubmit ("empPositionChange", params, paramsWithBinds,false, false);
    In ProcessFormRequest() {
    if ("empPositionChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))   
          String rowReference = pageContext.getParameter("param2");
        //    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
         Serializable[] parameters = { rowReference };
          am.invokeMethod("handlePositionChangeEvent", parameters);
    <br>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    HI Kumar,
    Answer to your last post is "yes".
    Now to your doubt regarding the code:
    Hi Anna
    I am trying to understand your code.
    FireAction firePartialAction = new FirePartialAction("fireHideEvent"+(i/noOfTlaColSpan));
    HideImgBean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
    1. What is this i/noOfTlaColSpan ?
    :)Forget abt this in your case it should be the event name which u r firing and capturing the it in the PFR.
    Like FireAction firePartialAction = new FirePartialAction("YOurEventName");
    and in PFR u can capture tht as:
    if("YOurEventName".equals(pageContext.getParameter(EVENT_PARAM)))
    //your logic to invoke AM method
    2. I believe this HideImgBean would be MessageChoice for me?
    :)Yep ur right
    3. This brcdOhInventoryViewUpdateVOImpl would be the Custom PVO(Extending Seeded Base VO)
    I create by adding the transient attributes?
    :)Yep ur right
    4. I cannot understand this code. Could you explain.
    :)Please look at my comments in some of the lines .I have explained wht i am doing
    if(updateIter==null)
    updateIter[0]= invViewVO.createRowSetIterator("updateIter");//This initViewVo should be ur custom VO object
    if(cnt>0)
    updateIter[0].setRangeStart(0);
    updateIter[0].setRangeSize(cnt);
    for(int i=0;i<cnt;i++)
    row = (brcdOhInventoryViewUpdateVORowImpl)updateIter[0].getRowAtRangeIndex(i);
    String selectFlag=(String)row.invokeMethod("getPartNumber");//This getPartNuber should be replaced by the Prim Key inoke methd of ur VO
    if(RowID.equals(selectFlag))
    //This is my logic to set the transient attributes based on the msgChoiceBean value ..u have to pass the value when u invoke this method
    if(reserveMethod.equals("BINARY"))
    System.out.println("In Binary");
    Boolean bVal= new Boolean("false");
    Serializable sr[]={bVal};
    Class []methodParamTypes = { bVal.getClass() };
    row.invokeMethod("setshowreservetxt",sr,methodParamTypes);
    Boolean bVal1= new Boolean("true");
    System.out.println("bVal1"+bVal1);
    Serializable sr1[]={bVal1};
    Class []methodParamTypes1 = { bVal1.getClass() };
    row.invokeMethod("setShowreservemsgchoice",sr1,methodParamTypes1);
    break;
    In my AM I am doing this. Am i doing right?:)Yep u r right
    BioPrescribersPVO is the custom VO(extending seeded base VO).
    public void handlePositionChangeEvent(String param)
    OAViewObject vo = (OAViewObject)findViewObject("BioPrescribersPVO");
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    String position = (String)row.getAttribute("AttendeeType");
    if (("PRESCRIBER".equals(position)) )
    // BioEmpManagerRender is the transient attribute in BioPrescribersPVO.
    row.setAttribute("BioEmpManagerRender", Boolean.TRUE);
    row.setAttribute("BioPresManagerRender", Boolean.FALSE);
    else
    row.setAttribute("BioEmpManagerRender", Boolean.FALSE);
    row.setAttribute("BioPresManagerRender", Boolean.TRUE);
    } // end handlePositionChangeEvent()
    // Initializing the custom VO
    /*No need to initialize the VO because this is not a PVO(Propeties View object)
    U r just using the existing VO and tht vo shloud have a primary key.Tht way u can match the rowref u r getting with the actual row from the View object*/
    public void init()
    OAViewObject appPropsVO = (OAViewObject)getBioPrescribersPVO();
    if (appPropsVO != null)
    if (appPropsVO.getFetchedRowCount() == 0)
    appPropsVO.setMaxFetchSize(0); appPropsVO.executeQuery();
    appPropsVO.insertRow(appPropsVO.createRow());
    OARow row = (OARow)appPropsVO.first();
    row.setAttribute("RowKey", new Number(1));
    handlePositionChangeEvent("");
    } // end init()
    Thanks
    Anna

  • Add more rows problem

    I have an advanced table that displays a single row. Users can use Add more rows if they require more.
    I have 2 small isses.
    Firstly, there are 2 fields. Cost Centre and description. Cost centre has an LOV and description is mapped and populated from the LOV as well.
    When I click on add more rows, the description column of the first record is cleared.....I obviously want this to remain.
    Second issue. When I choose the value from the LOV on rows 2 and above i want to ensure this has not been chosen before in a previous record - any quick way to do this>?
    Robert

    Regarding 2: You can write your Lov VO query with NOT IN :1. Use the CO in your LOV and try to get the value entered by user in above row(s) and bind it in LOV VO query using your Lov CO. Please note that LOV CO might get called before coming to page CO processFormRequest. So try to keep a stringBuffer value in OADBTransaction, which shall concat the values selected in all above rows. Use this value in LOV CO each time.
    Hope it helps.

  • How to add new rows to LOV dynamically?

    We have requirement as follows:
    in a multirow region, each row has fields like from_serial and to_serial.
    A serial can have state (defined but not used/In stores) and status (Good/Bad).
    Each field is associated with LOV that lists 'Defined but not used' serials that are in "Good" status.
    User can either select a value from LOV or he can generate the serial on the fly (dynamic text should be allowed).
    Requirement is if user keys in a 'Defined but not used' serial with status as bad, then an error message should be thrown indicating that the serial is invalid. We already have a pl/sql API which does this validation along with several validations that can not be put into single LOV.
    I am not able to achieve this requirement as
    1. if I set DisableValidation property of field to True, then it allows free entry/dynamic entry
    but doesn't call validation API thru PPR...
    2. If I set DisableValidation property of field to false, then it allows to call pl/sql through PPR
    but doesn't allow free text entry.
    Currently, the LOV is not associated with any controller.
    Can someone help me to achieve the requirement?
    I guess if we set DisableValidation property of field to false and then somehow populate the keyed-in value in LOV itself then both requirements, Free text entry and calling validation API, can be soled.
    Question is "is there any way to populate additional row into LOV"?

    Hi,
    You can not add rows to LOV, I also faced similar problem around 2 yrs back where we need to add a new supplier to LOV, there I added one more entry using union in LOV VO with supplier name "New Supplier-Not Defined", when user want to add anew supplier the he will select this value from LOV and in LOV event I will check if value selected is "New Supplier-Not Defined" then I will render one more text box and there user can enter a supplier name which does not exist in the system.
    There could be some other solutions(work arounds) fro this, please clarify your requirements so that we can look for some other options as well.
    If you set the validation property to false then user may save wrong data into system, I think this is not a good option.
    Hope this will give you some clue.
    Regards,
    Reetesh Sharma
    Edited by: Reetesh Sharma on Aug 11, 2010 10:16 PM

  • Cycle rows in KSU5: can add more row?Is it sequential?

    Hi guyz,
    Regarding cycle rows in KSU5:
    1. Can I add more cycle rows in KSU5?
        If I need more than 13 rows that is provided, where I can do it and how?
    2. Is SAP read and execute the cycle rows by sequential?
        Ex.: If I put cycle B001 at row 1, and then cycle B002 at row 2.... Does it executed first from B001 and then B002?
    Need your answers asap..Thanking you..

    Hi Meila Santiana,
    In KSU5, the cycles are picked up by system dynamically depending on system resources. So the cycles can run in parallel if more application servers activated.
    For your case, you can either change your cycles to put into one cycle with different segments because the segments in one cycle is processed by sequence, or create background jobs one after another if you think to run in foreground takes long time monitoring.

  • To add new row with the checkbox selected ....

    Hi All,
    In my project I have to create a table with 2 columns, 1 column is checkbox and other column is String type. In the same JFrame one textarea and one add button should be there. When we type text in the textarea and click add button, it should add a new row in the table with the checkbox selected and the 2nd column containing the text.
    I want to use AbstractTableModel.
    Please help me to solve this issue. If you have sample code that will be more helpful.
    Thank you,
    Regards,
    mkumar

    It would be better if you extend from DefaultTableModel rather than from Abstract Table Model. That is because DefaultTableModel provides functionality to add a row. In fact, you can directly use DefaultTableModel .
    In the button's action performed,
    public void actionPerformed(ActionEvent e)
      if(e.getSource() == bAdd)
        Vector newRow = new Vector(2);
        newRow.add(new Boolean(Boolean.TRUE));
        newRow.add(" ");
        DefaultTableModel dm = (DefaultTableModel)yourTable.getModel();
        dm.addRow(newRow);
    }Note : For the above code, Initialize the JTable with a DefaultTableModel parameter than directly with Vectors/ Arrays.
    This is because when we try to cast from TableModel to DefaultTableModel as in the above code, there is a possibility of an
    Exception if the Table is not initialized without a model.
    For the CheckBox in the first column, you need to set an editor and a renderer so that you can manipulate and see your boolean values as the state of the check boxes.
      JCheckBox b = new JCheckBox();
      DefaultTableCellRenderer dr = new DefaultTableCellRenderer(b);
      DefaultTableCellEditor de = new DefaultTableCellEditor(b);
      yourTable.getColumnModel().getColumn(0).setCellEditor(de);
      yourTable.getColumnModel().getColumn(0).setCellRenderer(dr);That should do it !
    Cheers

  • Alv add new row with counter

    Hello.
    I would like to add a new row to an ALV GRID CONTROL in which one of the fields is a counter. Which methods, codes have I to change/write?
    For example:
    ALV
    COUNTER FLIGHT DESTINATION
    1     1234  CDG
    2     3443  SVQ
    On adding a new row :
    COUNTER FLIGHT DESTINATION
    1     1234  CDG
    2     3443  SVQ
    3
    Thanks in advance!!!

    There are two options.
    1.  Use the data_changed event to put in the values.
    - Enable edit mode for the grid, so the row create/insert/copy icons appear on the toolbar. 
    - Create an event handler for the DATA_CHANGED event
    - In this method, use attribute table er_data_changed->MT_INSERTED_ROWS to check for new rows, and then er_data_changed->modify_cell to put in the line number.
    The problem is that if your counter field is set as non-editable, then you cannot put a value in...
    2.  implement your own add function.
    - Add a button to the toolbar (implement methiod for event handle_toolbar)
    - Create an event handler for event handle_user_command.
    - In the handler method, add a row to the outtab table used by the grid (with the correct line number).
    - CALL METHOD gr_grid->refresh_table_display to update the display with the additional line.
    Regards
    Michael

  • Add more rows - a whole page full

    I grew up on Microsoft Works and AppleWorks/Clarisworks
    (spreadsheets) where you didn't run out of rows - you could
    just scroll indefinitely down the spreadsheet at hearts content -
    but in Numbers I find myself hitting the bottom at 44 rows. I
    see they can be added one at a time but is there another way?
    I don't want to add another sheet, table or whatever - just more
    rows. please.
    Thanks very much.
    Tom
    Numbers '09
    MacOS 10.7.4

    Hi Tom,
    quinn

  • Add multiple rows with add a row button

    Not sure of how to add this to my script, but my dilemma is I would like to add the row above in addition to the current row.
    Right now the script in the "add row" button is:
    Table1._Week.addInstance(0);
    the row above is Table1._Above
    How do I go about adding the row above to the script?
    Thanks

    You can access the instance manager of any Row from anywhere in the form..
    So you can write script by being in the Week Row to add a new row for Above row.
    In your click event you can write like this..
    Table1._Above.addInstance(0);
    Thanks
    Srini

  • Add total row with a webservice

    Hi there,
    Im trying to update a list view to add the totals to a column subtotal. Im following the instructions given on
    Webservice Page
    When check the response of the webservice I'm not seeing the aggregation response and the total row is not being added. When I add or remove columns through this webservice it does work. Has anyone experiencing the same issue or knows how
    to solve this ? 
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <UpdateView xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>User1</listName>
    <viewName>{LIST VIEW GUID}</viewName>
    <viewProperties/>
    <query/>
    <viewFields/>
    <Aggregations Value="On">
    <FieldRef Name="subtotal" Type="Sum"/>
    </Aggregations>
    <formats/>
    <rowLimit/>
    </UpdateView>
    </soap:Body>
    </soap:Envelope>

    Hi,
    Is this “subtotal” a valid field name and the type of this column is “Number”?
    Also, please add this column into the <viewFields/> and do the test again.
    Feel free to reply with the test result if the issue still exists.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Add more rows in record working time

    Hello Guru's,
    IN ESS- Record Working Time - the number of rows visible are set to 8 in the Web Dynpro Java Code.
    I had a look at the Note:
    Note 957741 - Few lines in the data entry grid of the timesheet webdynpro
    The question I had is to have more than 8 rows visible, is it Java Code modification or any other alternative to change the number of Visible Row....
    Please reply back asap.
    Thanks in advance for your time.
    Best Regards,
    Punit
    This question has been asked a few times already
    PL search this forum
    Edited by: Suresh Datti on Sep 10, 2009 4:02 PM

    Hi,
    You can personalize the iView to achieve this. I explain how to do this in another thread (second post) : /message/8131024#8131024 [original link is broken].
    Regards,
    Pierre

  • How can I add a row into a JTable with JButton

    Hi all. I have the following code:
    package gui;
    import db.*;
    import javax.swing.table.AbstractTableModel;
    import java.util.ArrayList;
    public class FoundersTable extends AbstractTableModel{
        private static final int COLUMNS = 8;
        private String columnNames[] = {"��� ����", "���", "�������", "�������", "���������", "��������",
                "����� �� ����������", "������ �� ����, �����"};
        private ArrayList data;
        public FoundersTable(){
            data = new ArrayList();
        public int getRowCount() {
            return data.size();
        public int getColumnCount() {
            return columnNames.length;
        public String getColumnName(int colIndex) {
            return columnNames[colIndex];
        public Object getValueAt(int rowIndex, int columnIndex) {
            return ((ArrayList)data.get(rowIndex)).get(columnIndex);
        public void setValueAt(Object value, int rowIndex, int columnIndex) {
            ((ArrayList)data.get(rowIndex)).set(columnIndex, value);
            fireTableCellUpdated(rowIndex, columnIndex);
        public void addRow(ArrayList neueZeile) {
            data.add(neueZeile);
            int index = data.size() - 1;
            fireTableRowsInserted(index, index);
        public void removeRow(int index) {
            data.remove(index);
            fireTableRowsDeleted(index, index);
        public void removeAllRows() {
            data.clear();
            fireTableRowsDeleted(0, 0);
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return true;
    }Now in my MainJFrame class I have one button for additing and one button for removing a selected row. How can I add/remove rows with this two buttons.
    Thanks

    No my question is how can I add and remove rows WITH buttons My point was the code is the same. You use the addRow(...) method. Why did you write an addRow(...) method if you aren't going to use it?
    I don't understand your problem. Do you not know how to write an ActionListener?

  • Problem while creating row with dependent select one choice in adf  table

    Iam having independent and dependent select one choice in a ROW in adf af:table
    unable to insert more than one row with dependent select one choice using create insert in adf table.
    Able to add more rows in UI af:table but ,ignoring previous rows (select one choice values) and only latest current row values is getting inserted to the database.
    Following is the code used to create row and for pointing to the current row
    public void addRowOnSecSettings(){
    SecurityGroupSettingsVOImpl SecGroupSetVO =(SecurityGroupSettingsVOImpl) this.getSecurityGroupSettingsVO1();
    try{
    int rowCount = SecGroupSetVO.getRowCount();
    SecurityGroupSettingsVORowImpl SecGroupSetRow =
    (SecurityGroupSettingsVORowImpl)SecGroupSetVO.createRow();
    SecGroupSetRow.setNewRowState(Row.STATUS_INITIALIZED);
    SecGroupSetVO.insertRowAtRangeIndex(rowCount, SecGroupSetRow);
    SecGroupSetVO.setCurrentRowAtRangeIndex(rowCount);
    SecGroupSetVO.setCurrentRow(SecGroupSetRow);
    } catch (Exception e) {
    e.printStackTrace();
    Regards,
    Bhagavan

    as it is dependent select one choice ,have already put auto submit="true".but no chance ,
    if i add two rows vo rowiterator showing count 2 but only current row select onechoice values are getting where as previous row select one choice values are null.

  • Adding more rows in a html table(enclosed inside a jsf tabbed pane)

    hi,
    i m facing a problem. i have a html Table inside a jsf Tabbed Pane and a button to add more rows.whenever i click on the button it should add 5 more rows to the table using javscript.
    can anyone hlp me in solving this problem.
    thankx in advance

    Use the elegant JSF h:dataTable instead of plain HTML table with a heap of DOM stuff.

  • When I add a row, I lose the formula!

    I made a simple check register spreadsheet a year ago & when I run out of rows I add more rows by dragging the handle in the lower right of the spreadsheet DOWN. I can also click the handle with the number of the row in the lower left to add just one more row. Or I can select the lower right cell (account balance) & hit enter & it created one more row.
    None of these methods preserve my formula! I could swear that dragging the lower right handle in the past has preserved the formula.
    What am I doing wrong?
    Thanks!

    growler62000 wrote:
    =IF(AND(ISBLANK(E2),ISBLANK(F2)),"",Beginning Balance :: B2-E2+F2)
    A = ref #/ck #
    B= Date
    C= Description
    E=Debit
    F= Credit
    G=Balance
    I assume the above formula is in G2. What's the formula in G3?
    If you've created it by filling down, it should be:
    =IF(AND(ISBLANK(E3),ISBLANK(F3)),"",Beginning Balance :: B3-E3+F3)
    But I suspect it's this:
    =IF(AND(ISBLANK(E3),ISBLANK(F3)),"",G2-E3+F3)
    ...and the difference is what's preventing the formula from being automatically filled into new rows.
    My solution DOES work perfectly although I probably explained it poorly.
    Yes it does. Your solution was clearly described, and with one formula in column G that's different from the rest, it's also the most efficient one available.
    BTW, I wish I could force column B to order the entries by date as sometimes I will 1st enter today's date & then next row I enter yesterday’s date, etc
    What messes up sorts is the references to specific cells in the formulas. If you can replace those with references to the appropriate cells wherever the formula actually winds up, the problem is solved.
    Two tools that numbers provides that help with this are
    1. the ability to reference a cell in the same row using only its column reference
    2. the OFFSET function.
    Both are used in the example below. The table on the left is a snapshot after data was entered, and before the table was sorted. The one on the right shows the same table after sorting the selected rows.
    You'll note that I added a second Header row to allow space for the beginning balance to be placed in a header row on this table. That's to make it possible to have the same formula in every non-header row of column G so that the formula will be automatically entered into new rows as they are added.
    Your formula will still work in the first non-header row, should you choose not to make this modification (Just enter the formula below into the row below that and fill down to the bottom row), but I would caution you to not include this first body row in any sort in that case.
    Here's the formula in G3 of the example (and filled down to every row below that):
    =IF(AND(ISBLANK(E),ISBLANK(F)),"",OFFSET($A$1,ROW()-2,6)-OFFSET($A$1,ROW()-1,4)+ OFFSET($A$1,ROW()-1,5))
    Note that the first references to E and F omit the row numbers, and the references to the previous balance, debit and credit cells are through an offset from cell A1.
    You can find out more about OFFSET in the iWork Formulas and Functions User Guide.
    Regards,
    Barry

Maybe you are looking for

  • Mac shuts down after start up and before it was acting very slow, please help!!!

    Recently my imac has been running unusually slow when I open/close apps or when loading things, it sometimes would freeze or take about 20 secs to load etc. So in an attempt to fix it it cleared all unnecessary files from my computer but nothing too

  • SELECT-OPTIONS for variables that cannot have a range

    Hi all, There is an option to show only one input-field for a select-options declaration by using the 'no intervals' option. But it is still possible for the user to specify ranges when doing multiple selections (i.e. specify intervals for the variab

  • HELP-iPhone isn't showing up in iTunes

    So I set up my iPhone and everything yesterday. . .I downloaded the newest iTunes, but each time I even try connecting iTunes to the iStore, it says iTunes cannot connect to the iTunes store, unknown error occured (-3221), make sure your networ conne

  • Enabling VT-x in the BIOS of a G780

    Hi I've tried to set up a 64bit guest operating system in VMWare and in VirtualBox, but have been unable to. I understand that the problem might be that VT-x is not enabled in the BIOS. However, on booting up my G780 and using F2 to edit the  setting

  • IPhoto crash when importing AVI files from Nikon D90

    I have the latest versions of Flip4Mac and Perian installed. Any help will be very much appreciated! Crash file below: Process: iPhoto [31539] Path: /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifier: com.apple.iPhoto Version: 7.1.5 (7.1.5) Bu