How to get the text of Checkbox ?

Hi All,
This is my JSP code for Checkbox.
<hbj:checkboxGroup  id="CBGroupSAPServer"  columnCount="3">
  <hbj:checkbox id="Check1" text="SAP R/3" disabled="false"/>
  <hbj:checkbox id="Check2" text="SAP IDES" disabled="false"/>
  <hbj:checkbox id="Check3" text="SAP BW" disabled="false"/>
  <hbj:checkbox id="Check4" text="SAP EP" disabled="false"/>
  <hbj:checkbox id="Check5" text="SAP XI" disabled="false"/>
  <hbj:checkbox id="Check6" text="SAP CRM" disabled="false"/>
</hbj:checkboxGroup>
I want to get the text of the selected checkbox(in the doProcessAfterInput()).
For eg: if the first box is checked then i shud get "SAP R/3"
Assiste me please.
Regards,
Joshua Kiran

Hi Kiran,
I tried the method, Checkbox.getText(), but it doesn't return anything. But, i got to see that, the method, Checkbox.getId() works fine.
So, i will suggest you to create the Check box with the same text and id and retrieve the text with Checkbox.getId() method. Nothing goes wrong with this.
But, this fails if you need two or more checkboxes with the same texts.
Checkbox cb = (Checkbox)this.getComponentByName("SAPR/3 ");
           String text=cb.getId();
In JSP,
you could have as
<hbj:checkbox id="SAPR/3" text="SAPR/3" disabled="false"/>
Regards,
Ganesh

Similar Messages

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • How to get the text present in JTextArea

    i am writing application for some system to be computerised and i am not getting how to get the text present in text area and set it into database...can anybody suggest me solution??

    You must have named the TextArea like
    JTextArea textArea;so, use the getText() method like
    String strTextAreaContents = textArea.getText();You can then use JDBC to connect to the database that you want and save your contents that is now in strTextAreaContents.
    -- Srikanth

  • How to get the 'text' property value of a button in coding?

    Hi Experts,
    I'm using 10 buttons all are having common action('click'). when i click a button the 'text' value of the button should pass to a function.So the action is same but the passed value will be the 'text' value of the corresponding button.  I don't know how to get the 'text' property of a button in coding. Kindly help me to solve this problem.
    Thanks and Regards
    Basheer

    Hi,
    My event is like this.
    public void onActionclick(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         String s =  ?  ; // should get the 'text' property of clicked button
         fillInput(s);     // function to be called
    The called function is,
    public void fillInput( java.lang.String id )
        String str=wdContext.currentContextElement().getNum();
        str = str + id;
        wdContext.currentContextElement().setNum(str);
    How can i get the 'text' property value of the corresponding button. Click action should be common to all buttons.
    Thanks and Regards,
    Basheer

  • How to get the text in a label which is imbeded in a JTextPane

    I have created a JTextPane that has 5 JLabels inserted in the text. I have attempted to get the text with the following code snippet.
    Component[] lbl = new Componennt[DisplayLetterPane.getComponentCount()];
    //         JTextPane DisplayLetterPane; is defined previously
             lbl = DisplayLetterPane.getComponents();
             int componentIndex = 0;
             String lblText = new String(((JLabel)lbl[componentIndex]).getText());I have run a dump of the sytledDocument of the JTextPane and I see the JLabel listed as a component.
    When this snippet is executed I get the following:
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.text.ComponentView$Invalidator
    When I check the character where the component for the JLabel is located in the styled document it does not find an instanceof JLabel.
    How can I get the text from the labels.
    Thank you in advance!

    JTextPane jtp = new JTextPane();
              for (int i = 0; i <5; i++) {
                   jtp.add(new JLabel("labelText"+i));
              Component[] lbl = new Component[jtp.getComponentCount()];
    //      JTextPane DisplayLetterPane; is defined previously
          lbl = jtp.getComponents();
          int componentIndex = 0;
          for (int i = 0; i < lbl.length; i++) {
               System.out.println(((JLabel)lbl).getText());
    When I do like the above, it just works fine. Can u share a little bit more of your code?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get the text which was clicked in  a A href tag.

    I am displaying the names from database in a page as hyperlink. When this hyperlink is clicked I want to display the corresponding address from DB. What the problem is when the link is clicked how to get the name which is clicked. I know only to link to a page using href. Now I want the text which has been clicked. Pls help.

    Sorry to interrupt here!
    For the code you suggested:
    David,
    if the target path is "http://localhost/testing.jsp", then
    the code would become:
    David.
    So what would the difference between the code shown above and this code:
    David
    What is the function for these two symbols: "<<" and ">>"?

  • How to get the text in module pool program after f4 help

    Hi to all experts,
    My required is to get the text of a field when the user clicks on the f4 help text should be populated automatically beside the field
    how to do it

    >
    > the screen name is defined as t528t-plstx and while passing im using the same name in the POV module after what could be the reason;
    Hi in the POV module, first read the dynpro filed for which a text has to be displayed  (using FM- DYNP_VALUES_READ)and then update your Text Description field uing  the FM -'DYNP_VALUES_UPDATE
        dynpfields-fieldname  = 'FNAME'.                  "FNAME is the field for which POV is called
        append dynpfields.
        repid = sy-repid.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynpfields
           exceptions
                others.
       read table dynpfields index 1.
       fname = dynpfields-fieldvalue.
    *Fetxh the Text field into a local varaible.
        l_plstx = XXXXXXX. 
        dynpfields-fieldname    = 'T528T-PLSTX'.
        dynpfields-fieldvalue   =  l_plstx.
        APPEND dynpfields .
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = sy-repid
            dynumb               = sy-dynnr
          TABLES
            dynpfields           =  dynpfields.
    This will update your text field dynamically.
    Regards,
    Rajesh

  • How to get the text of the textArea ?

    Hi, expert
    i have created a new component com1,
    then i created a table view name 'result'.
    then i add a textarea by modifying the result.htm
    textArea id     = "TAMSG"
                     text   = "test......"
    then i add a button in the result.htm
    the method of the button is  'EH_ONSENDMSG'
    then i input some text into the textArea on the page.
    now, how can i get the text of the textArea in the method 'EH_ONSENDMSG' ?
    thanks.
    oliver.

    Hi,
    problem was solved.
    i put the text into a value node.
    <thtmlb:textArea id     = "TAMSG"
                     text   = "//TEXT/TEXT2"
                     encode = "TRUE"
                     width  = "100%" />
    method EH_ONSENDMSG.
      DATA lr_col_wrap      TYPE REF TO   cl_bsp_wd_collection_wrapper.
      DATA lr_query_values  TYPE REF TO   if_bol_bo_property_access.
      DATA lv_str_msg TYPE string.
      lr_col_wrap = me->typed_context->text->get_collection_wrapper( ).
      lr_query_values ?= lr_col_wrap->get_current( ).
      lv_str_msg = lr_query_values->get_property_as_string( iv_attr_name = 'TEXT2' ).
    endmethod.
    regards.
    oliver.

  • How to get the text from me52n/me52?

    I used rp-read-infotype in getting the text in HR. Please guide me how to get it in ME52. Thanks!

    HI
    GOOD
    CAN YOU GIVE SOME MORE BRIEF ABOUT YOUR REQUIREMENT.ANYWAY YOU CAN GO THROUGH THIS REPORT HOPE CAN HELP YOU SOMETHING
    REPORT Z_LEAVES_AND_COMMENTS  line-size 255 line-count 65 no
    standard page heading .
    =====================================================
    DATA DECLARATIONS
    =====================================================
    infotypes : 0002 ,
                2001 .
    TABLES : t554t .
    DATA : BEGIN OF ITAB_LEAVES OCCURS 100 ,
           PERNR LIKE P2001-PERNR ,
           NACHN LIKE P0002-NACHN ,
           VORNA LIKE P0002-VORNA ,
           SUBTY LIKE P2001-SUBTY ,
           ATEXT LIKE T554T-ATEXT ,
           YEAR(4) TYPE C ,
           SEQNR LIKE P2001-SEQNR ,
           BEGDA LIKE P2001-BEGDA ,
           ENDDA LIKE P2001-ENDDA ,
           KALTG LIKE P2001-KALTG .
    DATA : END OF ITAB_LEAVES .
    DATA : S_DATE_LOW LIKE SY-DATUM .
    =====================================================
    SELECTION SCREEN - DEFAULT
    =====================================================
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .
    parameters : P_PERNR LIKE Pa0002-PERNR 
                 MATCHCODE OBJECT PREM  OBLIGATORY.
    PARAMETERS : S_DATE LIKE SY-DATUM DEFAULT SY-DATUM .
    SELECTION-SCREEN END OF BLOCK B1 .
    =====================================================
    TOP-OF-PAGE
    =====================================================
    TOP-OF-PAGE .
      WRITE : 'Report of Leaves - Infotype 2001'  COLOR COL_HEADING .
      ULINE .
      WRITE : /
         'CODE' COLOR COL_HEADING ,
         'DESCRIPTION OF LEAVE     '  COLOR COL_HEADING ,
         'YEAR'  COLOR COL_HEADING ,
         'STARTING  '  COLOR COL_HEADING ,
         'ENDING    '  COLOR COL_HEADING  ,
         'DURATION '  COLOR COL_HEADING .
      ULINE .
    ======================================================
    START OF SELECTION
    ======================================================
    START-OF-SELECTION .
      S_DATE_LOW = S_DATE - 365 .
      CLEAR : P2001 , P2001[] .
      RP-READ-INFOTYPE P_PERNR 2001 P2001 S_DATE_LOW S_DATE .
      IF SY-SUBRC = 0 .
        LOOP AT P2001 .
          CLEAR : ITAB_LEAVES .
          ITAB_LEAVES-PERNR = P2001-PERNR .
          ITAB_LEAVES-SUBTY = P2001-SUBTY .
          ITAB_LEAVES-SEQNR = P2001-SEQNR .
          clear t554t .
          select single * from t554t
          where MOABW = '99'
          and   awart = P2001-SUBTY
          and   sprsl = SY-LANGU .
          if sy-subrc eq 0 .
            ITAB_LEAVES-ATEXT = T554T-ATEXT .
          endif .
          ITAB_LEAVES-BEGDA = P2001-BEGDA .
          ITAB_LEAVES-ENDDA = P2001-ENDDA .
          ITAB_LEAVES-YEAR = P2001-BEGDA(4) .
          ITAB_LEAVES-KALTG = P2001-KALTG .
          CLEAR P0002 .
          REFRESH P0002 .
          RP-READ-INFOTYPE P_PERNR 0002
          P0002 '18000101' '99991231'.
          IF SY-SUBRC = 0 .
            ITAB_LEAVES-NACHN  = P0002-NACHN .
            ITAB_LEAVES-VORNA  = P0002-VORNA .
          ENDIF .
          APPEND  ITAB_LEAVES .
        ENDLOOP .
      ENDIF .
    ======================================================
    END OF SELECTION
    ======================================================
    END-OF-SELECTION .
      LOOP AT ITAB_LEAVES .
        WRITE : /
             ITAB_LEAVES-SUBTY ,
             ITAB_LEAVES-ATEXT ,
             ITAB_LEAVES-YEAR  ,
             ITAB_LEAVES-BEGDA ,
             ITAB_LEAVES-ENDDA ,
             ITAB_LEAVES-KALTG .
        PERFORM GET_NOTES_OF_AN_INFOTYPE
        USING '2001'
               ITAB_LEAVES-SUBTY
               ITAB_LEAVES-PERNR
               ITAB_LEAVES-BEGDA
               ITAB_LEAVES-ENDDA
               ITAB_LEAVES-SEQNR .
      ENDLOOP .
      uline .
      write : ' *** End of Report *** '  COLOR COL_HEADING .
      uline .
    *======================================================
    =========> FORM GET_NOTES_OF_AN_INFOTYPE <===========
    *======================================================
    FORM GET_NOTES_OF_AN_INFOTYPE
    USING MINFTY MSUBTY MPERNR MBEGDA MENDDA MSEQNR .
      DATA: TX-KEY LIKE PSKEY.
      DATA: BEGIN OF TEXT-VERSION,
             NUMMER TYPE X VALUE '02',
            END OF TEXT-VERSION.
      DATA: BEGIN OF PTEXT OCCURS 200.
      DATA:  LINE(78).
      DATA: END OF PTEXT.
      data : is_first type i .
      DATA : LINES_OF_NOTES TYPE I .
    Preparing Key for Reading Texts of
    Infotype
      CLEAR TX-KEY .
      CLEAR:   PTEXT             .
      REFRESH: PTEXT             .
      TX-KEY-PERNR = MPERNR .
      TX-KEY-INFTY = MINFTY .
      TX-KEY-SUBTY = Msubty .
      TX-KEY-ENDDA = MENDDA .
      TX-KEY-BEGDA = MBEGDA .
      TX-KEY-SEQNR = MSEQNR .
    READING CLUSTER TX - (Texts)
      IMPORT TEXT-VERSION
             PTEXT
      FROM DATABASE PCL1(TX)
      ID TX-KEY
      USING PCL1_EXP_IMP(SAPFP50P)  .
      IF SY-SUBRC NE 0        .
        CLEAR:   TEXT-VERSION      .
        CLEAR:   PTEXT             .
        REFRESH: PTEXT             .
        SY-SUBRC = 4               .
      ENDIF          .
    Writing texts retrieved
      DESCRIBE TABLE PTEXT LINES LINES_OF_NOTES .
      IF  LINES_OF_NOTES GT 0 .
        is_first = 1 .
        LOOP AT PTEXT .
          if is_first = 1 .
            WRITE : /  'Comments' , ptext-line  .
            is_first = 0 .
          else .
            WRITE : /  '        ' , ptext-line  .
          endif .
        ENDLOOP .
      ENDIF .
    ENDFORM.
    THANKS
    MRUTYUN

  • How to get the text content of an XMLElement

    Hi,
    Here is a XML sample:
    <toto attrib1="titi">tata</toto>
    We want to get the text content "tata".
    Using an XMLElement (from the class "oracle.xml.parser.v2.XMLElement) to manipulate the element "toto", when we use the getNodeValue method, we always retrieve "null".
    So, what is wrong in our procedure and how to resolve this problem?
    Thanks in advance for your help
    Bye

    You need to get the child nodes of the Element and iterate until you find a node of type Node.TEXT_NODE.
    Elements don't have text content, they instead contain text node children.
    Just remember, too, that they can also contain comments, processing instructions, etc., in addition to the text you are looking for:
    <toto><!-- a comment --><?pi?>Tata</toto>

  • How to get the text of a message class

    Hi,
    I have a message class and added few message(with attributes) to that class.
    Now i want to read the text of the message based on the attributes and
    the message no.
    Example:
    Message 19 is - Where is &1. Where is &1. Where is &1. Where is &1.
    Information that i have :
        ls_msg-msgty = 'S' .
        ls_msg-msgid = 'AP_JATT_TDC_MSG_CL'.
        ls_msg-msgno = 19 .
        ls_msg-msgv1 = 'A'.
        ls_msg-msgv1 = 'B'.
        ls_msg-msgv1 = 'C'.
        ls_msg-msgv1 = 'D'.
    From the info that i have i want the text
    Where is A. Where is B. Where is C. Where is D.
    Is there any function modules which will provide me these details?
    Regards,
    Bikash.

    HI
    You can get the Text based on the Message attributes using the FMs
    FORMAT_MESSAGE
    MESSAGE_TEXT_BUILD.
    Use any one of them..
    It will work for u...
    <b>reward if Helpful</b>

  • When and How to get the Text.ScrollPos value of a String control when scroll bar position changed

    Hi, 
    I'm working on a feature triggered by scroll bar position of a string control changed.
    But I could not find a good way to catch the scroll bar position changed event, 
    the scroll bar is controlled manually by mouse down → mouse move → mouse up, I want the get the Text.ScrollPos value when user mouse up, and compare with the maximum value.
    But the problem is,  mouse up on the scroll bar could not trigger String: Mouse up event!
    So I have to get the Text.ScrollPos continuously in the background in Timeout event, but I think it’s not efficient.
    Do you have any better idea on when to get the correct destination value of Text.ScrollPos?
    I plan to store the value of Text.ScrollPos in the bottom(maximum value) in a shift register, then compare the current Text.ScrollPos value with the max one.
    If it comes close to the bottom(90%~100% of the maximum value), then the close to bottom LED will turn on.
    Attachments:
    scroll bar pos changed.vi ‏15 KB

    Hello Cecilia,
    I don't think there is any build-in event for this.
    One solution would be to create your own user event at the initialisation of you main and launch a thread which is going to be pulling the value of your scrollbar position:
    Then you can build your main as if they were a scrollbar move event.
    And dont forget to close the thread and destroy the event at the end.
    Hope it helps.
    Attachments:
    Scrollbar event.PNG ‏10 KB

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • How to get the text elements for a particular program

    Hi All,
    I want to get the all text elements , selection texts for a particular program...How to get.
    I have used one FM READ_TEXTELEMENT_FROM_REPORT , but not much useful..
    please help me..
    Regards,
    raj

    Hi..
    You may use this statement to read the text elements:
    DATA: i_reptx  TYPE STANDARD TABLE OF textpool   WITH HEADER LINE.
    READ TEXTPOOL (reports) INTO i_reptx. " reports is the report name.
    Best Regards,
    Pradeep.

  • How to get the text for the new query

    Hi all...
    we have created a new query by copy of existing query. iwe have changed only the sales area in the filter.
    when we run the original query in japan language, getting japan text for the material where as for the new query it is not getting japan text.
    we have extracted text masterdata for sales area but when we run the query it is not displaying material description in japan language.
    how to get text for the material in the new query?
    thanks

    hi,
    What is the output for text filed you are getting as of now?
    Check the properties of the material in old query?
    Generate the query in tcode RSRT and execute and check.
    Check if the Display as properties is selected as "Key and Text".
    try to replace it back(sales area) in filters and check in new query - if u are getting the desired output or not.
    Regards
    KP

Maybe you are looking for

  • Best Way To Preserve MiniDV on Hard Drive

    Hello! I am starting a project where I am going through many MANY MiniDV tapes and I want to store them on an archive Hard Drive for future use (so that I do not need to deal with the real-time importation again).  I have Premiere CS4 and have the ca

  • Convert pdf to text in adobe pro x

    I would like to convert a PDF document into text.  Can someone advise?

  • Add an IFRAME to a HtmlPanelGrid dynamically?

    Is it possible to use JSF to dynamically add an IFRAME (essentially a verbatim tag) to a panel grid programmatically? I can add a table and other standard widgets, but don't see how to do an IFRAME. Anyone?

  • How can I add a "Was this Topic Helpful" statement

    RoboHelp 11 I'm sorry if this has come up and I wasn't able to find the anser, but is there any way to add a statement: Was this topic helpful? Yes No to the end of a topic. It seems many Help programs, including your own, have this capability. If th

  • Apps download but do not install

    Over the last week or so I have been trying to update apps already purchased via the appstore.  WiFi explorer stalled so I removed the app by closing the app store and deleting the app from explorer.  I purchased a new app and the download moved to 1