开发者

Create a Modal Dialog box containing a form using struts2

In my application I have a part of form which should allow details of a n number of persons. i.e,

Field1 Field2 field3

now a button Details of persons

on button click it open a modal dialog box containg a form with 3 fields about person.When I click save. the details of persons sections should update...This should repeat on every button click.. I also need validations for fields on modal dialog box.

开发者_JAVA技巧Th data entered for field1,2,3 should remain same during the process..

How to do this in struts2.I am facing a lot of problems can some one help me with a simple example..

Regards, Lalitha

One more problem is to have a date picker on modal dialog box..


a modal dialog is available with struts2 jquery plugin

<sj:dialog 
    id="myeditdialog" 
    autoOpen="false" 
    modal="true" 
    title="Edit User"
/>

<s:url id="edit_user_url_1" action="edit"/><s:param name="id">1</s:param>
<sj:a 
    openDialog="myeditdialog"
    href="%{edit_user_url}"
>

<s:url id="edit_user_url_2" action="edit"/><s:param name="id">2</s:param>
<sj:a 
    openDialog="myeditdialog"
    href="%{edit_user_url_2}"
>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜