java - How to use display tag with struts 1? -
i want when click button delete, customerid
, send action. execute function delete.
<display:table name="sessionscope.customerform.customers" id="row" requesturi="/customer.do" pagesize="15" style="text-align:center" excludedparams="_chk" clearstatus="true"> <display:column title="checkkbox"> <input type="checkbox" onclick="selectcheckbox();" id="checkbox" /> </display:column> <display:column style="width:500px" property="customerid" title="customer id" sortable="true" paramid="customerid" href="edit.do"> </display:column> <display:column style="width:300px" property="customername" title="customer name" sortable="true" /> <display:column style="width:300px" property="sex" title="sex" sortable="true" /> <display:column style="width:300px" property="birthday" title="birthday" sortable="true" /> <display:column style="width:300px" property="email" title="email" sortable="true" /> <display:column style="width:300px" property="address" title="address" sortable="true" /> </display:table> </div> <br> <div> <html:button styleclass="submit" property="add new" value="add new"></html:button> <html:button styleclass="submit" property="delete" value="delete" ></html:button> </div> </html:form>
pass customerid parameter js function this:
<display:column title="checkkbox"> <input type="checkbox" onclick="selectcheckbox(<bean:write value="customerid" />);" id="checkbox" /> </display:column>
or
pass this
js function , navigate trough html code using js or jquery illustration can utilize this:
function selectcheckbox(element){ var customerid = $(element).parent().children("td")[1].html(); // stuff! }
java displaytag struts1
No comments:
Post a Comment