Hide fields in a jsp

hi
i have a jsp in which i need to hide a field when it is first displayed.
i have 2 radio buttons yes and no. the action class sets the no radio button as default. there is a text message that needs to be dispalyed only when the yes radio button is clicked. i am doing this with java script but the first time the page is loaded/displayed since the default is no and there is no click event, the msg gets displayed which should not happen.
1. where do i do this in the action class that is responsible for displaying the jsp or in the jsp itself.
thanks
makthar[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

As u already know that the value of the radio button will be no. make a span with style='display:none' around that message which u dont want to show.
later on for getting back that message into the view also, u can get that span and make that style= ''

Similar Messages

  • How to hide fields in Table maintenace screen

    I have created a view with table maintenance generator. I would like to hide some fields. With event I am able to fill in those fields but I want to hide those from screen.

    HI, 
    This is reff with ur below post, I have been stuck with same problem,
    I got your code, how its functioning, but didn't get get where i have to write it.
    plz tell me in brief.
    Thanks in Advance.
    Regards
    Vivek
    Re: How to hide fields in Table maintenace screen  
    Posted: Feb 6, 2009 11:42 AM   in response to: Aarti Ramdasi in response to: Aarti Ramdasi           
    Click to report abuse...             Click to reply to this thread      Reply
    Hi,
    You can hide the fields like this..
    For example
    select-options:
    s_carrid for spfli-carrid modif id gr1,
    s_connid for spfli-connid modif id gr1,
    s_cityto for spfli-cityto modif id gr2.
    I am going to hide last fied..To do this
    at selction-screen output.
    if s_carrid is initial or s_connid is initial.
    loop at screen.
    if screen-group1 CS 'GR2'.
    screen-active = 0.
    modify screen.
    endif.
    endloop.
    endif.
    whenever u click on any one of the field i.e. carrid or connid the third field will displayed.Otherwies the last field cityto is not visible initially
    Regards
    Kiran

  • How to add a new field in order.jsp

    Hey,
    I want to add a new field in order.jsp. How to store that data into backend?

    If you are adding a header field then you will extend the header structure in CRM and do the same with Item structures for Item fields. You will use EEWB or similar technique in the CRM backend to extend the header or item.
    These extended fields in the backed are available in customer_h or _i structures in the order object that can be read and modified in the Header BAdI or Item BAdi.
    If you think that this message is cryptic or not enough, then you should search for Extension Guide in this forum and read the document.

  • How to "encapsulate" a data from a text field in a JSP form

    Hi. I'm trying to make a user's registration jsp page and I'm not sure how I could get the data from a JSP form from the user and store that into some variable that I could later pass to a query to modify the database. I've been using a JavaBean, but I get null values for all the fields of the jsp page. That's logical, since I cannot find a method that will read the user's input and store that into some variable. In my JavaBean, I have get and set methods that will return a String for each of the form fields such as first name and email. The set method will have in a String as a parameter to set that field value (whichever field it is) to the value of the input parameter, but I don't know if there is a method or a way to read and store the values entered by the user into the jsp form. This is a code snippet of the jsp form:
    <TR><TD>First Name: </TD>
    <TD><INPUT TYPE="TEXT" NAME="fname"
                   VALUE="<%= newUser.getFirstName() %>"></TD></TR>
    Here, the getFirstName() method simply returns the value of a String value related to the user's first name, which is initialized as null in the JavaBean. newUser is the name of the JavaBean that I'm using.
    Any suggestions? Thanks.

    haha...nevermind this question also guys...I found out that I could use the request.getParameter("some_String") method with my JavaBean to read and store data entered by the user in a text field.

  • How to hide fields in product master data

    Hi gurus,
    could you please tell if it's possible to hide fields in Product maintenance (tr. COMMPR01).
    It's necessary to hide some fields in a standard Set type.
    Thanks in advance, Sunny.

    Hi, TooCan and K.narsimha rao,
    I've tried to use transaction variant. It really helps.
    Thank you!
    It was better for me to find some customizing in SPRO but as I understand there is no such.
    Reward  you
    Best regards, Sunny.

  • How to hide fields in UIX form

    Hi
    I need to update the table with last_updated_by and last_updated_date every time if any change to the record. But I do not want to show these 2 fields on the screen.
    Could you help me how to hide fields in UIX form/any procedure to insert the data to database with out placing them in the screen .
    Thanks in advance.
    NRK

    Now that you mention it ... the rendered flag will stop the field from being rendered. So it's not even in the page. Stupid me.
    Have a look at formValue. These are rendered, but invisible fields in a form. That should do it (hopefully).
    In prepareForDML() you could simply call the setter of your date attribute that stores the date of the last update. There you pass the current date, or you could fetch the sysdate from the database and pass that. If you go that way, then the EntityImpl could make these adjustments automatically when inserting or updating and you wouldn't even need these fields/bindings in your UIX page.
    Just check what the operation is, and if it's an update or insert then call the setters of the attributes you want to update. Then call super.prepareForDML(). Something like that.
    It all would happen in the middle-tier, client not involved.
    So formValue should work, and the prepareForDML() stuff should also work. Don't know which way you want to go.
    Sascha

  • How to hide field dynamically in a report while using JRC

    Post Author: prateeti
    CA Forum: JAVA
    How can I hide fields in a report dynamically?Say my report now contains 3 fields(columns). Some users want to see the 1st and 3rd column and the 3rd column must be adjusted accordingly so that it appears where the2nd column previously was.Is there any way of doing such thing using API's from JRC.I am not using RAS.
    Thanks.

    Post Author: something_stupid
    CA Forum: JAVA
    Hi,
    you could to this while designing your report in CrystalReports. Pass the user's choice as parameters to your report on runtime. This parameter is evaluated and changes visibility and position of columns conditionally. Actually haven't done this with visibilty and position but with strings to display conditionally.
    good luck!

  • HCM interactive Forms - hide fields and backend connection

    Hello,
    we plan to implement a personnel transfer workflow based on interactive forms. Because in one step the user should not be able to see a couple of fields, it is possible in interactive forms zu hide fields based on the users role?
    I read a lot the last days but what I still havent found out and I hope you can push me in the right direction is, how the connection between backend and Form is working.
    Inside of an example form and in the documentation is descriped to use this below code to implement a bushbutton and the send message to create a server round trip. But if I create 2 pushbuttons with the same code, how do I know which button was pressed? Or do I have to create my own events somewhere? Or is there only this one event and I have to set a hidden field with some value via javascript or formcalc to find out whats going on in the form?
    $record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK"
    ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
    best regards,
    Kai

    Hey Rajesh
    I'm not sure it will work - but its worth a try.
    Every time i wont to hide some subforms or UI elements - I determine them as "invisible" by default - and when the conditions are right - I turn them to "visible" (negatively way).
    Hopefully it will help you.
    Eyal

  • No. of hidden fields in a jsp..

    Hi,
    I would like to know if there is any limit to the no. of hidden fields in a jsp page. What effect does the page/browser have if there are many hidden fields(like about say 50) in a single page.
    any ideas.
    thanks
    jag

    The only limitations I know about are in HTTP itself.
    GET request on Internet Explorer supports a maximum of 2,048 characters
    (ex. http://whatever.com/index.jsp?id=23&hidden1=2912912&hidden2=123987123)
    POST request not sure of the limitations but I know its more than 2,048
    hope this helps

  • Accessing input field from the JSP in dynpage

    HI all,
          I am trying to access the input field of the jsp page in my JSPDynpage but it is always return null.My Input is a normal HTML element not a HTMLB element
    JSP File :
         <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
      <hbj:form id="myFormId" >
         <div class="content">
            <table cellpadding="2" cellspacing="2">
                        <tr>
                               <td>
                                  <label for="name"><strong>UserName:</strong></label><span id="info_name">(This field is required)</span><br />                           
                                     <input name="name" id="name" size="10" maxlength="10" type="text" />
                               </td>
                        </tr>
                        <tr>
                             <td>
                                  <label for="email"><strong>EmailID:</strong></label><span id="info_email">(This field is required)</span><br />                           
                                     <input name="email" id="email" size="20" maxlength="20" type="text" /></td>
                        </tr>\
    </Table>
    JSPDynpage:
           InputField myInputField = (InputField) getComponentByName("name");
         if (myInputField != null) {
          name = myInputField.getValueAsDataType().toString();
                   InputField myInputField1 = (InputField) getComponentByName("email");
         if (myInputField1 != null) {
          name = myInputField1.getValueAsDataType().toString();
    In both the cases myInputField and myInputField1 are null . My Question is what should be the parameter that i need to pass for getComponentByName method.
    Regards,
    Raj.

    hi,
    The way you are trying to get the input field value works good with hbj type elements.
    either you change your input field to an hbj one or use java script inside your jsp page to catch the value
    like
    for HTML:
    [HTML Input Field|http://www.w3schools.com/HTMLDOM/met_doc_getelementbyid.asp]
    and for HTMLB
    refer this link:
    [SAP HTMLB GuideLines|http://www.sapdesignguild.org/resources/htmlb_guidance/index.html]
    Regards,
    Srinu

  • Select field and hide field at data source ganaration  for LO extrction

    Hi GURU,S
    Could any one tell me what is differce between select field and hide field at data source ganation in LO at r3 side.what happend if u select field and hide field.
    Regards.
    hari

    Hi Hari,
    If you choose Select fields, you'll be able to filter this IO in Selection tab of infopackage (set IO's value(s) to be loaded).
    In case of hide field you'll not have it in the transfer structure at all.
    Best regards,
    Eugene

  • Show/hide fields when selecting an option from a drop-down menu.

    Hello Gurus!
    I have a question about creating a Java Script withing Acrobat pro.  This is what i would like to do: I created a drop-down menu with several selection entries.  Upon the customer making one of the selection entries, i would like for the correct fields that i created to become visible and all other fields to hide.  Is this even possible to do?  The reasoning behind this is because we have a form that customers have to generate in order to request access to certain financial accounts; we have over 20 different types of accounts and for each instance the customer has to fill out the same form.  By creating a drop down menu, i can use the same form by just changing the drop-down selection and clicking on the designated fields for that selection.  At this time i have over 20 different forms that poing to 20 different account requests and i would hate to send the form 20 different times to one person.  The reason i can not add all fields desired for all accounts is due to the fact that the form would be filled with hundreds of checkmarks and instructions thus making the process too tideous for the customer.  Hope you guys can help out.
    ~Vader

    The good news is, it can be done (and it has been done).
    There are a few things to be aware of, however.
    The most important is that the form must be planned well, which means that you must think carefully about your logic and even more so about your field naming (hierarchical field names are your friend). One fundamental issue, you have to be aware of, is that this form no longer will be a "standard form". The consequence of this is that you may have to be aware that you might get into trouble when you have to prove that your user filled out that particular standard form (talk to your compliance and forms management people about that).
    You also may have to decide whether the form should be usable in Reader. And, if so, how much you want to spend on the right to do so. You will see below why…
    There are actually two approaches for dynamically showing/hiding parts of a form. If your form can be separated between a fixed first page (where you also have the account type selection), and a variable part (depending on the selection), you could use Templates, which you spawn according to the selection, and delete pages when you change the selection. This approach is very easy to implement, but requires Reader Extensions Server to allow it to work in Reader; Acrobat Pro's extended rights are not sufficient for that.
    The other approach is showing/hiding fields. If you did your homework well, it would be very easy to first hide all subsequent fields, and then show the ones you need in two lines of code. This approach does not require extended rights for Reader at all, as long as your forms will always have the same number of pages, for each of your account types. This approach also works for the cases where the differences between the individual forms are very small. It does also work for showing/hiding bigger chunks of the form. In that case, you might create the "background" separately, and then put it as an icon into a button field which you will show/hide together with the carefully placed on top of it active fill-out fields.
    There is a third possibility, which Adobe Propaganda probably would suggest, and that woudl be subforms in LiveCycle Designer. The consequence is, however, that you won't have PDF forms, but proprietary XFA forms instead. And you may have more developing and maintenance work than with the other approaches.
    Back to your original question: you could use a Keystroke script evaluating event.changeEx of the combo box field. Depending on that, you would run your action to set up the according form part. The other way to do it would be evaluating event.value in the onBlur event. The latter would have the advantage that the selection has been made, and you get a bit more time to set up the form (this may in fact be an issue, particularly with Acrobat 9 and 10, which may take their time to show/hide fields).
    Another possibility instead of a drop down (combo box field) would be a popup, where you would have a button to press, and the list of selections pops up. This second method uses app.popUpMenuEx().
    Hope this can help.
    Max Wyss.

  • How can I hide fields when printing?

    On a form I have created for our field staff, we have many conditions of what options will show based on different selections on the form. When printing their responses, the entire form prints, even with items that have nothing to do with the selection as they were hidden from the person filling out the form. How do I hide/ suppress these blank fields?

    Hi,
    Thanks for asking.  FormsCentral currently only support hide fields in html form, not pdf form.  So printing from a pdf form would show all fields.
    Regards,
    Perry

  • How to hide fields in XD99 transaction

    Hi Experts ,
    I got a requirement to hide some fields in XD99 transaction for specific user group, I tried creating transaction variant but it is not allowing me to create for XD99 and displaying error ''Variants are  possible  only for dialog  transactions" . Please suggest a  alternate method to hide fields under 'fields' tab in XD99.
    Thanks in advance .

    Try to create variant for transaction MASS.
    Regards,
    Raymond

  • Modify screen in VA41 : How to hide field in userexit_field_modification

    Hello,
    How to hide field at item level only (User should not be able to edit this field) in userexit_field_modification, instead of hiding the complete column.
    If I use
    FORM USEREXIT_FIELD_MODIFICATION.
    IF screen-name = 'RV45A-MABNR'. " Material
    SCREEN-required = 0.
    ENDIF.
    ENDFORM
    the complete material column will be greyed out. I want to grey out only for some items.
    Thanks,
    AP

    Hi AP,
    You havent given MODIFY SCREEN after screen-required = 0.
    Please try it abd check.
    FORM USEREXIT_FIELD_MODIFICATION.
    IF screen-name = 'RV45A-MABNR'. " Material
    SCREEN-required = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDFORM
    Regards,
    Pawan

Maybe you are looking for

  • ADF: is it possible to call bean methods from a DataForwardAction?

    Hi, i have created an ADF data control from bean and I have some values bound and populated in a page. As part of the Action class i would like to execute one of the methods in the bean. Is this possible or am i taking the wrong approach? regards, Br

  • How to completely uninstall clean my mac

    I have already uninstalled clean my mac, not just thowing to the trash. But here just show it's still in the computer, what's happen? 29/3/14 8:23:02.552 pm com.apple.launchd.peruser.501[207]: (com.macpaw.CleanMyMac2Helper.trashWatcher) Throttling re

  • Widgets Glitch on ibook g4

    When I use widgets and type something into a field within widgets my keyboard does not function properly after. I would like help with solving this problem.

  • Possible to Adjust Airplay Lag to Sync Multiple Airplay Speakers?

    When playing to 2 different ATV2s, my iTunes music is not in sync between two sets of speakers.  Is there anyway to adjust the lag time to one of the ATVs? Here is my setup: - Living Room - one ATV2 hooked up to my TV via HDMI, with powered speakers

  • Rebate agreement was manuelly processed and Settled But Accruals are still

    Dear SDN Team, Can you please advice how to resolve the below issue as seems it was very critical. The problem is below: Rebate Agreement was created and it was settled manually completely.  Once it was settled it was created the Rebate Credit Note.