2

I need to save data from input tag inside display:table. I am expecting some listener or some mechanism to process my current shown table. Please guide me. Thanks

Technology in use: Struts 1.2, Display tag library, jsp.

Code:

<display:column style="text-align: left;" class="align_left"   property="masterAppQuestions.quesDescription"  title="Performance Criteria"   headerClass="sortable" >
</display:column>
<display:column style="text-align: left;" class="align_center"    title="Rating"   headerClass="sortable" >
    <input type="text" name="performance_rating1" size="5" value='<bean:write name="answerList" property="rating"/>'/>
</display:column>
<display:column style="text-align: left;" class="align_center"  title="Comments"   headerClass="sortable" >
    <textarea  name="performance_comment" rows="2" cols="60" >
        <bean:write name="answerList" property="ansDescription"/>
    </textarea>
</display:column>

Praveen
  • 55,303
  • 33
  • 133
  • 164
Navdeep Singh
  • 699
  • 1
  • 10
  • 25

2 Answers2

1

If you want to save rating after change you can use this: http://api.jquery.com/change/

Alex
  • 11,451
  • 6
  • 37
  • 52
1

I got the solution, Thanks Alex. when onchange event happens i assigned the hidden field with the input field value and by nature hidden field submits the value on submitting the page. Thanks again.

Navdeep Singh
  • 699
  • 1
  • 10
  • 25
  • Sigh: Have you used an array of properties to manage one input element for each row? If yes, have you one form or a form for each row? Thank you – Sefran2 Mar 25 '14 at 18:41
  • one form would do the task and dynamically add a input hidden field for each input field. Use java script to pick the values from input field and place them to hidden input field. Use event onclick before form post on button/link, its better than onchange and loop through the rows with row values. – Navdeep Singh Mar 26 '14 at 04:58