Set icon_name for push_button in Block - current row

Hi all,
i've got a little problem:
I builded an Block. The Block contains 10 rows with data-columns and a push_button (the push_button is part of the block so there are 10 buttons - each for one row).
Now i want to change the icon of the push_button for the current row within an pre-record-trigger:
if (:blockname.status ='off') then
set_item_property ('PUSH_BUTTON',ICON_NAME,'system_off');
elsif (:blockname.status ='on') then
set_item_property ('PUSH_BUTTON',ICON_NAME,'system_on');
end if;
But the icons are changed for all 10 rows (=for all buttons) and not for the button of the CURRENT row.
Anyone's got an idea about changing the icon_name of the current push_button ... ?

Albert,
I have tested for you the rollover PJC and it works fine.
Just put this code in a When-New-Record-Instance block trigger (must put the same code in a post-query trigger)
Declare
     LN$Rec Pls_Integer := Get_Block_Property( 'DEPT', CURRENT_RECORD ) ;
Begin     
If :DEPT.DEPTNO = 10 Then
     SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_ON','/forms90/icons/add_on.gif');
     SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_OFF','/forms90/icons/add_off.gif');
Elsif :DEPT.DEPTNO = 20 Then
SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_ON','/forms90/icons/delete_on.gif');
SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_OFF','/forms90/icons/delete_off.gif');           
Else
SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_ON','/forms90/icons/query_on.gif');           
SET_CUSTOM_PROPERTY('DEPT.BT',LN$Rec,'IMAGE_NAME_OFF','/forms90/icons/query_off.gif');
End if;
End ;
Francois

Similar Messages

  • How to set text and background color of current row in a adf table?

    Hi,
    In jdev 11.1.2.3,
    How to set text fond and background color of current row in a adf table?
    I tried to set Background color in table property, but that is not what i want.
    Thanks.

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • How to set current row in table after use tab key on inputText

    Hello all,
    My first post .., I'm newbie in ADF and I will try to explain my problem.
    For the moment we use ADF 11g (11.1.1.4), in a jsff page I have a table with an inputText column.
    On the valueChangeListener of the inputText, I invoke a method in a viewScope bean which call an EJB method, make some services in the EJB on the line modified. After that I refresh the VO and the table (because others values on the line have been modified) and reset the focus on the same inputText modified by the user with javaScript because focus was lost after refresh.
    So far, everything works fine.
    When I use the arrow keys to change the selected row in the table, it's work fine (focus is still in the next or previous inputText), but if user try to use tab key to change the current line, the inputText on the next line have the focus but the current row of the table is not changed (I think it's normal).
    My question : how can I change the current row after tab key pressed in this case ?
    I don't know if it's really clear, not easy to explain, don't hesitate to ask more details.
    Thanks in advance.

    Frank Nimphius wrote:
    Hi,
    My question : how can I change the current row after tab key pressed in this case ?
    Use a client event to listen for the keyboard entry and intercept the tab. The use af:serverListener to call the server to set the rowKey on the table and issue a PPR for the table to re-paint
    See sample 11 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    to learn about how to use the client listener and server listener
    FrankHi,
    Thanks a lot for your advices, I used the client and server listener
    I used this code on the method call in order to change the selection after key tab pressed, I don't know if it can be easier, but it works.
              if (LOGGER.isDebugEnabled()) {
              LOGGER.debug("START changeSelectedRow");
              RowKeySet oldRowKeySet = myTable.getSelectedRowKeys(); // get oldRowKeySet
              if (oldRowKeySet == null) {
                   if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug("oldRowKeySet is null");
                   return;
              RowKeySetImpl newRowKeySet = new RowKeySetImpl(); // The new RowKeySet use to change the selectedRow
              DCIteratorBinding bindingIterator = ADFUtils.findIterator(MY_ITERATOR);
              bindingIterator.setRangeSize(-1);
              // set the new index of the current row.
              int index = bindingIterator.getCurrentRowIndexInRange();
              if (index < bindingIterator.getAllRowsInRange().length - 1) {
                   index++;
              bindingIterator.setCurrentRowIndexInRange(index);
              // get the current row after changed the index
              Row currentRow = bindingIterator.getCurrentRow();
              if (currentRow != null) {
                   ArrayList nextLst = new ArrayList(1);
                   nextLst.add(currentRow.getKey());
                   newRowKeySet.add(nextLst);
                   // set the new selectedRow
                   myTable.setSelectedRowKeys(newRowKeySet);
                   SelectionEvent selectionEvent = new SelectionEvent(oldRowKeySet, newRowKeySet, myTable);
                   selectionEvent.queue();
                   AdfFacesContext.getCurrentInstance().addPartialTarget(myTable);
              if (LOGGER.isDebugEnabled()) {
                   LOGGER.debug("END changeSelectedRow");
    Best Regards
    Benjamin

  • JDBC Active Connection count issue- Current row null issue

    In our weblogic conse 10.3.5, the max connection capacity is set to 25, however when we start using the application , over a small period of time the current active connection count increases more than 25 like 30,55, 85 etc .. How is this possible? . Once the number of active connection count goes above the max connection capacity, our application behaves weirdly, some time for some users the current row return null and as a result we get Null pointer exception. we are using Jdev 11.1.2.1 and the application was migrated from 10g. The AM configuration is the default one as specified in most docs or when we create a new application module. Could you guys help us out.

    How many concurrent users do you have? Are you opening database connections manually in the application code? If so, are you closing these connections when done?

  • How do I set an Apex mulri-row reports form value for the specifc current row using Javascript?

    I have a multi-row region based on a table in which I have two particular columns of interest.  The first has an LOV defined for which I have set up a pick-list of codes associated with the item's status as "OK" or having some problem, for which there are a small number of set codes associated.  Most rows will be OK, but when there is a problem, the pick-list will be used.
    When that pick list has been used, there is an optional "comments" column that can be filled in.  I want my screen to dynamically enable/disable a pushbutton that links to the comment based on the code.  This being row-based, the push-button needs enabling or disabling by row, not as a whole "conditional column".  That bit is ok, I think, but I don't know and can't find the syntax for how within the javascript onchange function I set the current row value for a different column to the one that triggered it.
    My header function (that doesn't work) is going to be something like this (where the status column LOV having a value = 6 means "OK").  Note I'm using alert for a debug mechamism.  The $s line is my failed attempt to set he column value, here with a hard-coded string "Changed COMMENTS":
    <script type="text/javascript">
    function doActivateButton(object)
      if(parseInt(object.value)!='6')
        alert('It is not 6!');
        $s('#COMMENTS','Changed COMMENTS','Changed COMMENTS',TRUE);
      else
        alert('It is 6, you know!');
    </script>
    Ideally, I want any existing comments blanked if the user picks "OK" (6) as the new status, whereas for debug above I'm setting the hardcoded debug string.  You will probably also note I realise I haven't properly understood the purpose of the third parameter in the $s API.
    (This is a reports region, by the way.  A detail block, in forms-speak, with a header block above it.)
    Thanks for any assistance.
    Mark

    Sorry, versions are: Apex 4.1 on Oracle RDBMS 11.2.

  • Need to Set Current Row when Using Built-in Data Control Delete Operation?

    I have an af:table bound to a ViewObject (VO) collection (no Entity Object) - within each row, I include a column that contains a 'Remove' command button so the user can remove the row. I add the command button by dragging/dropping the built-in delete operation from the VO on the Data Control Palette. When I use this as is (no changes), the Remove button always deletes the first row in the collection, not the selected row. Do I need to add code to set the current row, and if so can someone please provide an example and specify where I need to add? thanks.
    ------ .jspx af:table with command button to remove each row ------
    <af:table value="#{bindings.ListView1.collectionModel}" var="row"
    rows="#{bindings.ListView1.rangeSize}"
    first="#{bindings.ListView1.rangeStart}"
    // note: I don't have any code added for selectedRow or makeCurrent - assuming this is built-in?
    selectionState="#{bindings.ListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ListView1.collectionModel.makeCurrent}">
    <af:column>
    <af:commandButton actionListener="#{bindings.Delete.execute}"
    text="Remove"
    disabled="#{!bindings.Delete.enabled}"/>
    </af:column>
    ---------- corresponding pagedef file ------------
    <bindings>.....
    <action id="Delete" IterBinding="ListView1Iterator"
    InstanceName="SrchDataControl.ListView1"
    DataControl="SrchDataControl" RequiresUpdateModel="false"
    Action="30"/>
    </bindings>
    Note: I also tried solution posted on following thread, but again, only first row is deleted, not the selected row?: Delete and Commit
    Message was edited by:
    javaX

    I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
    The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
    selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

  • How to set current row in calendar

    Hi All,
    I am implementing ADF calendar using ADF faces. When i click on any activity the current row selected is not being displayed. Instead it always points to the last row of the VO.
    How to i explicitly set the current row to the selected row.(this can be declaratively achieved in tables selectedRow property)
    Thanks
    Sandeep.G

    Use the following code to default the calender date to today's.
      public void initializeSearchFormData()
        String methodName = "initializeSearchFormData()";
        _logger.entering(CLAZZ_NAME, methodName);
        MapDataSearchFormVOImpl searchDataVO = getMapDataSearchForm();
        // only create if we don't have any rows yet
        if (searchDataVO.getEstimatedRowCount() == 0)
          _logger.logp(Level.FINEST, CLAZZ_NAME, methodName,
                       "Creating new row for MapDataSearchFormVOImpl.");
          MapDataSearchFormVORowImpl newRow =
            (MapDataSearchFormVORowImpl) searchDataVO.createRow();
          newRow.setSELECT_DATE(DateTimeUtil.singleton().getCurrentJboDate());
          searchDataVO.clearCache();
          searchDataVO.insertRow(newRow);
          searchDataVO.setCurrentRow(newRow);
       * Container's getter for MapDataSearchForm.
       * @return MapDataSearchForm
      public MapDataSearchFormVOImpl getMapDataSearchForm()
        return (MapDataSearchFormVOImpl) findViewObject("YOUR VO NAME");
        _logger.exiting(CLAZZ_NAME, methodName);
      }Regards,
    Kiran Konjeti

  • Update Failed for Sum of previous row and current row

    Hi i need to update the column length of the previous row and current row so i followed this method but i'm unable to update what is problem in my syntax
    SQL> begin
    2 DECLARE Total number = 0;
    3 UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    4 end;
    5 /
    DECLARE Total number = 0;
    ERROR at line 2:
    ORA-06550: line 2, column 22:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    := . ( @ % ; not null range default character
    if i update without the variable total then my command is succeeded
    UPDATE StringOutput set SumOfLength = ColLength;
    but i need the previous row+current row count in SumOfLength
    Thanks!

    Getting this error now
    SQL> begin
    2 DECLARE Total number := 0;
    3 UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    4 end;
    5 /
    UPDATE StringOutput set Total = SumOfLength = Total + ColLength;
    ERROR at line 3:
    ORA-06550: line 3, column 1:
    PLS-00103: Encountered the symbol "UPDATE" when expecting one of the following:
    begin function pragma procedure subtype type <an identifier>
    <a double-quoted delimited-identifier> current cursor delete
    exists prior
    The symbol "begin" was substituted for "UPDATE" to continue.
    ORA-06550: line 3, column 46:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    . ( , * @ % & - + ; / at mod remainder rem return returning
    <an exponent (**)> where || multiset
    The symbol ". was inserted before "=" to continue.
    ORA-06550: line 4, column 4:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
    following:
    ( begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted

  • LOV switcher and set current Row

    Hi
    I have a LOV switcher attached to one of the columns in the view object.
    It works fine while switching the LOV's in mostly all conditions.
    But its failing for one case.
    We are using checkboxex to select a row , and do a operation in the row.
    To do this, the button on which the operation is performed ...
    1)we have checked which row has the transient value of check box as checked
    2) Set the current row of the iterator to the row that comes from the selected check box index..
    3) Called the operation.
    But as the code go to step two and the current row is set to the required row, all the LOV 's in all the rows start showing the Default LOV which is selected in the LOV switcher, if i do a f5 fr the page, the original values are restored.
    Also if the VO fecth size is 25 , it gives wrong value for 25 rows, if i scroll through the table again it automatically shows the correct value.
    This has been taking a lot of out time to debug the issue.
    I guess its somethng to do with LOV switcher , set current row and the table getting refreshed incorrectly on set current row

    Hi Timo ,
    Thanks fr the reply..
    Jdev 11.1.1.4
    Code for checkbox selection
    DCBindingContainer dcbindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator =
    dcbindings.findIteratorBinding(iteratorName);
    Row[] rowSet = iterator.getAllRowsInRange();
    Integer selectCount = 0;
    for (Row row : rowSet) {
    Object selAtt = row.getAttribute(selectAttribName);
    if (selAtt != null && (Boolean)selAtt == true) {
    System.out.println("Row selected");
    selectCount++;
    if (selectCount > 1) {
    System.out.println("More than one row selected!");
    throw new ValidationException("More than one row selected");
    else{
    iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    } else {System.out.println("Row not selected");}
    I actually sorted the issue out
    had to write
    iterator.refresh(Row.REFRESH_CONTAINEES); after iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    But not sure if thts correct ...

  • Get the icon for the current row selected

    Hi !!
    I am using jdeveloper 11.1.1.5
    I had dragged and dropped my ApplBusFunVO as a af:tree
    My Output will look like this
    Supplier Balance
    Supplier Document Details
    Purchase order
    Purchase ReceiptsMy af:tree doesnt contains the Parent
    My Scenario:
    When my user clicks the current node of the tree!! an icon should appear before the current node is selected
    For Eg: If my user clicks the Purchase Order then my output should like this
    Supplier Balance
    Supplier Document Details
    ==>Purchase order
    Purchase ReceiptsThe Symbol ==> Represent the icon! that appears before the purchase order!!

    Hi
    <af:tree value="#{bindings.SalesPeople.treeModel}" var="node"
              selectionListener="#{bindings.SalesPeople.treeModel.makeCurrent}"
              rowSelection="single" id="t4" fetchSize="35">
              <f:facet name="nodeStamp">
                 <af:group>
                      <af:image id="cl3" source="#{reference_to_image_url}"
                      rendered="#{check_if_current_row}"/>
                      <af:outputText id="ot2" value="#{node}"/>
                 </af:group>
       </f:facet>http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_image.html
    As mentioned in a previous answer to this very same question, the tree is a stamped component which means that you need to partially refresh the tree component to show the icon. You can us the selectionListener (override the current setting to use a managed bean setting the current row - calling the same EL) to determine the new selected row key and then use the rendered option to determine (using a managed bean reference) if the current rendered node (#{node} is accessible from a managed bean at render time) is the selected node.
    The side effect is that upon tree node selection the tree will "flicker"
    Frank

  • Refresh only current row after commit, when ChangeEventPolicy set to none

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    I'm editing a table with a popup, I set the ChangeEventPolicy to none because it made some problems.
    Now I would like to know, when i'm closing the popup and doing commit,
    how could I refresh only the current row, and not whole the table?
    I would like it to work as with ChangeEventPolicy set to ppr.
    Thanks!

    could you please explain a little bit more?
    When I used the ChangeEventPolicy with ppr it looks like only the selected row was changed after commit.
    but with PartialTrigger i see that it's refreshing all the table.
    are you sure they are working the same?
    what about row.refresh(..), is it only used for rollback?

  • Highligh current row not working for classic report in 4.1

    Hello experts,
    One of our customers is migrating applications from APEX 3.0 to 4.1.
    All their applications use classic reports because interactive reports didn't exist in 3.0.
    The end users of the applications like the row color changing when they hover there mouse over the rows (highlight current row) and they insist on keeping this "functionality" in the applications.
    For some reason, this "functionality" doesn't work anymore after the migration to APEX 4.1.
    I thought it was something theme related so I created a new application with a classic report, tried some APEX built-in themes, and with none of them, I manage to get the highlight current row working.
    For interactive reports it is not an issue.
    Is this an undocumented no-longer-available feature of APEX 4.x or has there changed something which caused this functionality to stop working??
    Regards,
    Bart

    Hi,
    I created a service request for this issue, and the support analyst that helped me confirmed that this is a bug:
    "I have created the bug :
    Bug 13584762 - ROW HIGHLIGHTING NO MORE WORKS IN CLASSIC REPORT IN APEX 4.1
    While working on the problem , I have found the following solution in order to make the Row HighLightng work in APEX 4.1
    In the apex_4_1.min.js (file located in images\javascript ) , Search for :
    function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("hover",function(b)
    and replace "hover" by "mouseover mouseout" :
    After the modification :
    function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("mouseover mouseout",function(b)
    A refresh in the browser may be necessary in order to "reload" the file apex_4_1.min.js"
    I implemented the suggested workaround and this solved the problem!
    HTH,
    Matthias Hoys

  • How to set the current row in table automatically when tabout from one row to next row

    Hi
    I'm using jdev 11.1.2.0.0
    How can we set the  row(in which row focus is)  as current row in the table?
    If we create a table with single row selection, then whichever row we select, that row becomes current row because of the selection listener(#{bindings.xxvo.collectionModel.makeCurrent}).
    Then if we do tabout from one component to another component in table and moved to next row, then the focus would be on another row .
    when focus is shifted from one row to another row, then how can we make the focused row as current row or selected row.
    Any suggestion would we appreciated
    Thanks.

    Add clientListener inside table component and set client listener type to dblClick with method as a JavaScript method name.
    <af:clientListener method="dblclk" type="dblClick"/>

  • I want to set-up a network with our current two laptops for a family of 4 w/unique 4 profiles. I'd like everyone to be agnostic about which computer to log into and use but still have private docs and apps (i.e.mail/facebook). How best can I do this?

    I want to set-up a network with our current two laptops for a family of 4 with unique 4 profiles.  I'd like everyone to be agnostic about which computer to log into and use but still have private docs and apps (i.e. mail/facebook).  How best can I do this?

    iCloud Photo Sharing FAQ - Apple Support
    http://www.fatcatsoftware.com/iplm/Help/accessing%20an%20iphoto%20library%20on%2 0another%20mac.html

  • Is there a way to allow setting of "Due Date for All Tasks" to current date in OOB Workflow

    Is there a way to allow setting of "Due Date for All Tasks" to current date in OOB Workflow
    I need to set it today because there are tasks that is needed to be completed on the same day.
    Is there a way without modifying the page/form. like a configuration or something?
    ----------------------- Sharepoint Newbie

    Hi ,
    As Ajeet said,  for implement your requirement, you can change the data validation on the Due data field.
    You can do as the following :
    Open the site with SharePoint Designer 2010
    Click on Workflows on the left launch, then find ‘Approval-SharePoint 2010’, click on it
    On the Forms section, click ‘ReviewApproval_***.xsn’
    Then you can find Due Data for All Tasks, and change the validation
    In addition, if you create an approval workflow with SharePoint Designer, you can use a specific date, it contains hour and minute.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • Lightroom CC issues with multiple export at the same time

    Back before Lightroom updated to the CC version, I was able to use export presets to send 4 different versions of the photos I'm working on at the same time (A Full Size for client at certain size, full size for myself, web-sized with watermark and a

  • Java.lang.NullPointerException at org.apache.struts.taglib.tiles.InsertTag

    I am using tiles with JSF. my starting page is template.jsp which is like this.. <f:view> <f:subview id="header"> <tiles:insert attribute="header" flush="false"/> </f:subview> <f:subview id="menu"> <tiles:insert attribute="menu" flush="false"/> </f:s

  • HOW TO GET ITUNES BACK TO NORMAL AFTER FORMATTING PC.....XP PRO

    ok so i have a fresh computer, i just finished installing itunes 8.0 im pretty sure i backed up all my itunes info and folders properly to my external HD i just plugged in my iphone to the fresh PC and it didn't transfer all my info from phone to PC.

  • Poor Video Streaming.  Any tips?

    Hello everyone, My MacBook Pro really dosn't like treaming video.  Regardless if it's live feeds such as ESPN3 or preset videos from Yahoo/CSPAN etc.  Straeming HD content from sites such as HBO doesn't work too well either.  The only one that works

  • Combining result of three queries to form a single table

    Hi .. I have three select queries. Each of them returns a single column. I want the result of these queries into a single table.. I tried this way.. select * from (first select),(second select),(third select); this gives duplicate rows... Any held wo