Refresh adf table and selection row

Hi,
I create web application. I have created entity Users from MySQL database and managed Bean. In this managed Bean (sessionScope) is method for connection to database and method for adding new row (data) in database. It works.
I have 2 problems.
The first.
I have form for adding User and commandButton Add.
How I can refresh (update) adf table after executing SQL command (in commandButton Add) ? Now I must reconnect session.
The second problem:
I want to show a panel with data from one row from adf table.
How I can selection this row in popup ?
My table:
<af:table var="user" rowBandingInterval="0" id="t2"
                                              inlineStyle="margin:20px 30px; width:578pt; height:160pt;"
                                              value="#{userController.users}"
                                              rows="15"
                                              emptyText="#{bindings.UsersprototypView11.viewable ? 'No data to display.' : 'Access Denied.'}"
                                              fetchSize="#{bindings.UsersprototypView11.rangeSize}"
                                              editingMode="clickToEdit" rowSelection="single"
                                              selectedRowKeys="#{userController.selectedUser}"
                                              selectionListener="#{userController.selectedUser}"> ---- Here I have problem.
                                        <af:column sortProperty="#{user.user_id}"
                                                   sortable="false"
                                                   headerText="ID"                            
                                                   id="c11" width="33">
                                            <af:commandLink id="ot34" text="#{user.user_id}">
                                                <af:showPopupBehavior popupId="p4" triggerType="action"/>
                                            </af:commandLink>
                                        </af:column>
                                        <af:column sortProperty="#{user.firstname}"
                                                   sortable="false"
                                                   headerText="Firstname"
                                                   id="c20" width="111">
                                            <af:outputText value="#{user.firstname}" id="ot27"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.lastname}"
                                                   sortable="false"
                                                   headerText="Lastname"
                                                   id="c12">
                                            <af:outputText value="#{user.lastname}" id="ot31"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.address}"
                                                   sortable="false"
                                                   headerText="Address"
                                                   id="c9" width="95">
                                            <af:outputText value="#{user.address}" id="ot32"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.city}"
                                                   sortable="false"
                                                   headerText="#City"
                                                   id="c10" width="76">
                                            <af:outputText value="#{user.city}" id="ot33"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.username}"
                                                   sortable="false"
                                                   headerText="Username"
                                                   id="c7" width="102">
                                            <af:outputText value="#{user.username}" id="ot29"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.email}"
                                                   sortable="false"
                                                   headerText="E-mail"
                                                   id="c21" width="106">
                                            <af:outputText value="#{user.email}" id="ot28"/>
                                        </af:column>
                                        <af:column sortProperty="#{user.regdate}"
                                                   sortable="false"
                                                   headerText="Registration"
                                                   id="c8" width="108">
                                            <af:outputText value="#{user.regdate}" id="ot30">
                                                <af:convertDateTime pattern="#{user.regdate}"/>
                                            </af:outputText>
                                        </af:column>
                                    </af:table>userController is name managed Bean.
users is list of users.
My panel window (popup):
<af:popup childCreation="deferred" autoCancel="disabled" id="p4">
                                    <af:panelWindow id="pw9" title="Delete user">
                                        <af:panelFormLayout id="pfl6">
                                            <af:panelLabelAndMessage label="ID:"
                                                                     id="plam16">
                                                <af:outputText value="#{userController.selectedUser.user_id}" id="ot50"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="Firstname:"
                                                                     id="plam17">
                                                <af:outputText value="#{userController.selectedUser.firstname}" id="ot51"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="Lastname:"
                                                                     id="plam18">
                                                <af:outputText value="#{userController.selectedUser.lastname}" id="ot52"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="Address:"
                                                                     id="plam19">
                                                <af:outputText value="#{userController.selectedUser.address}" id="ot53"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="City:" id="plam20">
                                                <af:outputText value="#{userController.selectedUser.city}" id="ot54"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="Username:"
                                                                     id="plam21">
                                                <af:outputText value="#{userController.selectedUser.username}" id="ot55"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="E-mail:" id="plam22">
                                                <af:outputText value="#{userController.selectedUser.email}" id="ot56"/>
                                            </af:panelLabelAndMessage>
                                            <af:panelLabelAndMessage label="Registration:"
                                                                     id="plam23">
                                                <af:outputText value="#{userController.selectedUser.regdate}" id="ot57">
                                                    <af:convertDateTime pattern="#{userController.selectedUser.regdate}"/>
                                                </af:outputText>
                                            </af:panelLabelAndMessage>
                                        </af:panelFormLayout>
                                        <af:commandButton text="Delete" id="cb18"
                                                          inlineStyle="width:80pt; margin:10px 0px 0px 0px;"/>
                                    </af:panelWindow>
                                </af:popup>When I cut out row: selectionListener="#{userController.selectedUser}
Popup (for deleting user) looks like this:
http://imageshack.us/photo/my-images/404/popupc.jpg/
I need to get the outputs from <af:outputText> in this popup.
Thanks for help.
Edited by: user9202624 on 26.2.2013 7:52

thanks for answer.
I added partialTriggers in af:table
<af:table var="user" rowBandingInterval="0" id="t2"
                                              inlineStyle="margin:20px 30px; width:578pt; height:160pt;"
                                              value="#{userController.users}"
                                              rows="15"
                                              emptyText="#{bindings.UsersprototypView11.viewable ? 'No data to display.' : 'Access Denied.'}"
                                              fetchSize="#{bindings.UsersprototypView11.rangeSize}"
                                              editingMode="clickToEdit" rowSelection="single"
                                              selectedRowKeys="#{userController.selectedUser}"
                                              partialTriggers="::t1" >What next ? What should I do next ? Sry, I'm newbie in adf and jDev.
Edited by: user9202624 on 26.2.2013 8:55

Similar Messages

  • JDev 11g TP4: ADF tables and ADF form pop-ups PPR?

    I was hoping somebody could help me with the following please.
    I'm currently having a bit of an issue with ADF tables and ADF forms embedded in a pop-up, where the wrong record is shown in the popup. I suspect it's a PPR problem but am unsure. My scenario:
    1) I have the following table:
    CREATE TABLE "CHRIS_MUIR_DELETE_ME" (
    "ID" NUMBER(5,0)
    "SOME_COLUMN" VARCHAR2(20 BYTE)
    CONSTRAINT "CHRIS_MUIR_DELETE_ME_PK" PRIMARY KEY ("ID"));2) I have a default ADF BC EO/VO combination for this table.
    3) I have an ADF Faces RC page with a read-only table based on this VO:
    <af:table value="#{bindings.ChrisMuirDeleteMeView.collectionModel}" var="row"
       rows="#{bindings.ChrisMuirDeleteMeView.rangeSize}"
       emptyText="#{bindings.ChrisMuirDeleteMeView.viewable ? 'No rows yet.' : 'Access Denied.'}"
       fetchSize="#{bindings.ChrisMuirDeleteMeView.rangeSize}"
       selectedRowKeys="#{bindings.ChrisMuirDeleteMeView.collectionModel.selectedRow}"
       selectionListener="#{bindings.ChrisMuirDeleteMeView.collectionModel.makeCurrent}"
       rowSelection="single" partialTriggers="myDialog">
      <af:column sortProperty="Id" sortable="false"
        headerText="#{bindings.ChrisMuirDeleteMeView.hints.Id.label}">
         <af:outputText value="#{row.Id}">
            <af:convertNumber groupingUsed="false" pattern="#{bindings.ChrisMuirDeleteMeView.hints.Id.format}"/>
         </af:outputText>
      </af:column>
      <af:column sortProperty="SomeColumn" sortable="false"
         headerText="#{bindings.ChrisMuirDeleteMeView.hints.SomeColumn.label}">
        <af:outputText value="#{row.SomeColumn}"/>
      </af:column>
    </af:table>Note that rowSelection is set to "single".
    3) The page also includes a popup-dialog combo that shows the same data from the table (ie. they're based on the same VO) as an ADF Input Form:
    <af:popup id="myPopUp">
      <af:dialog type="okCancel" id="myDialog">
         <af:panelFormLayout>
            <af:inputText value="#{bindings.Id.inputValue}"
                label="#{bindings.Id.hints.label}"
                required="#{bindings.Id.hints.mandatory}">
               <f:validator binding="#{bindings.Id.validator}"/>
               <af:convertNumber groupingUsed="false" pattern="#{bindings.Id.format}"/>
            </af:inputText>
            <af:inputText value="#{bindings.SomeColumn.inputValue}"
                label="#{bindings.SomeColumn.hints.label}"
                required="#{bindings.SomeColumn.hints.mandatory}"/>
            </af:inputText>
         </af:panelFormLayout>
      </af:dialog>
    </af:popup>Note that the table's partialTriggers is set to the id of the dialog. This implies on return from the dialog, the table will update itself to reflect any changes.
    4) I have a data bound Create commandButton, + a simple Edit commandButton. The Edit button includes an <af:showPopupBehavior> to display the popup:
    <af:commandButton
        actionListener="#{bindings.Create.execute}" text="Create"
        disabled="#{!bindings.Create.enabled}"
        partialTriggers="table1"/>
    <af:commandButton text="Edit">
        <af:showPopupBehavior popupId="myPopUp"/>
    </af:commandButton>If you run the form with the following steps, you can reproduce my issue:
    1) Click the create button, this will create a blank record in the <af:table>
    2) Click the edit button and give the 2 fields values, press ok. Note this is reflected back in the table.
    3) Click the create button, you will now see another blank record in the <af:table>. Note that the current row selection highlight is on the new record.
    4) In the table select the original record, then the Edit button. Oddly the input form is showing the blank record, not the original record even though we selected it in the <af:table>
    This implies to me that I have to hook up a PPR event such that the fields on the popup know to update themselves when the user selects a new row in the table.
    I've tried setting the partialTriggers property for the popup, dialog and individual fields on the popup page to the table id, but this doesn't seem to work.
    Does anybody have any suggestions on how I'm meant to hook up the partialTriggers in this case? I'm at a bit of a loss to know what to do to solve this issue. Is it possible the table selectionListener isn't working?
    Thanks for your help in advance.
    Regards,
    CM.

    G'day gang
    This morning I had a chance to play with Pavle's suggestions, specifically the popup contentDelivery option, and it's solved the issue. Specifically changing the contentDelivery option to lazyUncached was the golden solution.
    As the popup component help states, the default functionality is: "lazy -- the default strategy described above. The content isn't loaded until you show the popup once, but then is cached."
    ....cached being the issue I was seeing.....
    While the lazyUncached options states: "lazyUncached -- the content isn't loaded until you show the popup, and then is re-fetched every subsequent time you show the popup. Use this strategy if the popup shows data that can become stale."
    The nasty thing about the lazy option is the fact that in the dialog it can show the previous cached result (even though you've selected a different record), and you can even appear to edit that cached result in the dialog, but when you press okay in the dialog and return to the previous table, it's updated the record you selected, not the cached result.
    Confusing, but not a bug if you understand the popup contentDelivery options.
    Frank, if you'd like it, I have the simple test case available to send you. But as it's not a bug I wont send it to you unless requested.
    Thanks to both of you for your assistance with this one. Once again your help is much appreciated! :)
    I'll take time out to blog about this in the next few weeks to assist others.
    Thanks & regards,
    CM.

  • Compare 2 tables and insert rows missing in each table.

    I have a tough situation. I have two exact tables- one online and one offline database. I know that there are missing rows of data from each table, so I need to make a comparison of one table and insert rows that do not exist. I was thinking to try this, but it took over 3 hours to run and did not return anything:
    insert into t
    select * from t a
    where not exists (select * from [email protected] b
    where a.col1 != b.col1
    and a.col2 != b.col2
    and a.col3 != b.col3);
    and it goes on for another 7columns.
    The trouble I have is to include a date clause so that the query can be broken down into running only a few months of data comparisions at a time- the records go back 4 years to compare. Also is there a way to write this so that it will query both tables at the same time in order to speed things up- or is one table at a time the best advice? Each table has over 100 million records to compare, that's why I was hoping to use a date criteria since one column is date.
    Let me know what you advise to make this work, I hope I was on the right track.

    Not sure if the MINUS operator will perform better with your data set but;
    SQL> create table t1 (some_id number, some_date date)
    Table created.
    SQL> create table t2 (some_id number, some_date date)
    Table created.
    SQL> insert into t1 values (1, trunc(sysdate))
    1 row created.
    SQL> insert into t1 values (2, trunc(sysdate-5))
    1 row created.
    SQL> insert into t1 values (4, trunc(sysdate-90))
    1 row created.
    SQL> insert into t2 values (1, trunc(sysdate))
    1 row created.
    SQL> insert into t2 values (3, trunc(sysdate-10))
    1 row created.
    SQL> insert into t2 values (5, trunc(sysdate-100))
    1 row created.
    SQL> select * from t1
       SOME_ID SOME_DAT
             1 07-07-30
             2 07-07-25
             4 07-05-01
    3 rows selected.
    SQL> select * from t2
       SOME_ID SOME_DAT
             1 07-07-30
             3 07-07-20
             5 07-04-21
    3 rows selected.
    SQL> insert into t1 (
       select some_id, some_date from t2 where some_date between sysdate-50 and sysdate
       minus
       select some_id, some_date from t1 where some_date between sysdate-50 and sysdate)
    1 row created.
    SQL> insert into t2 (
       select some_id, some_date from t1 where some_date between sysdate-50 and sysdate
       minus
       select some_id, some_date from t2 where some_date between sysdate-50 and sysdate)
    1 row created.
    SQL> select * from t1
       SOME_ID SOME_DAT
             1 07-07-30
             2 07-07-25
             4 07-05-01
             3 07-07-20
    4 rows selected.
    SQL> select * from t2
       SOME_ID SOME_DAT
             1 07-07-30
             3 07-07-20
             5 07-04-21
             2 07-07-25
    4 rows selected.

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • Adf Table with selection as set to NONE

    Hi,
    I having a scenario as explained below:
    I am populating records in to the adf Table
    After that I am using checkbox for selecting multiple records in the table and delete them.
    So I set selection property to None for the table. Because I want user to edit only that record which is checked.
    My multiple delete is working fine.
    Now if i selected one checkbox and and click on edit(which I have placed in the panal collection toolbar) it should show me the record in the which I have selected by check box. But it is showing me the first row.
    Can anybody help me to set the current row of the adf table manually which is having selection property as none. so that I can populate in popup.
    If some other way is available please explain.
    I am using jdeveloper 11.1.2.1
    Thanks,
    Sandeep.

    I don't see why you can't set selection property to "single"? (and don't forget to restore table SelectionListener property - if deleted)
    This will set current row when you click on it.
    If you programmatically iterate through RowSet to find rows with selected checkbox, this will work regardless of value in "selection" property.
    Dario
    Edited by: kdario on Nov 7, 2012 5:20 AM
    Edited by: kdario on Nov 7, 2012 5:22 AM

  • ADF Tables and 508 Accessibility Complience

    How can I apply the 'headers' attribute to individual cells in an ADF table or, as an alternative apply the 'scope' attribute to row and column headers so that my screen reader, currently MS Narrator, will read the contents of each cell?

    Yes, I have verified that accessibility-mode is set to 'screenReader' - each row and column is also rendered with a 'select' control. I see that in the generated HTML for the table the scope="col" attribute for each header is being set but not "scope=row" for each row. I've also tried the NVDA screen reader as well - it can 'occasionally' read the contents of each cell using the keyboard arrow keys but it will not read column or row header names - so for large tables a vision impaired user wouldn't know the context for each cell value.
    To bring up another point, without the capability of inserting a 'headers' attribute for cell, a table containing multi-layer headings would be impossible for a screen reader to read.
    I've also noticed that for single one choice controls the screen reader does not read the label and control widget type until after the select event is generated - usually by pressing the down arrow key. Text entry controls work as expected.

  • ADF table with select onechoice

    Hi,my scenario is:
    I have adf form and adf table on jspx page by vo(A).In table here there is need for select one choice populated from another vo(B).
    To acheive this i have created a transien attribue in vo(A) and bind to vo(B ) as select one choice.
    Now on value selected in selected one choice of adf table i want to filter value in another select one choice which is part of adf form on page.
    Please help me out.
    Thanks

    Hi,
    As I understand your requirement is how to build dependent LOV/selectOneChoice in ADF.
    Check this http://www.google.co.in/search?q=dependent+selectOneChoice+%2B+adf&btnG=Search&hl=en&source=hp&gbv=2&gs_sm=e&gs_upl=5656l8531l0l8687l10l9l0l2l0l0l360l1549l2-1.4l5l0&safe=active&oq=dependent+selectOneChoice+%2B+adf&aq=f&aqi=&aql=
    ~Abhijit

  • How to refresh Adf  table from Adf popup

    Hi all,
    i have and adf query panel with table. On this table for each record, there is a button to perform some operations. When i click this button i am launching an adf popup. Inside this popup i have used a adf dialog of type yes/no. i am using this as a confirmation. (ex- Are you sure you want to change (ex- deactivate) this record?) If yes is clicked i change only one field. Suppose the record belongs to a client. On click of yes, i change the status to some value. ex- deactivate. so with the dialog's button click, i change the table data. but it is not reflected unless i made a query. i want to automatically refresh this table on click of dialog button's yes. I hope i made my self clear. Can this be done with Jdev. Im using Jdev 11.1.1.0.1. Pls help me with this.
    Thanks in advance,
    Nad

    Hi Maxi, Timo, i tried the solutions by both of you. Thanks alot for replying. But i get an error. This is what i did. for Deactivate btn in the table, i have added the below return listerner code.
    public void onReturnFromDialog(ReturnEvent returnEvent) {
    if (returnEvent.getReturnValue() != null) {
    refreshCurrentPage();
    protected void refreshCurrentPage() {
    FacesContext context = FacesContext.getCurrentInstance();
    String currentView = context.getViewRoot().getViewId();
    ViewHandler vh = context.getApplication().getViewHandler();
    UIViewRoot x = vh.createView(context, currentView);
    x.setViewId(currentView);
    context.setViewRoot(x);
    but i noticed that both these methods are not invoked. So i added the below dialoglistener code to the af:dialog that is inside my popup. This popup is shown when the deactivate btn is clicked.
    public void DialogListenAction(DialogEvent dialogEvent) {
    if(dialogEvent.getOutcome().toString().equals("yes"))
    DCIteratorBinding iter = ADFUtils.getIterator("MembersVO3");
    String des = (String) iter.getCurrentRow().getAttribute("MemberCode");
    service.deactivateMember(des); //This is where i update the record and set the attribute value to des
    System.out.println("suspect1");
    RequestContext.getCurrentInstance().returnFromDialog(des,null);
    //AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    //afContext.getCurrentInstance().returnFromDialog(des, null);
    System.out.println("suspect2");
    //ifCancel Do nothing
    when i add 'RequestContext.getCurrentInstance().returnFromDialog(des,null);'
    OR
    'AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.getCurrentInstance().returnFromDialog(des, null);'
    i get the error - java.lang.IllegalStateException: popView(): No view has been pushed.
    i cant figure out what is the wrong here. Can some one pls suggest how to resolve this?
    Thanks alot.

  • Updating multpile tables and multiple rows - JDBC adapter

    Hi,
    The scenario is like this. i receive an Idoc which has header information and various line items (multiple occurrance of a segment). the hearder details have to be sent to one table, TableA, and all line items has to go to another table, TableB, and for each line item, a new row has to be inserted in TableB.
    How can i acheive this using JDBC adapter? how should my data type look like? what are the settings i need to do in adapter config?
    Thanks and Regards,
    Rashmi

    Hi Rashmi,
    You can use the following link for the JDBC adapter call :
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    You need to provide the JDBC Driver, Connection,User Name and the password.
    The data type structure you can take from the Bhavesh blog:
    JDBC Receiver Adapter -- Synchronous Select – Step by Step
    Since you just need to update the tables, take only the sender side of the blog, i.e. the request part and configure the scenario accordingly.
    Regards,
    Sanjeev.

  • ADF Table and Command Link

    Hi,
    I am using version 11.1.1.5.0;
    I am facing an issue with a commandLink held in a table column and it's actionListener not firing ahead of the selectionListener of the table.
    The selectionListener of the table call a method in the backing bean to show/hide like a toggle affect. When the commadLink is visible and selected there is an actionListener to execute another method but the tables selectionListener takes precedence and the commandLink is hidden.
    Any suggestions?
    Regards
    Sun-E

    JSF Fragment code:
    <af:table value="#{bindings.clearedConditionsVO1.collectionModel}"
    var="row" rows="#{bindings.clearedConditionsVO1.rangeSize}"
    id="t4" rowSelection="single" styleClass="conTable"
    columnStretching="column:col2" horizontalGridVisible="false"
    verticalGridVisible="false" fetchSize="100"
    *selectionListener="#{pageFlowScope.consRIBean.cleConSelListner}"*
    contentDelivery="immediate" rowBandingInterval="0"
    autoHeightRows="100">
    <af:column id="col2">
    <af:panelGroupLayout id="pgl59" layout="vertical"
    styleClass="conditionsIter2" valign="top">
    <af:panelGroupLayout id="panelGroupLayout16" layout="vertical">
    <af:outputText id="outputText9" value="Affected plot(s):"
    styleClass="outstanding_right"/>
    <af:outputText value="#{row.bindings.Clearedplots.inputValue}"
    id="outputText10" styleClass="conText"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl63" layout="horizontal"
    styleClass="gap1"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:outputText id="ot35" value="Creation date:"C
    <af:panelGroupLayout id="pgl64" layout="horizontal"
    styleClass="APdpr"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:panelGroupLayout id="pgl65" layout="horizontal"
    halign="left">
    <af:outputText value="contact: #{row.bindings.Contact.inputValue}"
    id="ot37" styleClass="conText"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl66" layout="horizontal"
    halign="right">
    <af:image source="/images/arwlink_arrow.png" id="i7"
    shortDesc="back"/>
    <af:commandLink text="Contact" id="cl18"
    styleClass="arwlink"
              *actionListener="#{pageFlowScope.consRIBean.openPopUp}">*
    <af:setPropertyListener from="#{row.ConditionRiId}"
    to="#{pageFlowScope.conditionRIiD}"
    type="action"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:outputText value="Job Ref: #{row.bindings.FusionJobId.inputValue}"
    id="ot38"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}"
    styleClass="conText"/>
    <af:spacer width="10" height="10" id="s24"/>
    <af:panelGroupLayout id="pgl60"
    rendered="#{row.exCol eq 'true' ? 'false' : 'true'}">
    <af:image source="/images/arwlink_add.png" id="i8"
    shortDesc="Read more"/>
    <af:commandLink text="Read more" id="cl11"
    styleClass="arwlink"
    action="#{pageFlowScope.consRIBean.showClearConCollection}">
    <af:setPropertyListener from="#{row.ConditionRiId}"
    to="#{pageFlowScope.conditionRIiD}"
    type="action"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl68" styleClass="conditionsIter4"
    layout="vertical" valign="top"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:outputText value="Documents tagged to this condition:"
    id="ot39" styleClass="DocCons"/>
    <af:panelGroupLayout id="pgl69" styleClass="gap1">
    <af:image source="/images/arwlink_arrow.png" id="i9"
    shortDesc="Send"/>
    <af:commandLink text="Send now" id="cl12" styleClass="arwlink"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:spacer height="15" id="s13"/>
    </af:column>
    </af:table>
    </af:panelGroupLayout>

  • Dynamically creating table and inserting rows and columns using JSP

    Hi,
    I'm using mysql and JSP to create web interface for my forms/tables. I wanna create the table dynamically depending on the data in the table and for each particualar record. and these values shud be loaded on the form after loading from the databaes as soon as the form loads.
    also i want to have a button which shud add new rows dynamically. and same one for columns.
    how do i calculate the values across the rows on the forms
    I'm new to JSP. Please point me in the right direction...any tutorials or code will be helpful.
    Any help is appreciated.
    Thanks
    Ayesha

    u write the code in sequence:
    1 write jdbs to select count(* )from table
    2 put in array e.g. String doc_no=new String[count];
    3 write jdbs to select * from table with condition
    //for no. of records just write
    for(int j=0;j<(count);j++){
    <% while(rs4.next()){
         doc_no=rs4.getString(2);
                        date1[i]=rs4.getString(3);
         doc_type[i]=rs4.getString(4);
         location[i]=rs4.getString(5);
         cheque[i]=rs4.getString(6);
         rate[i]=rs4.getInt(7);
         deb_qty[i]=rs4.getInt(8);
         cre_qty[i]=rs4.getInt(9);
         deb_amt[i]=rs4.getInt(10);
         cre_amt[i]=rs4.getInt(11);
         i++;
         //rs4.close();
                   for(int j=0;j<(count);j++){
                   System.out.println("Data count= "+j);
                   %>
    <tr>
    <td width="15%"><font size="1"><%=doc_no[j] %></font></td>
    <td width="10%"><font size="1"><%=date1[j] %></font></td>
    <td width="12%"><font size="1"><%=doc_type[j] %></font></td>
    <td width="9%"><font size="1"><%=location[j] %></font></td>
    <td width="9%">
    <div align="left"><font size="1"><%=cheque[j] %></font></div>
    </td>
    <td width="8%">
    <div align="right"><font size="1"><%=deb_qty[j] %></font></div>
    </td>
    <td width="8%">
    <div align="right"><font size="1"><%=cre_qty[j] %></font></div>
    </td>
    <td width="9%">
    <div align="right"><font size="1"><%=deb_amt[j] %></font></div>
    </td>
    <td width="10%">
    <div align="right"><font size="1"><%=cre_amt[j] %></font></div>
    </td>
    </tr>
    write if there is any specific problem
    bye,
    Samir

  • ADF table and ADF form on the same view object

    Hi,
    As per the ADF demos available on ADF site, I created a jsf page with 2 panels. One panel is an ADF table based on a view object. And the other panel is and ADF form based on the same view object. My requirement is that as I scroll through the records in the ADF table, the ADF Form should dynamically display the details of the record in the ADF table. My understanding is that this should be automatic. However, its not working as expected. What have I missed?

    Hi,
    Apply PPR for form that displays details.
    Like :
    <af:table id="t3">
    </af:table>
    <af:panelFormLayout id="pfl2" partialTriggers="t3">
    </af:panelFormLayout >

  • How to read 'clicked header' AND selected row from multicolumn listbox?

    I have a multicolumn listbox filled with 6 columns and about 500 rows.
    I want the user to be able to click on a column header, and sort the listbox alphabetically on that column. I've written the code for that, and that works. (using the 'itemnames' en 'get clicked col hdr' properties.)
    However, I also want to include the option, that when a user highlights a row, and then clicks on the header, that after the listbox gets sorted it scrolls down to the selected row.
    (So that the user doesn't have to search for it)
    And that's where things go wrong, because the value of the listbox changes to zero when you click on a column header. No I idea why it does that, but it's rather
    annoying. Can I change that behaviour somehow?
    Or any ideas how to get around it?

    My thanks to you and Jared.
    Seems I got a working solution now.
    Did take a while to figure out why your solution worked. Basicly, you're reading the row from a few iterations before.
    As soon as I understood that, I simplified it a little. Look at the attached file... I think it does the same. :-)
    Jared asked for the sorting routine. As I don't seem to be able to attach files when replying to comments, I took the liberty to include it here also.
    Basicly, I just use the 'sort 1D array' that comes with Labview 6. To be able to sort a 2D array, I convert every row to a cluster. That's something the 'sort 1D array' VI can handle nicely.
    To sort on the correct column, I just cut all columns in front, and paste them behind again. A
    fter sorting, I reverse the process.
    Anthony.
    Attachments:
    copy2_of_multicolumn.vi ‏26 KB
    sort_2d_string_array.vi ‏34 KB

  • Why there is a huge difference between a row size on a disk based table and a row size in memoptimized table of SQL 2014?

    Hi All,
    I have two table with similar structure and data, one is on disk and the other is in memory. I somehow calculated the difference between a row size of on disk and in memory table and found that the row size of in memory is 700 Bytes more than the disk based
    tables.
    aa

    As others mentioned, memory optimized tables and disk based tables have different structures in SQL Server 2014.
    For memory optimized tables, the number of indexes on table also contribute to the size. You can calculate the exact size of rows and thus the table size using the formula given in the below articles
    Table and Row Size in Memory-Optimized Tables
    Estimate the Size of a Table
    Krishnakumar S

  • Web dynpro ALV table copy selected row

    How to copy a selected row into new row with same values.
    Thanks

    Hi,
    I assume that there is a COPY buttonand there is a single lead seecltion for your alv table.
    Now,
    data:
      lr_node type ref to if_wd_context_node,
      lr_element type ref to if_wd_context_element,
      lr_element1 type ref to if_wd_context_element,
      ls_table type vbak,
    ls_table1 type vbak.
    lr_node = wd_context->get_chaild_node ( 'FLIGHT ' ).
    if lr_node is not initial.
    lr_element = lr_node->get_lead_selection ( ).
    lr_elemnet1 = lr_node->get_element( index = 4). "supose the index of new row is 4
    * you can use the get_element_count to know the record number
    endif.
    if lr_element is not initial.
    lr_element->get_statitc_attributes
    importing
    static_attributes = ls_table
    endif.
    if lr_element1 is not initial.
    lr_element1->set_staitc_attributes
    exporting
    STATIC_ATTRIBUTES = ls_table.
    endif.
    Assume that you have already created a new row...
    use code wizard.
    Regards,
    Lekha.

Maybe you are looking for

  • 10.1.4 in Windows Vista Home Premium

    Why do my downloads from websites open as blank windows?  Please answer in simple terms as I am not very computer literate.

  • Laptop monitor choice for photo editing with lightroom and photoshop

    Hi, i'm going to buy a laptop, mostly for photo editing with lightroom and photoshop use. I'm in trouble with the display choice. One laptop has LG LP156WF4 or AUO B156HAN01 display, that should be very similar matte ips display with 55%-60% coverage

  • Screen Contrast Too Bright - Changed Itself

    My mother-in-laws AIO computer monitor is too bright. The contrast changed automatically. No updates were done. I ran diagnostics, changed monitor settings, reset defaults. Nothing is changing the end result. Is the monitor just dying? It's an all-in

  • Back up to hard drive

    Since switching to Verizon and the use of their wireless router, our Seagate external hard drive does not open and perform file back ups when connected to the PC. I have even connected it directly to the router without any effect. We would appreciate

  • SAP - APO - SNP

    Hi Gurus, Can anyone tell me what setting we need to make in APO for SNP. How to set up CIF interface and other related activities. Am new to the APO and SNP stuff. Your guidance will help me go through this setup Arun