How to give a checkbox the value "row number" (like [row selector])

I like to define a checkbox with htmldb_item.checkbox and give the checkbox the value 'row number'.
It has to be the row number as displayed. Therefore I cannot use rownum or row_number() because the htmldb sorting functionality change the sequence after the row numbers are given.
How can I give the checkbox this value, or as alternative how can I get the current row (checkbox element) in javascript from the checkbox onclick event.

Vikas,
Thanks a lot.
This works.
I use this number also to construct javascript and I walk in problems which are also solved now.
therefore for anyone else who also want to use '#ROWNUM#'. keep in mind that for the sql #ROWNUM# is just a string and should be treated as a string therefore use quotes around it. The #ROWNUM# string is translated after executing the query, when the page is constructed from the result of the query.
Fred.

Similar Messages

  • How to give colors to the top-of-page in ALV Grid

    How to give colors to the top-of-page in ALV Grid
    in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row)
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'ENJOYSAP_LOGO'
    IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    please help mee

    HI Kranthi,
    Check out teh foll. link,
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Hope this helps.

  • How to remove hash in the value of the field fetched from application serve

    Hi,
       I am populating values of the file which is in the application server to the internal table. But for the last field hash is also populating from the file along with the value.
    Please suggest me how to remove hash in the value of the last field.
    Thanks,
    Neelima.

    Hi Vinay,
    Please check the program. I have used the replace statement but it is not working.
    IF NOT v_sap_bom_rec IS INITIAL.
    Spliting the records at '~' delimiter
        SPLIT v_sap_bom_rec AT c_del INTO  wa_bom_file-model_name
                                           wa_bom_file-product_code
                                           wa_bom_file-description
                                           wa_bom_file-product_type
                                           wa_bom_file-mfg_part_num
                                           wa_bom_file-mfg_part_desc.
        REPLACE cl_abap_char_utilities=>horizontal_tab IN wa_bom_file-mfg_part_desc WITH space .
        wa_bom_file-status = c_status.
        APPEND wa_bom_file  TO i_bom_file.
    But it is not working.
    Please help me..
    Thanks
    Neelima

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • How do I print out the value returned by a method in main??

    I'm a total newbie at java, I want to know how I can print out the value returned by this function in the "Main" part of my class:
    public int getTotalPrice(int price)
    int totalprice=price+(price*0.08);
    return totalprice;
    I just want to know how to print out the value for total price under "public static void main(String[] args)". thanks in advance,
    Brad

    Few ways you could do it, one way would be to create an instance of the class and call the method:
    public class Test
        public double getTotalPrice(int price)
            double totalprice = price + (price * 0.08);
            return totalprice;
        public static void main(String[] args)
            Test t = new Test();
            System.out.println(t.getTotalPrice(52));
    }Or another would be to make getTotalPrice() static and you could call it directly from main.

  • How to show $ sign alongwith the value in message styled text field.

    Hi,
    How to show $ sign alongwith the value in message styled text field.
    The value is coming from the table column in VO.
    I am working on OAF R12.

    Hi,
    Resolved.
    I used the below code in CO for the solution.
    Formatter currencyFormatter = new OADecimalValidater("$#,##0.00;($#,##0.00)",
    "$#,##0.00;($#,##0.00)");
    OAMessageStyledTextBean msrpField = (OAMessageStyledTextBean)webBean.findChildRecursive("MSRP11");
    msrpField.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, currencyFormatter);

  • How to give colors to the top-of-page in ALV List Display

    how to give colors to the top-of-page in ALV List Display....

    Check this blog.........
    It provides your required output...........
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    See the point 7 for complete code...
    Regards,
    Pavan

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • May i know how to give rewards to the questions?

    hi all gurus,
    actually i  don't know how to give rewards to the questions?
    so, can anybody pls... let me know that...
    thanks
    arun

    Hi Arun,
    You will have Radio buttons left to the answers.
    Plz select one of the radio button among the four radio buttons.
    1) If you felt one of the answer solves your problem, reward them with Solved problem. Close the thread once it is solved/answered.
    2) If you felt one of the answer solves helps you very much, then reward them with Very Helpful answer.
    3) If you felt one of the answer helps to your problem, then reward them with Helpful answer.
    Rewarding points to a contributor gives a token of recongition to him/her and makes them to contribute more on Forums. Even a single word 'Thanks' also makes them comfortable. As many contributors are spending their time apart from their regular activities. So its always a good thing to recognise/appreciate them.
    Thanks,
    Vinay

  • How can give permissions to the users in wiki?

    Hi, in wiki how can give permissions to the users, i need to give one of the users full control for wiki only ( not the server ), so how can make this user wiki admin?.

    No answer!!??
    I Need to put one of staff as Wiki Admin then he can manage it ( Delete, Edit ...etc ), Wiki Creators users can't full admin the Wiki.
    Please help.

  • When the combobox is rendered all the values displayed look like [object Object].

    I wasn't sure where to post this so please forgive me.
    I am trying to populate a combobox with a series of values
    returned from a Coldfusion method that retrives a resault froma
    database. Basically all the data from a table of staff.
    <cffunction name="getUsers" access="remote"
    returntype="array">
    <cfquery name="q" datasource="#datasource#">
    SELECT *
    FROM STAFF_CHARTS_STAFF_TEMP
    </cfquery>
    <cfset aRecordset= querytoarray(q)>
    <cfset flash.result=aRecordset>
    <cfreturn flash.result>
    </cffunction>
    <cffunction name="querytoarray" returntype="array"
    output="No">
    <cfargument name="q" required="Yes" type="query">
    <cfset var aTmp = arraynew(1)>
    <cfif q.recordcount>
    <cfloop query="q">
    <cfset stTmp = structNew()>
    <cfloop list="#lcase(q.columnlist)#" index="col">
    <cfset stTmp[col] = q[col][currentRow]>
    </cfloop>
    <cfset arrayAppend(aTmp,stTmp)>
    </cfloop>
    <cfelse>
    <cfset stTmp = structNew()>
    <cfloop list="#lcase(q.columnlist)#" index="col">
    <cfset stTmp[col] = "">
    </cfloop>
    <cfset arrayAppend(aTmp,stTmp)>
    </cfif>
    <cfreturn aTmp>
    </cffunction>
    The result from a call of CF method getUsers is set as the
    data provider to ComboBox with id = "cb"
    <mx:RemoteObject
    id="myService"
    destination="ColdFusion"
    source="staff_ratings.staff_Ratings-debug.staff"
    showBusyCursor="true">
    <mx:method name="getUsers" result="handleResult(event)"
    fault="Alert.show(event.fault.message)"/>
    </mx:RemoteObject>
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert;
    [Bindable]
    public var sResult:Array;
    public function handleResult(event:ResultEvent):void{
    sResult=event.result as Array;
    cb.dataProvider=sResult;
    ]]>
    </mx:Script>
    However when the combobox is rendered all the values
    displayed look like [object Object].
    I think the problem is that the result is a array of arrays
    so I need to find away to ectract a particular colun of data into
    the combobox
    How do I fix this?

    This is what I did for a single field.
    If you were wanting the to have muliple fields in the
    dropdown, I would concatenate them in the query.
    something like
    select fname + ' ' + lname + ' ' + anotherfield as tech from
    dbo.table
    <cffunction name="getTech" output="no" access="remote"
    returntype="query">
    <cfset var qTech="">
    <cfquery name="qTech" datasource="datasource">
    select tech
    from dbo.table
    group by tech
    order by tech
    </cfquery>
    <cfreturn qTech>
    </cffunction>
    <mx:RemoteObject
    id="dataManager"
    showBusyCursor="true"
    destination="ColdFusion"
    source="cust.components.cfgenerated.Records">
    <mx:method name="getMasterQuery"
    result="getMasterQuery_result(event)" fault="server_fault(event)"
    />
    <mx:method name="deleteItem"
    result="deleteItem_result(event)" fault="server_fault(event)" />
    </mx:RemoteObject>
    <mx:ComboBox id="TECH"
    dataProvider="{dataManager.getTech.lastResult}" labelField="tech"
    />

  • How can can i subtract the value of the column in each row ?

    I want to subtract  the value  of the column in each row if the row is not enough then continue to next row.
    For example 
    ID             QTY
    A               20
    B               40       
    C               60
    I want to update this table by subtract  the value  of the column (QTY) out 70 so the result i want will be 
    ID              QTY
    A                20 - 70 = -50 -->  0 this row will be updated to 0 and 50 will continue to next row   
    B                40 - 50  = -10 -->  0   this row will be updated to 0 and 10 will continue to next row
    C                60 - 10  = 50  -->  Stop loop
    How can i write the sql query for this operation , Thanks

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You have no idea,
    do you? Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. What did you try on your own before posting? I will bet that you did nothing! You expect other people to do your job or homework for you. 
    >> I want to subtract the value of the column in each row if the row is not enough then continue to next row. <<
    This makes no sense. Rows have no ordering; that is a spreadsheet. There is no such thing as a generic “id” in RDBMS. And an identifier is not a sequence which would have an ordering. 
    CREATE TABLE Foobar
    (something_seq INTEGER NOT NULL PRIMARY KEY,
     onhand_qty INTEGER NOT NULL);
    Learn how to use the SUM()OVER() and LAG() aggregate functions, post what you tried for yourself and then we will help you. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to use decode on the value part ?

    i have a query
    select
         col1, col2, col3
    from
         tab1, tab2
    where
         cond1= 'parameter1'     
    I need to modify this query to use a decode function instead of this parameter1.
    something like
    select
         col1, col2, col3
    from
         tab1, tab2
    where
         cond1= decode(parameter1, 'x','val1','val2')
    How can i use such a decode function on the value part ?
    IF i try this, it gives me no data found error....
    The following is also not working..IS there a way to do such cases ?
    select
         col1, col2, col3
    from
         tab1, tab2
    where
         cond1= ( select decode(parameter1, 'x','val1','val2') from dual )

    Of course it works...
    test@ORA10G>
    test@ORA10G> drop table table1;
    Table dropped.
    test@ORA10G> create table table1 (
      2    name        varchar2(50),
      3    condition1  varchar2(2),
      4    condition2  varchar2(10)
      5  );
    Table created.
    test@ORA10G> insert into table1 (name,condition1,condition2)
      2  values ('Hi there!!','xx','VAL1');
    1 row created.
    test@ORA10G> commit;
    Commit complete.
    test@ORA10G>
    test@ORA10G> select * from table1;
    NAME                           CO CONDITION2
    Hi there!!                     xx VAL1
    1 row selected.
    test@ORA10G>
    test@ORA10G> declare
      2    CodeL varchar2(3) := 'AB';
      3    CodeName varchar2(50) := '';
      4  begin
      5    select decode(CodeL,'AB','VAL1', CodeL)
      6    into CodeName
      7    from dual;
      8    dbms_output.put_line('CodeName: '||CodeName);
      9    select Name
    10    into CodeName
    11    from table1
    12    where condition1='xx'
    13    and condition2 in ( select decode(CodeL,'AB','VAL1', CodeL) from dual );
    14    dbms_output.put_line('CodeName: '||CodeName);
    15  end;
    16  /
    CodeName: VAL1
    CodeName: Hi there!!
    PL/SQL procedure successfully completed.
    test@ORA10G>pratz

  • How to hide itemRenderers in the Grouped rows of an AdvancedDataGrid?

    I am using an AdvancedDataGrid and showing a comboBox as the itemRenderer and also the editRenderer. However I am seeing the combobox in the grouped rows also. Below is the code I am using and also attached the screenshot of the app. Please help.
    TestAdvGridGrpRen.mxml
    ===================
    <?xml version="1.0"?>
    <!-- dpcontrols/adg/SummaryGroupADGCustomSummary.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
                import mx.collections.IViewCursor;   
                import mx.collections.SummaryObject;
    [Bindable]
    private var dpFlat:ArrayCollection = new ArrayCollection([
      {Region:"Southwest", Territory:"Arizona",
          Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
      {Region:"Southwest", Territory:"Arizona",
          Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000},
      {Region:"Southwest", Territory:"Central California",
          Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000},
      {Region:"Southwest", Territory:"Nevada",
          Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000},
      {Region:"Southwest", Territory:"Northern California",
          Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},
      {Region:"Southwest", Territory:"Northern California",
          Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000},
      {Region:"Southwest", Territory:"Southern California",
          Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
      {Region:"Southwest", Territory:"Southern California",
          Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}
                // Callback function to create
                // the SummaryObject used to hold the summary data.
                private function summObjFunc():SummaryObject {
                    // Define the object containing the summary data.
                    var obj:SummaryObject = new SummaryObject();
                    // Add a field containing a value for the Territory_Rep column.
                    obj.Territory_Rep = "Alternating Reps";
                    return obj;
                // Callback function to summarizes
                // every other row of the Actual sales revenue for the territory.
                private function summFunc(cursor:IViewCursor, dataField:String,
                    operation:String):Number {
                    var oddCount:Number = 0;
                    var count:int = 1;
                    while (!cursor.afterLast)
                        if (count % 2 != 0)
                            oddCount += cursor.current["Actual"];
                        cursor.moveNext();
                        count++;
                    return oddCount;
          ]]>
        </mx:Script>
        <mx:AdvancedDataGrid id="myADG"
            width="100%" height="100%"
            initialize="gc.refresh();">      
            <mx:dataProvider>
                <mx:GroupingCollection id="gc" source="{dpFlat}">
                    <mx:Grouping>
                       <mx:GroupingField name="Region"/>
                       <mx:GroupingField name="Territory">
                          <mx:summaries>
                             <mx:SummaryRow summaryObjectFunction="summObjFunc"
                                summaryPlacement="first">
                                <mx:fields>
                                   <mx:SummaryField dataField="Actual" summaryFunction="summFunc"/>
                                </mx:fields>
                             </mx:SummaryRow>
                          </mx:summaries>
                       </mx:GroupingField>
                    </mx:Grouping>
                </mx:GroupingCollection>
            </mx:dataProvider>      
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Region"/>
                <mx:AdvancedDataGridColumn dataField="Territory_Rep"
                    headerText="Territory Rep"/>
                <mx:AdvancedDataGridColumn headerText="Actual" dataField="Actual"
                rendererIsEditor="true"
                itemRenderer="TestStatusTypeEditor"
                editorDataField="type"/>
                <mx:AdvancedDataGridColumn dataField="Estimate"/>
            </mx:columns>
       </mx:AdvancedDataGrid>
    </mx:Application>
    TestStatusTypeEditor.mxml
    ====================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="OnInit()" >
    <!-- This is the content of the ComboBox.
    <mx:dataProvider>
    <mx:Object label="Cog" />
    <mx:Object label="Sproket" />
    </mx:dataProvider>
    -->
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
            [Bindable]
            public var cards:ArrayCollection = new ArrayCollection(
                [ {label:"38865", data:1},
                  {label:"29885", data:2},
                  {label:"29134", data:3},
                  {label:"52888", data:4},
                  {label:"38805", data:5},
                  {label:"55498", data:6},
                  {label:"44985", data:7},
                  {label:"44913", data:8}]);
    private function OnInit():void
    dataProvider = cards;
    * This override of set data compares the data.label against the label property
    * of each item in the dataProvider (above). This code is written a bit more
    * generically than necessary, but it would allow you to have a long list
    * in the dataProvider and not have to change this code.
    override public function set data(value:Object):void
    super.data = value;
    var list:ArrayCollection = dataProvider as ArrayCollection;
    for(var i:int=0; i < list.length; i++)
    if( String(value.statusName) == list[i].label ) {
    selectedIndex = i;
    * This getter is the one identified as the editorDataField in the list for
    * the itemEditor.
    public function get type() : String
    if( selectedItem ) {
    return selectedItem.label;
    else {
    return null;
    ]]>
    </mx:Script>
    </mx:ComboBox>

    Solved this issue by using mx:rendererProviders element for my AdvancedGrid. Using the depth parameter gives me the ability to hide the itemRenderer for the Grouped rows.
        <mx:AdvancedDataGrid id="myADG"
            width="100%" height="100%"
            initialize="gc.refresh();">       
            <mx:dataProvider>
                <mx:GroupingCollection id="gc" source="{dpFlat}">
                    <mx:Grouping>
                       <mx:GroupingField name="Region"/>
                       <mx:GroupingField name="Territory">
                          <mx:summaries>
                             <mx:SummaryRow summaryObjectFunction="summObjFunc"
                                summaryPlacement="first">
                                <mx:fields>
                                   <mx:SummaryField dataField="Actual" summaryFunction="summFunc"/>
                                </mx:fields>
                             </mx:SummaryRow>
                          </mx:summaries>
                       </mx:GroupingField>
                    </mx:Grouping>
                </mx:GroupingCollection>
            </mx:dataProvider>       
            <mx:columns>
                <mx:AdvancedDataGridColumn dataField="Region"/>
                <mx:AdvancedDataGridColumn dataField="Territory_Rep"
                    headerText="Territory Rep"/>
                <mx:AdvancedDataGridColumn headerText="Actual" dataField="Actual"
                rendererIsEditor="true"
                editorDataField="type"/>
                <mx:AdvancedDataGridColumn dataField="Estimate"/>
            </mx:columns>
    <mx:rendererProviders>
        <mx:AdvancedDataGridRendererProvider
            columnIndex="2"
            columnSpan="1"
            depth="3"
            renderer="TestStatusTypeEditor"/>
    </mx:rendererProviders>
       </mx:AdvancedDataGrid>

  • How Can I get all the values of a DBMS package?

    Hi all
    I'm using this "dbms_output.put_line(DBMS_DB_VERSION.VERSION || '.' ||DBMS_DB_VERSION.RELEASE);" to show the version. But how Can I get the all the values from DBMS_DB_VERSION ? Is there a common way ?
    Thanks .
    Best
    Laurence

    Hi,
    Don't think that's possible. Even if it were, you wouldn't be able to use/display BOOLEAN type in SQL.
    If you just aim to see what they are, you could do something like this
    select text
      from all_source
    where owner = 'SYS'
       and name = 'DBMS_DB_VERSION'
       and type = 'PACKAGE';Or even
    select dbms_metadata.get_ddl('PACKAGE', 'DBMS_DB_VERSION', 'SYS') from dual;My version is:
    SQL> select * from v$version where rownum = 1;
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    1 row selectedIn 11g you also have [PL/SCOPE|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_plscope.htm#ADFNS02203] which might help you even more.
    Regards
    Peter

Maybe you are looking for