Datagrid row selection Z-index & itemRenderer background

Hi, I have datagrid with custom item renderers (HBox). Now if
I change the Hbox bacground color and move the mouse above some row
in datagrid, actually focused row visualization (azure row) is
UNDER the itemrenderer background color so I can't see which row is
actually focused with the mouse. I would like to have this row
selection above the item renderer.
Thanks for help.

Solved. Done through overriding an updateDisplayList function
in the custom itemRenderer class.

Similar Messages

  • Disable DataGrid row selection for a column?

    Hi,
    I have a DataGrid with a CheckBox in one column. When the CheckBox itself is clicked, or any point in the CheckBox column
    is clicked, I *don't* want the grid row selected. IOW, row selection should be disabled for the column. How to get this behavior?
    Thanks, Garry

    Hi All,
    I do have almost similar requirement where I have image overlay-ed on row, on whose click a context menu should appear but row should not get selected.
    Row selection should happen if user clicks elsewhere on that row (apart from overlayed image).
    I tried below lines in MouseClick event listeners.
    event.stopImmediatePropagation();
      event.stopPropagation();
    Above lines stopped itemClick event but didnt prevent the row selection.
    Regards,
    Pavan

  • Row Selection problem in custom cell renderer

    Hi,
    I have created a custom cell renderer to set color in my table based on some value and the screen also shows colors when i set this cell renderer.
    But, I am not able to see the row selection ie. with blue background when I select any row in the table is nor appearing. Can you tell me how to solve this problem.
    Regards,
    R.Vishnu Varadhan.

    Check out this [url http://forum.java.sun.com/thread.jsp?forum=57&thread=507001]thread for a similiar example.

  • WorkOrderList TileView Row & Selected Row Background Color Change

    Hi,
         can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
    but these applied style on Rows & Selected Rows are not working in Agentry client.
    if any other alternate solution exist in Agentry, please guide me.
    i am using following...
      sap mobile platform-2.3.3
    Thanks & Regard
    Manish Kumar
    Tags edited by: Michael Appleby

    Hi Jason
          Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
         Please guide me how to remove white outline and default Blue Selected Background color.
    Thanks & Regard
    Manish Kumar

  • How to capture indexes of multiple rows selected in Advance list

    Hi,
    - I have a prefilled advance list with multiselection enabled.
    - There is a button, associated with an action,which is bind to a eventHandler,that event Handler has script operation which conains the ruby scrpt code.
    - Now when i select multiple rows of that advance list and click on the action,I want to capture the indexes of all the selected rows.
    I tried using following ruby code:
    lead=$data.datalist.LeadSelectedIndex
    But it returns index of only first row selected out of various rows selected.
    So please anyone help me on that.
    Regards ,
    Saurabh Sharma.

    In FP2.6 there is no chance from SDK to have a mass enabled Action and bind to a mulli selection list as a BO Action in the UI Designer, as multiplicity will always be single and only lead selection would be selected.
    this feature comes only in FP3.0.
    So i am not sure what excatly Saurabh wants to do : maybe do some calculations based on multi seletions then i would do the following as also what Christian mentioned
    multiSelect =  ($data.DataList.GetSelectedRowsCount() > 1);
    NoOfRowsSelected = $data.DataList.GetSelectedRowsCount();
    SummationField = 0;
    if ( multiSelect )
       LeadSelection = $data.DataList.LeadSelectedIndex;
       RequiredDataField = $data.DataList.Get(LeadSelection).AnydataField;
       for i in 0..(NoOfRowsSelected - 1)
         currentRow = LeadSelection + i;
          RequiredDataField = $data.DataList.Get(currentRow).AnydataField;
    // imagine this is just add values of the RequiredDataField
         SummationField = SummationField +   RequiredDataField
       end
    end
    So i have not tried this directly - but i hope i make the idea clear.
    Regards,
    Nitesh Pai

  • How to make datagrid rows cannot be selected

    Example :datagrid has 10 rows,
    I want that some rows can not be selected,for example, rows 1-5 can not be selected , and rows 6-10 can be selected .
    Tks for advance.

    Hi askmewhat,
    Please find below the link for Disable List Collection by Alex Harui:
    http://blogs.adobe.com/aharui/2007/06/disabling_list_selection.html
    Hope this will give you an idea to ristrict datagrig rows selection.
    Thanks and Regards
    Pooja Kuber | [email protected] | www.infocepts.com

  • Row selection event in xslt

    Hi,
    I have an XSLT table and I want to read the selected table row number  in java script function.
    Simply the row selection event on xslt table and also please provide how to give the unique id to the xslt table.
    Please guide me in this.
    Regards,
    Bikshu
    Edited by: rajkumar12345 on Feb 19, 2012 10:05 AM

    Hi Bikshu,
    The content generated by xslt is plain html. So to make it interactive - you need to use javascript method. Javascipt method called on Click of the cell can give the row selection look and fell by changing the background color. To give the unique id for each element - you have to write xslt accordingly. You can generate the ID in this way - Column name+ Row index.
    Thanks,
    Soumen

  • Programmactic Access DataGrid Rows and Columns

    Hello,
    I am new to ActionScript. Can you tell me how can I access
    the rows and columns of a data grid?
    What I want to do is that when the application load, I will
    populate the datagrid with the Xml returned from the webservice.
    After that, webservice will be called periodically (using timer)
    and the information in the datagrid needs to be updated. The cells
    which are updated need to be highlighted.
    The datagrid actually contains the stock market data (symbol
    name and its other attributes). So once the datagrid has been
    populated on application creation, it contains all the symbols in
    the market. After that, only attributes of the symbols will change,
    like price, volume etc. What I want is that once the datagrid is
    populated, i can access the row by using the value of symbol code
    and then update the appropriate columns of that symbol. (Xml from
    next time will contain only symbols whose values change from last
    time).
    Below is the code that I have written so far.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="OnAppCreationComplete()" width="100%"
    height="100%">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    private var count:uint = 0;
    private var messageFramXmlList:XMLList;
    private var marketSnapshotTimer:Timer = new Timer(1000);
    private function OnAppCreationComplete() : void
    this.ajaxServiceInvokerProxy.addEventListener(ResultEvent.RESULT,
    this.OnWebServiceResultArrived);
    this.ajaxServiceInvokerProxy.InvokeService.send();
    this.marketSnapshotTimer.addEventListener(TimerEvent.TIMER,
    this.OnSnapshotTimerTick);
    this.marketSnapshotTimer.start();
    private function
    OnWebServiceResultArrived(event:ResultEvent) : void
    var marketSnapshotXml:XML = new XML(event.result);
    this.messageFramXmlList =
    marketSnapshotXml.child("MarketSnapshot").child("MessageFrameList")[0].child("MessageFram e");
    this.dgTopPosts.dataProvider = this.messageFramXmlList;
    this.btnCounter.label = this.count.toString();
    private function OnSnapshotTimerTick(event:TimerEvent) :
    void
    this.count++;
    this.ajaxServiceInvokerProxy.InvokeService.send();
    ]]>
    </mx:Script>
    <mx:WebService id="ajaxServiceInvokerProxy"
    wsdl="
    http://jehanzeb/ajaxserviceinvoker/ajaxserviceinvoker.asmx?wsdl"
    useProxy="false">
    <mx:operation name="InvokeService">
    <mx:request>
    <serviceWithComonentName>DetailedSnapshotComponent.MarketSnapshot@TADAWUL</serviceWithCom onentName>
    <parametersXml><![CDATA[ <Parameters/>
    ]]></parametersXml>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Panel x="10" y="10" width="100%" height="100%"
    layout="absolute" title="Market View">
    <mx:RichTextEditor id="txtMarketViewResult" x="10" y="10"
    width="612" height="194" />
    <mx:DataGrid x="10" y="223" id="dgTopPosts" width="100%"
    height="303">
    <mx:columns>
    <mx:DataGridColumn headerText="Symbol Code"
    dataField="SymbolID" />
    <mx:DataGridColumn headerText="Last Time"
    dataField="LastTime" />
    <mx:DataGridColumn headerText="Net Change"
    dataField="NetChange" width="75"
    />
    <mx:DataGridColumn headerText="Percent Change"
    dataField="PercentChange" width="75" />
    <mx:DataGridColumn headerText="Previous Closed"
    dataField="PreviousClosed" width="75"/>
    <mx:DataGridColumn headerText="Close" dataField="Close"
    width="75"/>
    <mx:DataGridColumn headerText="Direction"
    dataField="Direction" width="75"/>
    <mx:DataGridColumn headerText="BidPrice"
    dataField="BidPrice" width="75"/>
    <mx:DataGridColumn headerText="AskPrice"
    dataField="AskPrice" width="75"/>
    <mx:DataGridColumn headerText="BidVolume"
    dataField="BidVolume" width="75"/>
    <mx:DataGridColumn headerText="AskVolume"
    dataField="AskVolume" width="75"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:LinkButton id="btnCounter" x="10" y="528" width="306"
    textAlign="left" label="" />
    </mx:Panel>
    </mx:Application>

    To achieve what you want, I would have two functions:
    * One populates the DataGrid for the first time, i.e. the
    inital load
    * The other does the 'update' on each interval, since there's
    logic required
    To update the DataGrid with only the rows that have changed,
    you're going to have to compare
    the incoming XML to the existing XML in the dataProvider of
    the DataGrid, then selectively update the dataProvider.
    You can use the
    getItemAt() and
    setItemAt() methods of the data provider to check each row
    against the incoming data. So, some example code:
    // This is the function which handles the result of your
    'updated data only' webservice
    private function handleUpdateInvoke (event:ResultEvent) :
    void {
    var incoming:XML = new XML(event.result);
    var someList:XMLList = incoming.somePattern;
    // For each data provider item, check the key and if it
    matches
    // one of the incoming keys, update it at that index
    var numRows = this.dgTopPosts.dataProvider.length;
    var existingDataRow:*
    for (var i:Number = 0; i < numRows; i++) {
    existingDataRow = this.dgTopPosts.dataProvider.getItemAt(i);
    for each (var newDataRow:* in someList) {
    if (existingDataRow.SymbolID == newDataRow.SymbolID) {
    this.dgTopPosts.dataProvider.setItemAt(newDataRow, i);
    }

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • When clicking on datagrid row it throws me exception - WPF C#

    Whenever I try to double click my datagrid row to edit it, I throws me a few exceptions which doesn't say anything to me. Hovever if
    I set the whole datagrid to IsReadOnly to true, I want have the problem, but I need the second and third columns editable.
    XAML
    <DataGrid x:Name="clientList" HorizontalAlignment="Left" Height="225" Margin="11,126,0,0" VerticalAlignment="Top" Width="349" IsSynchronizedWithCurrentItem="False" AutoGenerateColumns="False" HorizontalGridLinesBrush="#FFB9B9B9" VerticalGridLinesBrush="#FF8B8B8B" GridLinesVisibility="Horizontal" CellStyle="{StaticResource Body_Content_DataGrid_Centering}">
    <DataGrid.Resources>
    <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" StartPoint="0,0" EndPoint="0,1" >
    <GradientStop Color="#66240000" Offset="0"/>
    <GradientStop Color="#CC240000" Offset="0.65"/>
    </LinearGradientBrush>
    </DataGrid.Resources>
    <DataGrid.Columns>
    <DataGridTextColumn Width="30" Header="Id" IsReadOnly="True" Binding="{Binding Id}"/>
    <DataGridTextColumn Width="100" Header="Company" IsReadOnly="False" Binding="{Binding Company}"/>
    <DataGridTextColumn Width="130" Header="Name, Surname" IsReadOnly="False" Binding="{Binding Name}"/>
    <DataGridTemplateColumn Header="Actions" CellTemplate="{StaticResource myTemplate}"/>
    </DataGrid.Columns>
    </DataGrid>
    C#
    clientList.Items.Add(new DataClients { Id = 1, Company = "My Company", Name = "Jane Roe"});
    Exceptions
    Exception:Thrown: "'EditItem' is not allowed for this view."(System.InvalidOperationException)
    Exception:Thrown: "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0." (System.FormatException)

    You need to set the ItemsSource property of the clientList DataGrid to a collection of DataClients objects that supports editing. HashSet<DataClients> does not for example but List<DataClients> and ObservableCollection<DataClients> does.
    You could call the ToList() method on the collection that you set as the ItemsSource for the DataGrid to convert it to a List<DataClients>:
    clientList.ItemsSource = yourCollection.ToList();
    The "The string was not recognized as a valid DateTime" error message should be pretty self-explanatory. You are trying to convert a string which doesn't contain a valid date or time value to a DateTime value somewhere, perhaps in the 'myTemplate'.
    There is nothing in the DataClients class that you have posted that will cause this exception to be thrown so it is impossible for anyone to tell.
    But please only ask one question per thread and then start a new thread if you have a new question.
    Please also remember to mark helpful posts as answer to close your threads.

  • How to avoid table refresh on row selection

    Hi,
    I have a table where the row selection happens on selecting the check box in the first column of the row. The check box is bound to the transient Boolean attribute of my VO to support this functionality which is missing in new version of ADF. The selection is working fine, however I am facing the issue with table refresh. Everytime I click checkbox to select or unselect a row my whole table is getting refreshed which is very unusual for user point of view. This is my code for the checkbox column:
    <af:column sortProperty="isSelected" sortable="true"
    headerText="#{bindings.pricingObjects.hints.isSelected.label}"
    id="c4"
    inlineStyle='#{(row.isSelected)?"background-color: #E7E7E7":""};'>
    <af:selectBooleanCheckbox value="#{row.bindings.isSelected.inputValue}"
    required="#{bindings.pricingObjects.hints.isSelected.mandatory}"
    shortDesc="#{bindings.pricingObjects.hints.isSelected.tooltip}"
    id="it4" simple="true"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.isSelected.validator}"/>
    </af:selectBooleanCheckbox>
    I have to keep autoSubmit="true" on selectBooleanCheckbox because the table has to change color of the row everytime the checkbox is selected or deselected. Also, there are multiple commandToolbarButton such as "Delete" which needs to be enabled/disabled depending on the row selection.
    Is there anyway, I can achieve this behaviour with minimal refresh of table?

    Hi Marge,
    Yes I do have Add and Delete toolbar button in the panelCollection and also set partialTrigger="tableId" on them. I need this partialTriggers because Delete button should enable/disable depending on number of rows added in the table. However, I tried removing them but it did not work for me, table is still refreshing. BUT this solution does work in combination of other solution i.e. removing ChangeEventPolicy="ppr" on the iterator. I need ppr because I have a form which is bound to the same iterator and should change on table selection. The design is like this,
    - Read-only Table on top
    - Editable Form below
    - Select the row in table and edit the fields in the form
    If I remove ppr then my form is not updating with the row selection.
    Regards,
    Afroz

  • JDev 11g-Multiple Row Selection Table-Ctrl+A error

    Hello All,
    Jdeveloper : Studio Edition Version 11.1.1.2.0, Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
    ADF Business Components : 11.1.1.55.36
    Java(TM) Platform : 1.6.0_11
    Oracle IDE: 11.1.1.2.36.55.36
    SOA Composite Editor: 11.1.1.2.0.12.16
    Versioning Support: 11.1.1.2.36.55.36
    I am trying to remove the selected rows from the table with RowSelection property set to Multiple. I am able to select the rows using by holding key board Ctrl key and click on the rows. The following code in backing bean successfully deletes the rows selected using this step.
    public void removeGeoSpecs(ActionEvent actionEvent)
    RowKeySet rowKeySet = getGmemTbl().getSelectedRowKeys();
    CollectionModel collectionModel =
    (CollectionModel) getGmemTbl().getValue();
    for (Object facesTreeRowKey: rowKeySet)
    collectionModel.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding) collectionModel.getRowData();
    rowData.getRow().remove();
    But when i select all the rows in the table using Ctrl+A, all the rows got selected. I hit the Remove button, then after deleting the first row, getting the following error.
    javax.servlet.ServletException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
    Caused by: java.lang.IllegalStateException: ADFv: Could not find row: USA 548 with key: oracle.jbo.Key[] inside parent: GeoSpecTVOIterator with key: null.
    Here USA 548 is my first row's data. Please let me know if you want complete error stack.
    During design time, While drag and drop the table i have not selected Row Selection check box as it sets property for single row selection. Table is inside the <af:panelCollection> . Here is the table source.
    <af:table value="#{bindings.GeoSpecTVO.collectionModel}" var="row"
    rows="#{bindings.GeoSpecTVO.rangeSize}"
    emptyText="#{bindings.GeoSpecTVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.GeoSpecTVO.rangeSize}"
    rowBandingInterval="0" id="GmemTbl"
    partialTriggers=":::AddRowsBtn :::AddRangeBtn ::RemoveBtn :::SaveBtn"
    rowSelection="multiple"
    binding="#{backingBeanScope.GeoGrpSpecBean.gmemTbl}">
    Here GeoSpecTVO is a transient view object which is not having query and not attached with EO.
    I tried to fix this issue by myself and also searched for similar issues in the FORUM and google. But no luck... I very much appreciate all your inputs/pointers. Kindly let me know if you need additional information.
    Thanks
    Annadurai.

    Hi Annadurai
    I tried the same work around but still i am facing the issue, could you please help me.
    public void deleteRec(ActionEvent actionEvent) {
    // Add event code here...
    RowKeySet rowKeySet = (RowKeySet)this.embossTB.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.embossTB.getValue();
    Row specRow = null;
    ArrayList rowList = new ArrayList();
    int listLength = 0;
    ArrayList<Number> printReqLST=new ArrayList<Number>();
    ViewObject vo1=null;
    boolean flag=false;
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    specRow = rowData.getRow();
    rowList.add(specRow);
    listLength++;
    for (int index = 0; index < listLength; index++){
    specRow = (Row)rowList.get(index);
    Number printReqID = (Number)specRow.getAttribute("PrintRequestId");
    String PrintState = specRow.getAttribute("PrintState").toString();
    if (PrintState.equalsIgnoreCase("PRINTED")) {
    System.out.println("cann't delete");
    FacesContext fctx = FacesContext.getCurrentInstance();
    FacesMessage message =
    new FacesMessage("Cann't Delete the selected row:" + printReqID);
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    fctx.addMessage(null, message);
    } else {
    System.out.println("delete");
    flag=true;
    specRow.remove();
    if(flag){
    System.out.println("before commit");
    commitRows();
    }

  • Multiple row selection & Send Email Code ? Need littel Help

    Dear All,
    I managed to insert a code which will enable me to select multiple rows (Artikel from the great Yann Duran),
    i also have a code which enables me to send a mail for each selected row (only one row).
    But now since I was able to select more rows, I need to to customize my "Send mail" code to send mail to all selected rows. I guess I will need a loop here but I am not sure.
    My code for multiy row selection :
    private const string _CONTROL = "vw_CustLedgerEntry" // This is my Data Grid;
    private DataGrid _ItemsList = null;
    private int _SelectedRowsCount = 0;
    partial void Part_2_CustomerItemDetail_InitializeDataWorkspace(List<IDataService> saveChangesTo)
    // Write your code here.
    this.FindControl(_CONTROL).ControlAvailable += Orders_ControlAvailable;
    private void Orders_ControlAvailable(object sender, ControlAvailableEventArgs e)
    _ItemsList = e.Control as DataGrid;
    //if the cast failed, just leave, there's nothing more we can do here
    if (_ItemsList == null)
    return;
    //set the property on the grid that allows multiple selection
    _ItemsList.SelectionMode = DataGridSelectionMode.Extended;
    _ItemsList.SelectionChanged += new SelectionChangedEventHandler(_ItemsList_SelectionChanged);
    private void _ItemsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
    switch (_ItemsList == null)
    case true:
    _SelectedRowsCount = 0;
    break;
    case false:
    _SelectedRowsCount = _ItemsList.SelectedItems.Count;
    break;
    This is my code for sending a mail for one selected row:
    partial void EMail_Execute() // EMAIL BUTTON FOR OPEN ENTRIES
    if (vw_CustLedgerEntry.SelectedItem.Report_Type == null)
    // throw new ArgumentNullException();
    this.ShowMessageBox("EMail Can't be sent,PDF generation is not possible for this Entry");
    this.Application.ShowPart_2_CustomerItemDetail(this.vw_CustomerItem.Costomer_No_, this.vw_CustomerItem.Company);
    else// if (vw_CustLedgerEntry.SelectedItem.Send_Mail== true)
    //do
    vw_CustLedgerEntryItem1 entryItem = this.vw_CustLedgerEntry.SelectedItem;
    InvSendbyMailRequestBody reqBody = new InvSendbyMailRequestBody(
    entryItem.Document_No_
    , entryItem.Report_Type
    , "DynNavHRS"
    , this.Application.User.Name.Replace(@"HRS\", "") + "@hrs.com" // HRS001
    , "Document"
    , false
    , false
    , this.vw_CustomerItem.ISO_Code // Change 7.8.2014 Bug in Email body text sprache
    , this.vw_CustomerItem.Salesperson_E_mail // Change 7.8.2014 Bug in Send E-mail
    , entryItem.Customer_No_.ToString()
    , false
    , "XYZ"
    , false);
    InvSendbyMailRequest req = new InvSendbyMailRequest(reqBody);
    HRSReportServiceSoapClient wsHRS = new HRSReportServiceSoapClient();
    // wsHRS.InvSendbyMailCompleted += new EventHandler<InvSendbyMailCompletedEventArgs>(wsHRS_InvGetPDFCompleted);
    wsHRS.InvSendbyMailAsync(req);
    this.ShowMessageBox("Your email was successfully sent");
    // while (vw_CustLedgerEntry.SelectedItem.Send_Mail == true);
    Thaks a lot for your help.
    Zayed

    I tried the following but I donot know if its correct and Iam facing a problem with the "Foreach" function.
    private const string _CONTROL = "vw_CustLedgerEntry" // This is my Data Grid;
    private DataGrid _ItemsList = null;
    private int _SelectedRowsCount = 0;
    partial void Part_2_CustomerItemDetail_InitializeDataWorkspace(List<IDataService> saveChangesTo)
    // Write your code here.
    this.FindControl(_CONTROL).ControlAvailable += Orders_ControlAvailable;
    private void Orders_ControlAvailable(object sender, ControlAvailableEventArgs e)
    _ItemsList = e.Control as DataGrid;
    //if the cast failed, just leave, there's nothing more we can do here
    if (_ItemsList == null)
    return;
    //set the property on the grid that allows multiple selection
    _ItemsList.SelectionMode = DataGridSelectionMode.Extended;
    _ItemsList.SelectionChanged += new SelectionChangedEventHandler(_ItemsList_SelectionChanged);
    private void _ItemsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
    switch (_ItemsList == null)
    case true:
    _SelectedRowsCount = 0;
    break;
    case false:
    _SelectedRowsCount = _ItemsList.SelectedItems.Count;
    break;
    partial void Send_Multiple_Mail_CanExecute(ref bool result)
    //only enable rows have actually been selected
    result = (_SelectedRowsCount > 0);
    partial void Send_Multiple_Mail_Execute()
    if (_ItemsList == null) { return; }
    //StringBuilder names = new StringBuilder();
    //loop through the selected rows
    //we're casting each selected row as a DemoItem
    //so we get access to all the properties of the entity that the row represents
    foreach (_ItemsList.SelectedItems)
    vw_CustLedgerEntryItem1 entryItem = this.vw_CustLedgerEntry.SelectedItem;
    InvSendbyMailRequestBody reqBody = new InvSendbyMailRequestBody(
    entryItem.Document_No_
    , entryItem.Report_Type
    , "DynNavXYZ"
    , this.Application.User.Name.Replace(@"HRS\", "") + "@hrs.com" // HRS001
    , "Document"
    , false
    , false
    , this.vw_CustomerItem.ISO_Code // Change 7.8.2014 Bug in Email body text sprache
    , this.vw_CustomerItem.Salesperson_E_mail // Change 7.8.2014 Bug in Send E-mail
    , entryItem.Customer_No_.ToString()
    , false
    , "XYZ"
    , false);
    InvSendbyMailRequest req = new InvSendbyMailRequest(reqBody);
    XYZReportServiceSoapClient wsHRS = new HRSReportServiceSoapClient();
    // wsHRS.InvSendbyMailCompleted += new EventHandler<InvSendbyMailCompletedEventArgs>(wsHRS_InvGetPDFCompleted);
    wsHRS.InvSendbyMailAsync(req);
    this.ShowMessageBox("Your email was successfully sent");

  • HOW to emphasize the row selected in a different colour

    Hi all,
    there is any way to set the selected row in a table in a different background-colour?
    i want to emphasize the row selected by user, i try this:
    <af:column headerText="#{res['abogados.nombre']}"
    sortProperty="Nombre" sortable="true"
    binding="#{backing_app_Abogados.column14}"
    id="column14">
    <af:outputText value="#{row.Nombre}"
    binding="#{backing_app_Abogados.outputText14}"
    id="outputText14"
    inlineStyle="background-color:#{bindings.AbogadosView1.currentRow.codigo == row.Codigo ? 'red' : 'transparent'};"/>
    </af:column>
    but this sets the outputText's background to red, i want to set in red all the row..
    any idea?

    Does Rado's following blog entry help: http://adf-rk.blogspot.com/2007/01/adf-oracle-form-like-overflow-in-adf.html

  • Report Script - How to get the total on the any number of rows selected

    Hi,<BR>I am using Essase and report script for the reporting purpose. In this i would like to know how to get the sum of all the rows selected. I know we can use the calculate row, but it has to be done with print row to display the newly created row. But i am using alphablox where this print row is not working. Is there any other alternative is there to get the sum of any number of rows, and displaying them??<BR>Please help me.<BR><BR>Regards<BR>R.Prasanna

    Pls check the structure and index.
    EMP_ID NUMBER(9) NOT NULL,
    EMP_CD           NUMBER(3),
    EMP_NO VARCHAR2(250 BYTE) NOT NULL,
    FROM_EFF_DT DATE NOT NULL,
    TO_EFF_DT DATE,
    CREATE INDEX IDX_EMP_NO ON EMP
    (EMP_NO)
    NOLOGGING
    TABLESPACE INDEXES
    PCTFREE 20
    INITRANS 10
    MAXTRANS 255
    STORAGE (
    INITIAL 56K
    NEXT 1784K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    FREELISTS 4
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    NOPARALLEL;

Maybe you are looking for