Undo changes in adf table row

I have a table surrounded by a panel collection. In panel collection i have a button for action "createInsert" of view object to add new rows in table. I have created a method in ViewRowImpl with following signature:
public void undoChanges(){
refresh(REFRESH_UNDO_CHANGES | REFRESH_FORGET_NEW_ROWS);
Now i have button in first column of each row in a table for "undochanges". I have done "partialsubmit" true for this button and in partial trigger of table i have given the reference id of this button. Now everything works fine as expected but there is one problem. When i add new row and in row there are some fields required. Now in that row without entering any data, i presses "undo" button, it gives error that some values are missing so in order to avoid this error, i set "immediate" property of button "true". Now it is working fine but ripple effect of this is that when i changes some existing rows and presses "undo" button, table refreshes but does not show old values. I have printed values in above method for changed attribute and i found that in fact values are changing but not reflecting on table inspite of refreshing. What's the reason for it?

Try putting the partialTriggers on the individual components inside the table columns instead. Having a partialTrigger on the table itself generated by a components inside the table - your button, could cause recursive partialTriggers or "+partialTrigger confusion+"
Nick

Similar Messages

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to re-calculate a column value based on another column value in the same ADF Table row

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I have an adf table with 2 columns, columnA and columnB.
    When the value changed in ColumnA,
    1) i need to call a PLSQL and update the ColumnB value that is returned from PLSQL.
    2) Show a warning message if the existing value in ColumnB is different from the one that is returned from PLSQL.
    Can anybody suggest how can i accomplish this?
    Thanks,
    Vinod

    hi user,
    if you have inputtext means have a valuechangelistener
    in that call your pl/sql function supply input value to the appropriate function then grab the result of the function. then bind the column inputtext and compare with it. then raise your warning using FacesMessage classes.
    Sameh Nassar: Create PL/SQL Function And Call It From Your ADF Application

  • JDEV 10.1.3.3 ADF Table Row Highlighting onMouseOver

    I am working with JDEV 10.1.3.3 and I have the following requirement for an ADF table.
    When a user's mouse hovers over a table row, the table row should be highlighted and a title should pop up displaying the value of a hidden column in the table. In html, this would look something like the following:
    <tr on mouseover="this.bgColor='#elcda7'" on mouseout="this.bgColor='<whatever the current row color is>'" title="Opportunity Primary: <% name %>">
    Can anyone help? Thank you!

    What i want to know is if we have some date to uix support in jdev 10.1.3

  • ADF Table row background color change ???

    Hi All
    i got below sql view object
    SELECT DEPARTMENT_ID,JOB_ID,COUNT(*) FROM EMPLOYEES GROUP BY DEPARTMENT_ID,ROLLUP(JOB_ID)
    By using this i will get each department_id, jobid's and total employes count in each department
    and i will get rollup for each departments ie i will get total employees.
    So i want to change the back ground of the total row.
    DepartmentId     JobId     Count1
    SA_REP 1
    1
    10     AD_ASST     1
    10     1 < this row in RED back ground in JSF page
    20     MK_MAN     1
    20     MK_REP     1
    20     2 < this row in RED back ground in JSF page
    30     PU_MAN     1
    30     PU_CLERK     5
    30     6< this row in RED back ground in JSF page
    40     HR_REP     1
    40     1< this row in RED back ground in JSF page
    50     ST_MAN     5
    50     SH_CLERK     20
    50     ST_CLERK     20
    50     45< this row in RED back ground in JSF page
    any kind of help is welcome...
    thanks
    Ravi

    Hi,
    you can do this by setting the background color of the outputText component that is the cell component e.g. in a read only table. Use the inlineStyle property to set the background-color but get the string from a managed bean. For each row you get a call to the managed bean and you can use JSF value binding
    FacesContext.getCurrentInstance().getApplication().createValueBinding()
    to access #{row} so that you can determine the value of a row column. Based on this you return a color
    Frank

  • Undo Changes in child table (using view link)

    Hello,
    My environment : Jdev 11.1.2.2.0
    I have a master-detail relationship which is linked using View Link. My requirement is to open a popup on double clicking the master row, and the user can add/delete/modify the child rows. Also I need to provide Ok/Cancel buttons. I need to Undo all the changes done for the child when the user clicks 'Cancel'. Can anyone please help to solve this?
    Regards
    Suresh

    First u need to a custom SelectionListener and make sure that RowSelection is set to single row. Add a method in the Managed Bean and make the row as current using the below java code
    public void Master_tableListener(SelectionEvent selectionEvent) {
    // This code is to make the selected row as current programatically
    ADFUtil.invokeEL("#{bindings.*YourViewObjectName*.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    Row selectedRow =
    (Row)ADFUtil.evaluateEL("#{bindings.*YourViewObjectIterator*.currentRow}");
    // Tip : U will get the above EL's when u 1st drop the Master table on the page
    // Invoke the pop up programatically
    RichPopup.PopupHints ph = new RichPopup.PopupHints();
    p1.show(ph);
    After writing this code.. All u need to do is Drop the Detail Table on the Dialog of ur popup. This way u will get all the rows of the table. So, filter this table with the foreign key using some code..
    Or u can just drop the region containing the Detail Table with the Rollback and commit
    - Saif
    Edited by: Saif Khan on Sep 11, 2012 5:34 PM

  • [SOLVED :)] Need help with adf table row selection

    Hi,
    In my application I am displaying results in a table. The DisplayRow property of table is set to Selected
    There are Next and Back buttons which help user to view details associated to the next/previous rows.
    I am using ADF 11g
    When user clicks Next or Previous button, then the selection of the row should also gets updated
    To achieve this i wrote below piece of code:
    this.tblS.getSelectedRowKeys().clear();+
    this.tblS.setRowIndex(count);+
    RowKeySet rks =  tblS.getSelectedRowKeys();+
    rks.add(tblS.getRowKey());+
    rks =  tblS.getSelectedRowKeys();+
    ISSUE:_
    When i run application and click Next/Previous Button, all functionalities do take place properly, but a null pointer exception is also thrown._+
    If i remove DisplayRow property of table from Selected to Default, every thing works good and no Exception is thrown_+       
    But as records in my table are going to be around 50-60 everytime, i need to set DisplayRow property of table to Selected.
    Is there any way to achieve this? Solve this problem?
    Some more details:_
    I am using a POJO class to create DataController. This DataController is having a view Object which is used to create results table.
    I have defined Primary key for my POJO Data Controller.
    Here is code of xml file:*
    +<?xml version="1.0" encoding="UTF-8" ?>+
    +<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.52.5"+
    id="ProductListBean" Package="xxadf.mm.resources"
    BeanClass="xxadf.mm.resources.ProductListBean"
    isJavaBased="true">
    +<Attribute Name="Product" Type="java.lang.String" PrimaryKey="true"/>+
    +<Attribute Name="Stock" Type="java.lang.String"/>+
    +<Attribute Name="Rate" Type="java.lang.String"/>+
    +<Attribute Name="Accuracy" Type="java.lang.String"/>+
    +<Attribute Name="Details" Type="java.lang.String"/>+
    +<ConstructorMethod IsCollection="true"+
    Type="xxadf.mm.resources.ProductListBean"
    BeanClass="xxadf.mm.resources.ProductListBean"
    id="ProductListBean"/>
    +</JavaBean>+
    Error Log:*
    SEVERE: Server Exception during PPR, #1
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:200)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:506)
    at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:414)
    at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:392)
    at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:517)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:458)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:618)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:392)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:641)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.access$100(ShowDetailItemRenderer.java:31)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:491)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:464)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer._encodeChildren(ShowDetailItemRenderer.java:406)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.encodeAll(ShowDetailItemRenderer.java:114)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1523)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.access$500(PanelTabbedRenderer.java:38)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:969)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:920)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer._renderTabBody(PanelTabbedRenderer.java:519)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.encodeAll(PanelTabbedRenderer.java:233)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:221)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:820)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1494)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:685)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:261)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
    at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please Help I have been struggling with this issue for long.
    Thanks and Regards
    Manav Ratra
    Edited by: user11255144 on Feb 8, 2010 5:33 AM

    Hi Arun,
    Thanks for replying.
    Actually in my application there is one result table and a section that is displaying complete details of the product selectd in result table.
    The next/previous buttons are not binded with result table.
    What I am doing is, I am puuliing data from VO and displaying it on form, whenever any of these buttons is clicked.
    As soon as these buttons are clicked data is coming up, but selection state of table is not getting updated.
    So to update selection state i wrote piece of code described in my previous post.
    Everything works fine if displayRow property of table is not set to selected.
    If i set display row property of table to selected, then i get a null pointer exception with message log defined in previous post.
    Although NPE is thrown, yet all data is properly fetched and table selection is also updated. But am not able to get how this NPE is coming and hpw to fix it .
    (I need to keep displayRow = selected, for all other cases NPE is not thrown)
    Please help..
    Thanks and Regards
    Manav Ratra

  • UIX - Changing read-only-table row colors

    Hi
    I have the requirement to alternate the background-row-color in an UIX read-only-table dependent on a value in the row.
    Can anybody point me in the right direction of a solution please?
    I'm familiar enough with the styles in the XSS style sheets, and using EL to dynamically change attributes of a UIX web page when rendered. However in the default <table> UIX tag generated by JDeveloper when dragging a data control onto a UIX web page, there doesn't appear to be a <row> tag for changing the background colour?
    Any help appreciated
    I'm using JDeveloper 9.0.5.2.
    Cheers,
    CM.

    I don't know if this works in JDeveloper 9.0.5.2, but there's a solution at least for JDevloper 10.1.2. You have to define a different styleClass (a CSS) for each column, depending on a condition. This solutions works as well together with row banding:
    <column>
      <columnHeader>
        <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.MyView,'Seats')}" text="Seats"/>
      </columnHeader>
      <contents>
        <rowLayout width="100%" styleClass="${ui:cond(uix.current.IsLocked == 'J', 'OraTableCellLocked', '')}">
          <contents>
            <cellFormat>
              <contents>
                <textInput model="${ui:defaulting(uix.current.Seats, ' ')}" columns="10" readOnly="true"/>
              </contents>
            </cellFormat>
          </contents>
        </rowLayout>
      </contents>
    </column>The styleClass "OraTableCellLocked" has to be defined in the file "base-desktop.xss". An example ("Locked" cells are displayed with a red background):
       <style selector=".OraTableCellLocked">
        <includeStyle name="TableCellDataText"/>
        <includeStyle name="TableCellDataVerticalAlign"/>
        <!--<includeStyle name="TableCellDataBackgroundColor"/>-->
        <includeStyle name="TableCellDataBorderColor"/>
        <property name="background-color">#FFA4A4</property>
      </style>Hope this helps, although the original is very old.
    Regards,
    Georg

  • ADF Table cell color based on the value in that field

    Dear All,
    I want to create a table for our new application which contains a table used to represent the data in a chart format or matrix format,
    and each cell of the table should be filled with a colour out of three colors, based on the value belongs to which range eg:(1-8 ->green, 9-20 - yellow etc),
    I dont know how to implement this. Please help...
    Ranjith

    Check this out.
    How to highlight ADF table row based on column value?
    -Arun

  • Add selected table row value to PageFlowScope so I can access in taskflow

    Hi all,
    Running into a problem getting a value from a selected ADF table row to a taskflow that is displayed as an inline popup. Here's the scenario. I have a view which displays a table. When I click on an edit btn I display my taskflow as an inline popup. What I would like to do is take the currently selected table row, pull off lets say the row name value and pass it to my taskflow for display. I've tried settting this value inside a mbean when I click the edit btn using:
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("editTargetNameSource", targetName);
            String tmpClear = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("editTargetNameSource");Which seems to get set but when I attempt to grab this value using EL inside my taskflow jspx page it looks to not be set.
    <af:outputLabel value="Selected Row" id="ol1"/><af:outputText value="#{pageFlowScope.editTargetNameSource}"It seems like pageFlowScope for my popup taskflow != pageFlowScope for the page my table lives in. I've tried setting this as a input page param but I have a feeling I'm missing something. I'd like to be able to set this value inside my bean when a user clicks the edit btn and then display this value in my taskflow popup.
    Any help is appreciated,
    -Wraith

    Thanks for the links Timo. I still must be missing something here. In the vids you linked it looked like he was using regions to pass params from main page to a taskflow; setting a param on child taskflow (causes param to be required when dragging into main page). So I think I understand I add an expected param to my taskflow which somehow will be set by my main page. The part I'm missing is from my main page how can I get the selected table row value and set it in the expected pageflowscope param that my taskflow is expecting?
    I've tried several things:
    1) Using managed bean associated with my main page; setting param inside the bean on main page btn click and then try accessing this mbean param (couldn't access this value as different pageflowscope I believe)
    2) Programmatically setting PageFlowScope as I linked in previous post.
    3) using setPropertyListener I can set a static value setting value in pageflowscope.start and then inside adfc.config for the task set start value to another value expected by the taskflow page. This seemed to work but I can't figure out how to do the programmatic version of this using the currently selected row and its value.
    One who seems to be missing something,
    -Wraith

  • How to insert static data into ADF Table

    Hi
    I have a requirement , As a part of development of my prototype. I have to populate some static data into table.How to achieve this without using any java is there any way to simply hard code the values into adf table rows.?
    Thanks in advance

    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/table.html
    http://otndnld.oracle.co.jp/document/products/as10g/101300/B25221_03/web.1013/b25386/web_MasterDetail006.htm
    http://andrejusb.blogspot.com/2006/12/displaying-all-columns-in-adf-table.html

  • Undo changes in table row in Oracle ADF 10g

    Hi all,
    I use a commandButton to undo changes in editable rows of a table. This is the code I use in the action() method of my button:
    DCIteratorBinding iter = (DCIteratorBinding)getBindings().get("queryVariablesFindAllIter");
    Row currRow = iter.getCurrentRow();
    if (currRow != null)
    currRow.refresh(Row.REFRESH_UNDO_CHANGES);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.getMasterDetail1());
    However the code fails at the refresh() method with the following error:
    javax.faces.el.EvaluationException: java.lang.UnsupportedOperationException: refresh()
    How can I overcome this error? Is there any other way to refresh the row?

    I use session EJBs. I'll see if i can do something similar, otherwise i'll re-execute the iterator

  • Change the background color of selected row in adf table

    Hi,
    Can somebody guide me in changing the background color of a row when its being selected. In my ADF table, one of the column is of type Command Link. So whenever i click this command link on any particular row that complete row color should change as an indication of that row being selected.
    Please guide me to do this. I referred to other forum posts, but they couldnt meet my need.
    Thanks
    ri

    Hi Frank,
    you're right. This should work. But the result is not perfect from my point of view.
    I use
    <af:table ...>
      <af:column ...>
        <af:outputText value="#{row.col1}" inlineStyle="#{row.mystyle}"/>
      </af:column>
    </af:table>and I get e.g. this in HTML:
    <table ...>
      <tr>
        <td class="af_column_cell-text OraTableBorder1111"><span style="font-weight:bold;">qqq</span></td>
      </tr>
    </table>while I would prefer to get somethig like this:
    <table ...>
      <tr>
        <td style="font-weight:bold;"><span>qqq</span></td>
      </tr>
    </table>, which looks much smarter. Is it possible?
    Thanks,
    Alexandre.

  • Change rows property of ADF Table

    I am trying to set the rows property of an af:table object based on the value of a drop down box (af:selectOneChoice)
    http://img.photobucket.com/albums/v294/jammiedodgers/BrianS/Accounts-1.jpg
    I have tried this a number of ways but can't get the table to pick up the change unless I do a browser page refresh. I have the autoSubmit property of the drop down box set to true. It is bound to the rows property of my backing bean (which is also bound to the table rows property)
    af:table var="row"
    value="#{accountBacking.model}"
    rows="#{accountBacking.rows}"
    first="#{accountBacking.first}"
    banding="row"
    styleClass="table.sample"
    binding="#{accountBacking.table}"
    >
    <f:facet name="actions">
    <af:selectOneChoice id="rowChoice"
    label="Rows Per Page: "
    autoSubmit="true"
    value="#{accountBacking.rows}"
    valueChangeListener="#{accountBacking.rowChange}">
    <f:selectItem itemLabel="5" itemValue="5"/>
    <f:selectItem itemLabel="10" itemValue="10"/>
    <f:selectItem itemLabel="20" itemValue="20"/>
    <f:selectItem itemLabel="50" itemValue="50"/>
    </af:selectOneChoice>
    </f:facet
    Here is the code from by backing bean. (accountBacking)
    package com.stlouiscity.budget.jsf.beans;
    import com.stlouiscity.budget.database.beans.AccountBean;
    import com.stlouiscity.budget.database.dao.AccountDAO;
    import com.stlouiscity.budget.database.dao.DAOFactory;
    import com.stlouiscity.budget.jsf.delegates.AccountService;
    import java.util.List;
    import javax.faces.application.Application;
    import javax.faces.application.ViewHandler;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import oracle.adf.view.faces.context.AdfFacesContext;
    import oracle.adf.view.faces.model.SortableModel;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.event.ReturnEvent;
    public class AccountBacking implements java.io.Serializable{
    private AccountService acctService;
    private AccountBean account;
    private CoreTable table;
    private SortableModel model;
    private Integer first;
    private Integer rows;
    /** Creates a new instance of AccountBacking */
    public AccountBacking() { 
    acctService = new AccountService();
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    setFirst((Integer)afCtx.getProcessScope().get("first"));
    setRows((Integer)afCtx.getProcessScope().get("rows"));
    //afCtx.getProcessScope().clear();
    public CoreTable getTable() {
    return table;
    public void setTable(CoreTable table) {
    this.table = table;
    public SortableModel getModel() {
    if (model == null)
    refreshAction();
    return model;
    public void setModel(SortableModel model) {
    this.model = model;
    public AccountBean getAccount() {
    return this.account;
    public void setAccount(AccountBean account) {
    this.account = account;
    public void setRowData() {
    try {
    this.account = (AccountBean) this.table.getRowData();
    } catch (NullPointerException npe) {
    this.account = new AccountBean();
    public String editAccountAction() {
    setRowData();
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    if (getAccount() == null) {
    setAccount(new AccountBean());
    afCtx.getProcessScope().put("account",getAccount());
    afCtx.getProcessScope().put("first",this.table.getFirst());
    afCtx.getProcessScope().put("rows",this.table.getRows());
    return "EditAccount";
    public String deleteAccount() {
    setRowData();
    acctService.deleteAccount(this.getAccount());
    refreshAction();
    return null;
    public String refreshAction() {
    List list = acctService.getAccounts();
    ListDataModel listModel = new ListDataModel(list);
    model = new SortableModel(listModel);
    table.setValue(getModel());
    table.setRows(getRows());
    table.setFirst(getFirst());
    return null;
    public void rowChange(ValueChangeEvent event) {
    refreshAction();
    public Integer getFirst() {
    return first;
    public void setFirst(Integer first) {
    if (first != null) {
    this.first = first;
    } else {
    this.first = 0;
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    afCtx.getProcessScope().put("first",this.first);
    public Integer getRows() {
    return rows;
    public void setRows(Integer rows) {
    if (rows != null) {
    this.rows = rows;
    } else {
    this.rows = 10;
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    afCtx.getProcessScope().put("rows",this.rows);
    I am attempting to pass the rows and first property of the table into the process scope and then look them back up during the constructor. The backing bean is request scoped. I do no want to use a session scoped bean because I don't want to have to deal with thread safety.

    One thing...I use a technique mentioned in other threads to refresh the page that changes the view root to the page it is currently at. I call this after I return from a dialog: page to enact any change that the dialog page did that the current page should see. One problem here: the af:table does not seem to refresh (sometimes?), even when I put this partial target assignment in the return action listener of the button that enacted the dialog:...but I found a solution! In the life cycle I look for that view root to come up, tap into the backing bean of the current page to get the table UIComponent, and do this partial target assignment. Here is the lifecycle prepareModel code...
    String lCurrentView = fctx.getViewRoot().getViewId();
    if (PartialPageUtils.isPartialRequest(fctx)) {
    // Create an elsif for each form which has a popup you want to refresh from.
    if (lCurrentView.equals("/WPForm.jspx")) {
    CoreTable AccessoriesTable = (CoreTable)EL.get("#{WPForm.accessoriesTable}");
    AdfFacesContext.getCurrentInstance().addPartialTarget(AccessoriesTable);
    AdfFacesContext.getCurrentInstance().partialUpdateNotify(AccessoriesTable);
    super.prepareModel(ctx);
    Note: EL is a helper class that Steve M. (I think) wrote, which gets and sets ValueBindings. A similar functionality can be found in his ADFUtils and JSFUtils classes in the SRDemo app for ADFBC, downloadable from TechNet.oracle.com ...or the JDev help menu updates section.

  • Is it possible to programaticaly change active row in ADF table?

    JDev 11.
    I have a table which is filled with data programaticaly.
    When I add new row, it appears in table and I want to make this row active automatically, so last insert row should become active.
    Is it possible?

    Hi Julian, thanks for your response, but your example is different from my case
    My source:
    public String SaveCompany() {
    // get company details from input fields
    GetCompanyDetails();
    // save changes to DB
    SaveCompanyToDB(com);
    //refresh company list
    AdfFacesContext.getCurrentInstance().addPartialTarget(table);
    return null;
    I'am adding new entry into DB and I want to populate table after that action, and automatically select that new row (new row should become lighted).
    I have found that there is a atribute First(), I have tried to use it, but it didnt help.
    So question is, does ADF table have atribute to define active table row from code?

Maybe you are looking for

  • How to hide content in design view within Dreamweaver?

    How can I hide content in design view within Dreamweaver? I have a tabbed content menu that uses some javascript. Everything looks great in Live view, but when I go to design view, all the content goes way beyond the div. How can I make it to where I

  • Building and Deploying Within a Directory with oc4j 10.1.3

    hi, I just want to move our application from 10.1.2.0.2 to 10.1.3 in our development environment. I want to deploy our application within a directory, but this does not work anymore! I couldn't get information about this in the documentations. When I

  • WPA2-PSK

    Greetings - I currently have a Cisco AIR-AP1231G-A-K9 that is running IOS version 12.3(8)JEA1. I am trying to setup WPA2 "Personal" (WPA2-PSK) with a client running Windows XP SP2. The WLAN Nic is a Cisco a/b/g PCMCIA, driver version 2.5.0.22. I have

  • Best practices for logging results from Looped steps

    Hi all I would like to start a discussion  to document best practices for logging results (to reports and databases) from Looped Steps  As an application example - let's say you are developing a test for one of NI's analog input or output cards and n

  • X58M wont Boot past ram check? System shuts down by itself

    computer parts X58M, i7 920, ocz elitextream1000, 6GB kingston ddr3 2000 Black slots, PNY 210 (temp) Just put this system together off frys specials and some parts I had laying around, but the unit wont post Video card has been moved from one pci slo