Results 1 to 2 of 2

Thread: Doubt in

  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Default Doubt in
    Hi All,

    I m new to this springframwork. In one of the project we r implementing this framework. This project is half way developed and i have to continue with that. In one situation i need to assign a property based on the button which is clicked by the user. In the project they have used the following code

    <spring:bind path="command.buttonPressed">
    <INPUT type="hidden" name="buttonPressed" id="buttonPressed">
    </spring:bind>

    <TABLE width="100%">
    <TR>
    <TD align=center>

    <INPUT class="buttonstyle" type="button" name="Submit" value="Submit" onClick="<c:out value="validate('${formname}', 'SUBMIT')"/>">

    <INPUT class="buttonstyle" type="button" name="Save" value="Save & Close" onClick="<c:out value="submitForm('${formname}','SAVE')"/>">

    <TD>
    </TR>
    </TABLE>

    JavaScirpt function:

    function validate(formName, button) {
    document.all["buttonPressed"].value=button;
    }

    function submitForm(formName,fieldVal) {
    document.all["buttonPressed"].value=fieldVal;
    document.forms[formName].submit();
    }

    In this when user presses the submit button. i need to assign the value of the property buttonPressed.

    But sometimes when i click the submit button it works properly but most of the time it is not assigning the value of the button in the property field. i couldnt find the reason.

    I think u could understand my question. One more problem is i have very short time to finish this module. pls help me as soon as possible. Thanx for ur answers.

    Thanx & Regards
    Raja


  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    Raja the correct place to post questions relating to the Spring Web MVC is the "Web" forum. Not "Spring Rich Client Project" or "Spring-IDE" where you posted the same question yesterday.

    Ollie

Similar Threads

  1. spring:bind doubt
    By Dani in forum Web
    Replies: 1
    Last Post: Sep 14th, 2005, 11:31 AM
  2. Replies: 3
    Last Post: Jul 27th, 2005, 06:03 PM
  3. Petclinic code doubt
    By avspring in forum Web
    Replies: 1
    Last Post: May 26th, 2005, 05:23 AM
  4. Doubt with wizard form controller
    By mia in forum Web
    Replies: 2
    Last Post: Apr 26th, 2005, 03:59 AM
  5. Replies: 0
    Last Post: Aug 30th, 2004, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •