Hi guys;

(one more time)

I'm new to struts and I just learn how to use it.I'm working on my first struts 
app and have following problem: I don't know, how to edit rows in my jsp.

On the first jsp(Form.jsp) I have just the table, taht consists of the columns 
ID, CURR, NAME, START and buttons DELETE and EDIT. When I click EDIT button, I 
want to open FormEdit.jsp with 

ID-text field, CURR-listOfValue, NAME-text field, START-text field with the 
values from the selected row in the first jsp. At the bottom there is a SAVE 
button. Can anybody tell me, how can I do this........remember I'm new to 
struts :-) Thanks

source of Form.jsp

<script>

function doEdit(cisPdo, id) {

var url = "FormEdit.jsp";

url += "?action=UPDATE";

url += "&cisPdo=" + cisPdo+ "&id=" +id;

document.location.href=url;

}

</script>

<tr>

<td><%=Card.getId()%></td>

<td><%=Card.getCodCurr()%></td>

<td><%=Card.getName()%></td>

<td><%=Card.getStart()%></td>

<td>

<input type="button" value="Delete" onClick="doDelete(....)

<input type="button" value="Edit" onClick="doEdit('...', '<%=Card.getId()%>')">

</td>

</tr>



source of FormEdit.jsp

....

<html:form action="insertCpp">

<table>

<tr>

<td>ID:</td>

<td>CURR:</td> 

<td>NAME:</td> 

<td>START:</td> 

</tr>

<tr>

<td><html:text property="id"/></td>

<td>

<html:select name="Form" property="codCurr">

<html:options collection="CurrBean" property="codCurr" 
labelProperty="nameCurr"/>

</html:select>

</td>

<td><html:text property="name"/></td>

<td><html:text property="start"/></td>

</tr>

</table>

<html:submit><bean:message key="button.cpp.save.submit"/></html:submit>

</html:form>

________
Vsetci sa raz zideme na http://blog.sme.sk

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to