How to check the default checked  value for radio button on jsp for struts

Hello , I just want to check the default checked value in JSP for a radio button, how can i do that?
<html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
<html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>

you can set the default value for property ( which you want to default selected when the form is first loaded) in reset method of the form.
<html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
<html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>
In the above case you can write the code as follows in the perticular form of this jsp.
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
     sale = "permanent";
This will show the first check box default selected when the first time the page is loaded.

Similar Messages

  • How to set the default context value for flexfield in OAFramework pages

    Hi,
    I have a page which contains a contexxt value field i.e Flexfields
    To select the context value we have to select the value from drop down
    So Here we want to display the context value immediately when the page is called
    How to set the default valu in this case
    Regards,
    Krishna

    You can set the Attribute category view attribute to the Flexfield context value and call prepareforRendering in the flex bean. Check the dev guide for details.
    Regards
    Sumit

  • How to Change the default Search value for Field Role?

    HI,
    I went through numerous threads on how to default the search value , but does not help for my issue. Hence im posting this new thread. Please provide your suggestions on how to achieve this.
    For the Ship-to party field (in item detail )  on webui when i do a F4 help i get the pop up with various search criteria and  for the field Role the default value is "Ship-to party".  which is visible. we need to change this default value to Prospect which is available in drop down.
    The attribute is STRUCT.ROLE  and view BP_HEAD_SEARCH/SearchHelp . The method GET_DQUERY_VALUEHELPS  from the context node class is called to fill the value help for this attribute, but i dont understand how the ship-to party is filled as default. There is no code in this method to default the value.
    The generic GET_V_S_STRUCT method also does not default the Ship-to party on this field.
    I want to understand how this Ship-to party is filled by default and how can i change this to prospect..
    Many Thanks,
    Shaik

    We had a same requirement of defaulting Sales org and division in search criteria for a specific value.
    this can be doen by redefining "DO_PREPARE_OUTPUT" method in IMPL class for the respective view.
    See the code:
    METHOD do_prepare_output.
    *CALL METHOD SUPER->DO_PREPARE_OUTPUT
    **  EXPORTING
    **    iv_first_time = ABAP_FALSE
      DATA:
        lr_qs TYPE REF TO cl_crm_bol_dquery_service.
    * Get current query object
      lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
      IF iv_first_time = abap_true.
        lr_qs->clear_selection_param_values( ).
        lr_qs->delete_empty_selection_params( ).
    *   if l_sales_orgs is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '1'
            iv_attr_name = 'SALES_ORG'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = 'O 50000514'.
    *   endif.
    *   if l_dist_chan is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '2'
            iv_attr_name = 'DISTR_CHAN'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = '01'.
    * endif.
    Hope this will help..
    THanks & Regards,
    Amit

  • 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

  • Getting values from radio buttons in jsps

    i am doing online quiz. i have a problem with radio buttons
    <input type =radio name="a" value="opone"> x
    <input type =radio name="a" value="optwo"> y
    <input type =radio name="a" value="opthree"> z
    i what to get the values from the radio button
    so i have used
    request.getParameter("a");
    so i am not getting proper output (x or y or z) here
    i got what ever i have selected value ie opone or optwo or opthree here but not xor y or z.
    can u please help me

    <input type =radio name="a" value="x"> x
    <input type =radio name="a" value="y"> y
    <input type =radio name="a" value="z"> z
    There you go. The value is what is actually submitted, what you print outside of the radio button is just visible content.

  • How to set the default value filters for navigational block in WAD.

    Hi Experts.
    as per the customer requirement . they have bex report we need to convert in to web. but in the bex for one field  they using default filters but am not aware in the WEB reports.
    Please anyone suggest me how to give the default filter values in the navigation block in WAD.
    Thanks
    Ashok

    Hi,
    In the Properties of the Navigation Block pane. Goto WebItem-- Goto List of Characteristics, in that click list it will pop up new window, there enter the required objects wants to be in the default filter area.
    Hope it hleps you.
    Veerendra.

  • How to change the default servcie port number to be checked for the IPS sig

    Dear
    i have an AIP-SSM (IPS) installed in a an ASA firewall.
    i have configured an access-list in the firewall to forward the traffic coming from the internet toward the internal server to be checked by the IPS module.
    but the case is that the services have to be checked is not the default services port numbers.
    http port is 8081
    oracle port is 2006
    and many other services.
    the question now, is how to change the default service number in the IPS in order to be checked by the corresponding service signatures?
    Thanks

    You would set those as part of the signature variables.
    http://www.cisco.com/en/US/docs/security/ips/6.1/configuration/guide/cli/cli_signature_definitions.html#wp1040009

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to print the Actual Check on 1st Page if line items are more for F110_p

    Hi,
    How to print the Actual Check on 1st page if the line items are more in F110_PRENUM_CHCK script. The standard script is printing at the last page of line items.
    I tried using
    IF &PAGE& EQ '1 '
    /E 545 --> text element
    ENDIF
    but it is of no use.
    Please let me know if anyone knows. Thanks in Advance.

    Hi Krishna,
    I guess, there is no other possible way to acheive this without modifying the standard driver program. Why because? in you driver program you check window will be called only on the last page... but before you change your driver program give a try like shown below....
    Not sure, but give a try... In the first page you will be printing some void check try to replace the code inside the text element of void check with original check and make all the check void... note: in this text element, be sure you write two conditions...
    IF &PAGE& = 1.
    **PRint all check values..
    ELSE.
    ***Print void values
    ENDIF.
    Close the thread if your question is answered.
    Regards,
    Sairam

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to do the Unicode Check for Business Objects ?

    Hi all,
    How to do the Unicode Check for Business Objects ?
    Note: All business Objects are stored in BOR (Business Objects Repositary)
    Thanks in advance
    Sri..

    Hi..
    i have used the  UCCHECK  transaction for some business Objects
    For some business objects it is showing that No Unicode Errors found Ex: Z00MARA
    and for Business Objects it showing the message like : There is no program corresponding to this selection.
    Why system is showing like this ?
    Thanks in advance
    Sri..

  • How to check the dependency of Timesten Application version 11.2.1 for OEL 6U4

    How to check the dependency of Timesten Application version 11.2.1 for OEL 6U4

    Hi Chris,
    THank for your reply.. My requirement is I am planning to upgrade my Server OS from OEL 5U8/5U3 servers to OEL 6U4. And we are using timesten application 11.2.1 version as of now. So wanted to check if the same version of TImesten can we install them on OEL 6U4 . if we can install it successfully what are the dependent RPM packages we need to consider for installing the timesten application and will there be any issues using the application? .
    Is timesten 11.2.2 is the officially supported and stable version on OEL6U4?
    And also can you suggest me if I want to check other applications dependency like rhino-2.3 and postgres 8.1.23 version how I need to check if this applications versions are certified to run on OEL 6U4.
    IT would be great help if you can suggest me on this.
    Naveen

  • How to set the default values for fields

    Hi all,
    How to show the default values without changing the existing code in the CO for the seeded page.
    I have requirement like one drown box in that three values are there. On page load the item is empty , but i have to show first value as default value. Is this possible through personalization..
    Can any body have idea pls give some suggession.
    Thanks
    Uma

    Considering you don't want to go for controller extension..
    A way is to use java script in personalization.
    Simply create a RawTextBean using personalization and add the java code to change the properties.
    Java script plan:
    Get the handle of the items to change (like here drop down)
    selectTags=document.getElementsByTagName('select') --gives list of all the select tags in the page
    get ID of the select tag whose value you want to change (loop throug selectTags array).
    or get it directly by getElementsByName method or getElementsByID mETHOD.
    Say its handle is changeItemID.
    changeItemID.selectedIndex=2
    Overview of script
    <SCRIPT type="text/javascript">function _checkLoad(eventXX){
    --yOUR CODE FOR GETTING handle Of the select item whose value is to be changed,goes here...
    changeItemID.selectedIndex=2
    }</SCRIPT>

  • How to remove the default value of "Inventory No." in Equipment Master

    Hi Experts,
    Need your advise
    How to remove the default value for the field "Inventory No" in Equipment Master? It will goes back to the default value(TRANSIT) when i delete or change the value.
    Thank You
    Best Regards

    i think you cannot default this value from configuration, check is there any screen variant exist for your transactions IE01/IE02, else may be any user exit is active on the equipment master transactions.
    Take help of your ABAPer and verify the above.
    Praveen.

  • "I would like to know how to set the default view for the columns. Somewhere I read it could be done in by music icon under Library.  Can't find it.  Thanks

    "I would like to know how to set the default view for the columns that are shown in iTunes. Every time I open it, I have to either go to the options, or right-click to get the pop-up options, and delete "rating" and add "composer." I'd really like to just do it once and be done with it."  Somewhere I read you could do this by clicking on the Music icon under LIBRARY then arramge the columns.  Trouble is, I can't find a Musi Folder or icon in my user library.
    Any help would be appreiated.  OSX 10.9.2  iTunes version 11.1.5  Thanks!!! CW!

    From the iTunes menu bar try View>Show View Options.  Make sure what you want to see is checked and what you don't is unchecked.  You can do this (may need to do this) for any playlists, your main Library, etc.
    Good luck
    srb

Maybe you are looking for