How do I set the value of a dynamic row text field

I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
Top form looks like
InputField
| ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
| ButtonXn | ButtonY1 | DescriptionXn
OutputRow looks like
| ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
So I would like it to do
ButtonX1.click
OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
Question 1
How do I address the location in each table to set a value
Question 2
How do I get the value of the description field in the same table and row as the button
I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
OutputTable.OutputRow.OutputField2 = InputField.rawValue
  Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
OutputTable.OutputRow.OutputField3 = this.ButtonLabel
Question 3
  How can I get the value of the button's label to set in the field
  There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
Question 4 - unrelated to those above.
Is it possible to build the first table
| ButtonX | ButtonY | Description |
from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
So now to answer your questions:
Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
Hope that helps
Paul

Similar Messages

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How to programmatically set the value to current Page layout property?

    Hi,
    How do I set any text value to the current page layout [comment] property and save it.....here my current page is using a custom page layout called spPageLayout1
    To be very much generalized how I can set and save any value to current page property programmatically....on load event I need to set the value.
    It is a publishing page layout.

    Hi,
    According to your post, my understanding is that you want to set the value to current Page layout property.
    To get current page property, you can refer to:
    How to get current Pages details in SharePoint2010 publishing site
    Get Content Field Value in Article Page
    To get current page layout property, you can refer to:
    PublishingPage.Layout Property (Microsoft.SharePoint.Publishing)
    PageLayout.Title Property (Microsoft.SharePoint.Publishing)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How do you set the value of an enumeratio​n programati​cally

    I would like to be able to select (programatically) the value of an enumeration.  I don't seem to be able to find any reference to how to do that.
    Thanks.
    Solved!
    Go to Solution.

    True, True.  The original post wanted to know how to programmatically "select" the enum value.  To me, that means to either force the enum to display another value, or retrieve the current value.   I thought Ben was referring to the fact that you can't programmatically set or initiate new values into an enum.  Which as he said, can only be done with a Ring.
    "In your example you're not "getting" the value of the enum. You're converting it to a string. That's a different operation."
    I showed two ways to get the value,  one gets the current string value associated with the numeric value, and the other gets the current numeric value.  i went further in the attached vi, by demonstrating how to change the current (displayed) value of the enum by using a string.  (IFF you already know the string values in the enum.)   
    In my program, i use a typedef cluster with an enum in it.  At runtime, i need to "select" the active enum value based on which operation i'm performing.  I know from elsewhere in the program what operation i need, but it's string, and there's no easy way to change the value of an enum with a string, except with the backdoor methods i showed.  
    I wish my cohort woulda used a ring.  ;-)

  • How can i set the values to text box by selecting from drop down list.

    hi ,
    i am using struts and jsps. i have a dropdown list of names(getting the values of names from database), i want to get address and phone number of that selected one.how can i get that?

    Hi swarupa,
    Well My advice in this senario wud Be
    Either U can make Use of XmlHttp Object through javascript(AJAX way).
    Or U need to Maintain the State of the entire form and then refresh the page to get those results....
    just for U r reference i am attaching a link which was programmed using ASP @ server side and which made use of XmlHttp Object.....
    http://www.w3schools.com/ajax/ajax_database.asp
    Just try to simulate the samething in your own way....
    REGARDS,
    RAHUL

  • How do I get the values from a selected row.

    I am using JDeveloper 9.0.5. On my page, I have placed a button within a table. The button has been assigned an event. The event is within my Action class. This class implements DataAction and has overriden the
    processComponentEvents(DataActionContext actionContext);
    method.
    Question: While I am within the processComponentEvents method, is it possible to obtain the values of selected row?

    Good Morning Jeffery,
    First off thanks for your clear explanation. I have a few related questions as noted from your response:
    There are two ways to communicate the desired model row between the UIX view and the struts controller. One way is to use the singleSelection component in your table and put your buttons in the singleSelection's contents.
    When the user selects the radio button for a particular row and then clicks on one the buttons, a built in event handler in UIX will set the current row in the model to be the user selected row. Therefore, your Struts action can operate on the currently selected model row.
    When you drop a UIX table from the data control palette it is automatically set up in this way (with a single selection).
    Ok, Lets say that i've set everything up as you described. Not lets say that the button was pressed and I hit the overriddenprotected void processComponentEvents(DataActionContext actionContext) throws IOException, ServletException ;
    When I look at the request object, I do not see the values. How do I get access to the rowkey at this point?
    Some people, however, want to actually render buttons in their table rows, and have those buttons initiate an action on their row. If you are doing this, then you need to pass the row id to your struts action as a parameter, which means that you need to know the row id when you are rendering a button for a given row. There is an EL expression that will return the row-id for the current row, it is:
    ${uix.current.rowKeyStr}
    which is not so obvious or well documented in the preview release (sorry) but should be for the production release.
    A generic code snippet would go a long way to shedding some light on that. I guess I am use to using JDeveloper 9.0.3. It seems,"to me", that JDev 9.0.5 has put a completely new twist on things. I find myself wondering when I can use the 9.0.3 syntax and when
    should not. If your team has any short source toys around which demonstrated using rowkeys, or accessing the internal parts of the
    struts controller, I would find that invaluable. It dose not matter if this information is documented.
    Thank you

  • How do I change the size of a Spry Input Text field box?

    I created an email reply box, and then I created a reply message box. How do I change the size of each box independantly of each other? All I have is one set of Spry CSS rules!
    Oh, and the Working with the Validation Text Rule widget file in the Help Resource Center only covers changing the background color - Ugh!

    If I understand your question, you want to change the size of the input field that has spry validation?
    Spry has nothing to do with it, add a size to the field
    <input name="textfield1" type="text" id="textfield1" size="45" />
    <input name="textfield2" type="text" id="textfield2" size="25" />
    Gary

  • How do you limit the amount of digits in a text field?

    If a user was to input 9 digits into a text field. How do you make it so that an error message would appear if the user inputs more than 9 digits

    That code will set the TextFields length to 9 standard charecters (might not be 9 though) To limit the number of charecters and throw an error message I would use a listener on the textField. Perhaps a keyListener that keeps track of the number of charecters. ( swing has document listeners which are really nice )

  • How/where to get the values stored in these two structure fields?

    hi
       need your help to find out where the following two fields get stored in tables...or is there any fm or bapi to get the data stored in these two fields?
    1) Create Scheduling agreement:
    Tcode: ME31L
    Field label - Agreement type
    Field name - EVART
    Structure - RM06E
    2) Purchase order display:
    Tcode: ME23
    Provide any Purchase order craeted already (where release strategy is implemented)
    Select the line item & click release strategy icon at the top.
    You will find a new pop-up menu. In that place the cursor on the startegy code like
    Final release or XX or etc.
    Field name - ANZEF
    Structure - RM06B
    Sathish. R

    Hello Sathish:
    1) EKKO-BSART
    Regards,
    John.

  • How to set the value of MaxRow Property of DB Adapter 11g dynamically

    I have the following requirement:-
    i am using DB Adapter to connect with MsSQL server for fetching the records from the table by using simple Select Query in my DB adapter.
    1. Receive request from Web Service Client number of records as input to fetch records form MsSQL Server.
    2. Return the result set to the service consumer
    So, here i m using MaxRow Property of Database Adapter for the number of records to be returned. But the problem is that how i can set the value to the MaxRow Property of DB Adapter dynamically from the value received as input.
    If you have any other idea to return the records dynamically from MsSQL server .Please help me.

    If you are using the DB Adapter as a reference and as you said, you are using custom SQL i guess...
    you can use the sql like...
    select top 1 * from tablename, this will result only 1 row from database(top record)...
    or select top 5 percent * from tablename, if the rows in the database are 100, then it will return the top 5 records in the database...
    check the exact syntax of top command with sql server...but using top keyword should solve your purpose to limit the number of records....
    Hope this helps...
    Thanks,
    N

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • Setting the value of a java variable in javascript function

    How can i set the value of a java variable in a javascript function?
    <%
    String fName = "";
    %>
    now i want to define a javascript function which can set the value of fName to the value it has been passed.
    <script language="javascript">
    function setJValue(val)
    </script>
    Thanks

    The only way you could simulate this, would be call the same page inside the Javascript function, and send it the parameter that was passed. Then you would have your Java code retrieve this parameter by request.getParameter("value");, and set the variable accordingly.

  • How can i Set ArrayList values to selectOneListbox

    Please Let me know How can i Set ArrayList values to selectOneListbox dynamically from the managed bean

    Note: beanList is a list of selectItems
    ArrayList<SelectItem> beanList;

  • SelectManyListbox : How to set the value in the bean ?

    Hi,
    How can I set the selected values from a selectManyListbox in the bean ?
    My page:
                        <li>
                             <div class="box_multiple_selects clearfix">
                                  <div>
                                       <span>Esportes Selecionados</span>
                                       <h:selectManyListbox id="esportes_selecionados" size="10" value="artigoDetailsBean.esportes"/>
                                  </div>
                                  <div class="btns_fluxo fl">
                                       <button value="<<" name="all_right_hand">>></button>
                                       <button value=">" name="one_right_hand">></button>                                   
                                       <button value="<" name="one_left_hand"><</button>
                                       <button value="<<" name="all_left_hand"><<</button>
                                  </div>
                                  <div>
                                       <span>Esportes Cadastrados</span>
                                       <h:selectManyListbox id="esportes_cadastrados" size="10">
                                            <f:selectItems value="#{artigoDetailsBean.esporteList}" />
                                       </h:selectManyListbox>
                                  </div>
                             </div>
                        </li>
    "It´s a move right-left panel". In the right listbox are the database data, and the user click in the left arrow to move the elements (options) from right listbox to the left, and I´d like to get the selected values from the left listbox.
    The bean:
    public class ArtigoDetailsBean {
    private Collection<String> esportes;
         public Collection<String> getEsportes() {
              return esportes;
         public void setEsportes(Collection<String> esportes) {
              this.esportes = esportes;
         public List<SelectItem> getEsporteList() {
              List<SelectItem> esportes = new ArrayList<SelectItem>();
              for(Object esporte: artigoDetailsCommand.getEsporteList() ) {
                   esportes.add( new SelectItem( ((EsporteVO)esporte).getId().toString(), ((EsporteVO)esporte).getDescricao() ) );
              return esportes;
    Thanks in advance,
    Sergio Stateri Jr.
    [email protected]

    This blog shows an example of what you are trying to do - when the user clicks the left arrow it triggers an action event that puts the value into the left list, and vice-versa:
    [http://weblogs.java.net/blog/driscoll/archive/2008/11/jsf_20_the_swit_1.html|http://weblogs.java.net/blog/driscoll/archive/2008/11/jsf_20_the_swit_1.html]
    Ignore the 'JSF 2.0' in the header - it's not JSF 2.0 in this example!
    Also - don't post your email address on the forums - you might get spammed :)
    m

  • How can i set the "Keep the following number of major versions" to a limit suppose 20 and then disable it from the users so that they cannot change the value?

    I want to set the value of "Keep the following number of major versions" in the versiong settings of a documnet library to a limit say 20 and then disable the option from the users so that they cannot them. Is it possible thorugh some custom coding?

    Hi Moumita10,
    Just curious about that how the custom CSS code works in your environment if put it in the “LstSetng.aspx” page.
    In my environment, it hides the "Keep the following number of major versions" setting in the “LstSetng.aspx”
    page after applying the custom CSS style there.
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Excise in case of concessional duty

    Dear All, We are using TAxinn tax procedure.I have maintain the the conditon as JExp for BED and the access seq used is Conunty/Plant/Control code. The condition record maintain for this combition. To some customers we sales goods are at concessional

  • XML and Air Issues

    Hi guys, first time poster so I apologize if this is a basic question! I am creating a Media cataloging application to run as a desktop application through Air, I initially built this as a Flex web app but have decided I want it as a standalone. Anyw

  • "Internal Muxer Error"

    I have been searching online for the last couple days about this error and it seems to either be uncommon or undocumented for the most part. Or, so easy to fix no writes anything and I'm a fool.... either way, what causes this, how is it fixed and wh

  • BW system open for config for RSA1 display

    Hi Our developers have been told by another company that there is a bug in BW3.5 (fixed in 7) whereby the system needs to be open for config in SCC4 to be able to view certain data. This is in RSA1 - under InfoProvider they have a Holiday Entitlement

  • Can't see photos when I send them to Webtv just the photo numbers

    I've been sending photos to my mom using iphoto to her Webtv,just recently she no longer can see the photos just the photo name(pa12345.jpg)We have spoke to Webtv,they say the problem is on my end?Any clues?