ADF Faces: How do I set values for input controls in an af:table

Use case: user enters master/detail information into an input form using an af:table for the desired number of detail rows.
I have an ADF Faces input form with master level input controls, and an af:table (bound to a backing bean CoreTable) for the detail data set.
The input controls are value bound to updateable view objects built from entity objects, with the appropriate view links providing master/detail iterators.
Once the user has entered the master keys (via inputTexts, and selectOneChoices), I create a row in the detail VO, thus creating a visible blank row in the af:table.
The user then completes the key for the detail row (in the af:table) by selecting a value in a selectOneChoice (in a af:column) with autoSubmit on and a valueChangeListener that sets the VO row attribute with the new value.
The user then continues to enter into the remaining inputTexts and selectOneChoices in the af:columns until all values have been entered.
I do not have autoSubmit on for any input controls in the af:columns other than the key, for performance improvement.
The user can then use a command button (which has an action method) to create another row in the af:table.
But, (in the action method) I need to set the values for the 1st detail VO row attributes, from the input controls, before creating another row.
The input controls are bound to backing bean CoreInputText and CoreSelectOneChoice objects, and they have not set their values at this point, even though I have partialSubmit on for the "New Row" command button.
I do not value bind the input controls in the af:columns to the backing bean objects, because we need to display data for all rows entered into the af:table.
Any advice on the best way to perform this operation would be very appreciated!!!!

Thanks for the reply Steve!!
Yes, I followed the techniques in Screencast#7, and it works great in my edit page.
But I am having problems with my input form.
I actually have master/detail/detail relationship for which I am creating an input form.
I created the input form as a copy of the edit form, and am making revisions as necessary.
I created new view objects for the input form (from my three entity objects), which have the "Tuning" set to retrieve "No Rows (i.e. used only for inserting new rows)"
I added an invokeAction that binds the "CreateInsert" action on the master iterator, so when the page is first displayed, the master level controls are available for data entry (as in 13.6.2 in the Developers Guide): but the first level detail controls are not rendered, and the af:table (for the second level detail) is rendered but with no rows.
Once the user enters key values for the master (a three part key), I manually create a first level detail row by executing the "CreateInsert" action binding for the first level detail iterator.
Continuing on, the user then enters a key value for the first level detail I manually create a second level detail row using it's "CreateInsert" action binding.
Now the user has a form with all master and first level detail controls completed and one empty row in the af:table for it's first entry.
The key column in the af:table has autoSubmit on, and an value change listener. That listener uses it's getNewValue() to set the key value ("locationCode" in this case) using
setLocationCode from the ViewRowImpl. Here is that value change listener:
public void locationChanged(ValueChangeEvent event) {
if (null != event.getNewValue()) {
LocObsCreateViewRowImpl locCreateRow = (LocObsCreateViewRowImpl)appMod.findViewObject("LocObsCreateView").getCurrentRow();
if (null == locCreateRow.getLocationCode()) {
locCreateRow.setLocationCode(event.getNewValue().toString());
Now comes my problem: once they have entered the values in the remaining columns, they can use a command button to create another row in the 2nd detail iterator, thus creating another visible empty row in the af:table. But the values from the first row (other than the key column) are not assigned to the row in the collection and I can't figure out how to set values in the collection's row.
I imagine I'm missing something using bindings and the Request Processing Lifecycle, and after reading this I can see how much manual work is going on.
The users have specified the need to have all information available on one page, so I've designed it so they can insert and iterate through the first level detail collection.
They have also asked to not use the mouse; they are looking for a "heads-down-data-entry" system.
Again, I really appreciate any advice you could give.
Jeffrey

Similar Messages

  • How to set value for Dropdown control using Querystring filter wepart

    Hi,
    I have a dropdown in my customized list form and need to set the value for the dropdown control using query string filter web part.
    I am able to set value for textbox control using Query String Filer web part.
    But, since the dropdown values are not populated on form load, the value is not set for dropdown control.
    How to load the values in dropdown control on form load and set a value using Query String filter webpart?
    Thanks,
    dhijit

    Hi,
    According to your post, my understanding is that you want to filter choice field using Query String Filter web part.
    To filter using query string filter web part, we can set the default value for the choice field in the query string filter web part panel as below, then connect to the list.
    Now it would be filter by the value you have set.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Setting a default date value for input controls

    Hi All,
    I have created a webi report that shows  - among other things - the activity between 2 dates. I have created 2 input controls where the user can select the start and end dates from a calendar for this.
    The displayed data is restricted by a date variable which 'unfiltered' contains 1 month of data.
    'out of the box' I can set these input controls and all works fine, but each time I open the report the same values that I set last time are set in the input controls. I want to have these default to being between today and 7 days ago with the user then able to move away from  this action, rather than the 'window of interest' slowly slipping into the past.
    I have looked at the forum posting Re: Default Input Control Values in WebI doc on Open which describes setting a default on the objects in the report filter pane, but this does not appear to be possible as these are 'grayed out' and i need both the input controls to run from a single object.
    Does anyone have any ideas how this might be achieved?
    Thanks in advance
    John

    Hi,
    Sorry, I've obviously not explained myself very well. Please let me try to elaborate...
    The report I am writting is to function as a dashboard (yes, i know - Xcelcius/Dashboard Designer - don't ask!) but asking the user to enter a prompt for the date range is not an option here. My only options for this are effectively the input controls or the report filters. I want to be able to achieve the effect of entering =CurrentDate() in the 'default value box in the same way that I would if writting a Reporting Services report. However the WebI controls do not accept expressions for this.
    So...
    I have one date object with a months worth of dates in it.
    I have two input controls associated with this date object to allow the user to select a narrowed date range from this month of data.
    I need one of these to default to 'today' and the other to default to '7 days ago' (I can do the calculations to get both dates, the bit I cannot get past is applying these dates as defaults)
    can anyone help me with step 3 (in bold) above?
    John

  • How to assign default values for a timestamp column in a table?

    Hi
    Thank you for reading my post
    how i can make a column in a table to be autofilled with current timestamp ?
    for example when i create a table i want its timestamp field to be autofilled with current time stamp whenever a record generated.
    Thanks

    TEST@db102 SQL> create table test(a number primary key, b timestamp default systimestamp);
    Table created.
    TEST@db102 SQL> insert into test(a) values(1);
    1 row created.
    TEST@db102 SQL> select * from test;
             A B
             1 03-SEP-06 05.56.34.995319 PM
    TEST@db102 SQL>                                                            

  • WRT54G v7.0 How to increment TTL value for input packets

    Hi guys
    I bought Linksys WRT54G v 7.0 and want share internet connection. But my ISP(connetion is PPPoE) make TTL of incoming packets 1. How can increment the value of incoming packets?
    Best Regards
    Dimitar Kolev

    Hi guys
    I bought Linksys WRT54G v 7.0 and want share internet connection. But my ISP(connetion is PPPoE) make TTL of incoming packets 1. How can increment the value of incoming packets?
    Best Regards
    Dimitar Kolev

  • How can I set value for vc application's form

    there is a running vc application,and the vc application has form.the form's parameters can input from keyboard.but I want use java application to realize the function that input parameter instead of mannual input.
    can you give me some advices,thank you very much.

    This may help:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=236676

  • How to set value for selectOneChoice

    Hello,
    How to set value for selectOneChoice defined as:
    <af:selectOneChoice label="Label" id="soc1" binding="#{DepositorMergingBean.socSurnameComponent}">
    <f:selectItems id="si1" value="#{DepositorMergingBean.socSurnames}"/>
    </af:selectOneChoice>
    where socSurnames is List<SelectItem> - manually filled list of SelectItem(SomeObject, (String)text_description), so - SOC is filled manually (no binded iterators, etc..)
    Neither socSurnameComponent.setValue( new Integer(0) ) nor socSurnameComponent.setValue( socSurnames.get(0) ) do not help.
    Thanks in advance.

    this.selectOneChoice.setValue(selectItems.get(2).getValue());Try as per the following sample:
    SelectOneChoiceTest.JSPX:
    <af:form id="f1">
    <af:selectOneChoice label="Select One Choice" id="soc1"
    binding="#{SelectOneChoiceTestBean.selectOneChoice}">
    <f:selectItems value="#{SelectOneChoiceTestBean.selectItems}"
    id="si1"/>
    </af:selectOneChoice>
    <af:commandButton text="Set Selected Value" id="cb1"
    actionListener="#{SelectOneChoiceTestBean.onClick}"/>
    </af:form>
    SelectOneChoiceTestBean.java:
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class SelectOneChoiceTestBean {
    private RichSelectOneChoice selectOneChoice;
    public SelectOneChoiceTestBean() {
    super();
    private List<SelectItem> selectItems;
    public void setSelectItems(List<SelectItem> selectItems) {
    this.selectItems = selectItems;
    public List<SelectItem> getSelectItems() {
    selectItems = new ArrayList<SelectItem>();
    selectItems.add(new SelectItem("One", "One"));
    selectItems.add(new SelectItem("Two", "Two"));
    selectItems.add(new SelectItem("Three", "Three"));
    return selectItems;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    public void onClick(ActionEvent actionEvent) {
    this.selectOneChoice.setValue(selectItems.get(2).getValue());
    Thanks,
    Navaneeth

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    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

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • How to bind values for input parameters from an adf table?

    Hi,
    The version I am using is
    Jdev TP4 11.1.1.0.0
    I need to know how to bind values for input parameters to methods.
    I have created an af:table and I have a button created using a method which is outside the af:table. This method needs to take input parameter values from the column values in the table.
    When I have an adf form instead of the table the binding works.
    Any help?
    Thanks.

    Hi Balaji,
    you need to bind you table to a backing bean and call a method in the backing bean when you hit the button. In the method you get the selected row from the table and have access to the columns of it. Then call the the method with the parameters.
    To bind the table to a bean select the properties of the table, go to behavior section and look for the advanced section 'Binding' property.
    Select the small down arrow at the right side and click edit. In the dialog select or create a bean and property for the table.
    Go to the button properties, look for 'Action', again select the small down arrow and click 'Edit'. Select the bean which holds the table property and create a method for the button.
    The method look like    public void bearbeitenQuelle(ActionEvent actionEvent)
            // Add event code here...
            RichTable lTable = getYourTable();
            Object lData = lTable.getSelectedRowData();
            FacesCtrlHierNodeBinding lNB = (FacesCtrlHierNodeBinding) lData;
            YourViewRow lRow = (YourViewRow ) lNB.getCurrentRow();
        }Hope the get you started
    Timo

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • NSInvalidArgumentException : Attempt to set value for immutable property

    I get "An unexpected error has occurred. Please quit and reopen Keynote." EVERY time I try to copy a slide and change the master that controls it. Console says "Exception caught by top level: NSInvalidArgumentException : Attempt to set value for immutable property moviePoster." I'm not using any 3rd party themes. Advice from anyone?

    You can use the skip property of the train stop. You can have an EL expression for it, some thing like this #{pageFlowScope.isContinueEnabled}.
    Once all the mandatory fields are entered, you can set the isContinueEnabled flag and refresh the train button bar.
    For more info refer this: http://docs.oracle.com/cd/E14571_01/web.1111/b31974/taskflows_complex.htm#CJHFBFIE
    Also, you can try navigating to different train stops programmatically.
    Check: 082.      How-to programmatically navigate ADF train models
    in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • How to define a Value for an Attribute of an Class

    Hi,
    How to define a Value for an Attribute of a Class ...
    ( I need to change the value of an Attribute of a class in standard program ....
    Ex...
       cl_hrce_masterswitches=>infotype_framework_is_active
    Here infotype_framework_is_active is the attribute .. its value in standard program is 'X'... Now i need to change it as '  '.
    How to define it and set value as ' '.

    Hello Surendar
    The static attribute INFOTYPE_FRAMEWORK_IS_ACTIVE is read-only and there is not SETTER method to manipulate its value.
    However, the attribute is filled in the CLASS_CONSTRUCTOR:
    METHOD class_constructor.
        IF ce_is_active                 = true OR
           global_payroll_is_active     = true OR
           mngmt_global_empls_is_active = true.
          infotype_framework_is_active = true.
          perid_infotype_is_active     = true.
        ELSE.
          infotype_framework_is_active = false.
          perid_infotype_is_active     = false.
        ENDIF.
    ENDMETHOD.
    Thus, you need to analyze how attribute CE_IS_ACTIVE, GLOBAL_PAYROLL_IS_ACTIVE and MNGMT_GLOBAL_EMPLS_IS_ACTIVE are filled in the CLASS_CONSTRUCTOR.
    For sure you will find customizing settings that are responsible for this.
    Regards
      Uwe

  • How to insert / Update value for PFAKT in BP Relationship

    Hi Friends / Experts,
    How to insert the value for PFAKT ( Function value ) in BP Relationship in BP tcode , in SAP CRM.
    I have tried it but it BAPI_BUPR_CONTP_CREATE. But I need it with BAPI_BUPR_RELATIONSHIP_CREATE Function Module.
    Please help me out.
    Any Enhancement points in BAPI_BUPR_RELATIONSHIP_CREATE or any user exists. Please let me know.
    Regards,
    KMF.

    you can also acheive this using MERGE( available in sql 2008 and above).
    also, you are referring to DTS. DTS is legacy solution now..are you using sql 2000,  you can use ssis, if you want and it available in sql 2005. as said, there are multiple ways you can do this.. it find the below one a easy solution, since your are
    talking about only one table.. 
    try this example..
    create table test1(sno int primary key,sname varchar(20),scity varchar(20))
    go
    create table test2(sno int primary key,sname varchar(20),scity varchar(20))
    go
    insert into test1
    values(1,'stan','atlanta'),(2,'william','newyork')
    go
    insert into test2
    values(1,'robin','orlando')
    go
    --set this in you sql job and let it run for every half an hour
    MERGE test2 t2
    USING test1 t1
    ON t2.sno = t1.sno
    WHEN MATCHED THEN
    UPDATE
    SET t2.sname = t1.sname,t2.scity=t1.scity
    WHEN NOT MATCHED by target THEN
    Insert(sno,sname,scity)
    values (sno,sname,scity);
    go
    --check this table and clean up
    select * from test2
    go
    drop table test1
    go
    drop table test2
    Hope it Helps!!

  • Setting values for non-displayed fields on a Tabular Form

    I'm having a problem setting non-displayed fields on the same table as displayed fields like last_update_date, last_updated_by, id's and other fields when creating new records or updating existing records in a Tabular form.
    What is the best and easiest way to set these values without using database triggers?

    Hi Jes,
    I'm a little reluctant to use database triggers as I used this product a couple of years ago and I'm fairly sure I handled this problem in HTML DB without the use of triggers. I am therefore I'm getting a touch frustrated that I can't remember how to do it now !!
    Do you know of any way of setting values for non-displayed fields on a Tabular Form without using database triggers?
    Also, you seem to be suggesting that database triggers is the best way to do this?
    Thanks

Maybe you are looking for