Oops, just realized I used my mock-up page.  The part showing the list of 
administrators will of course use an iterate tag =)


2003 3月 5 水曜日 11:39、Karl さんは書きました:
> I'm trying to figure out a good design strategy for building a page that
> allows viewing, adding, editing, and deleting of administrators.
>
> At the top of the page I have the form itself:
>
>             <html:form action="screen_manage_administrators.do"
> name="AdministratorUserForm"
> type="com.somewhere.aproject.AdministratorUserForm">
>                 <table>
>                     <tr>
>                         <th>Name</th>
>                         <td>
>                             <html:text property="userName"  maxlength="16"
> size="16"/>
>                         </td>
>                     </tr>
>                     <tr>
>                         <th>Password</th>
>                         <td>
>                             <html:password property="password" 
> maxlength="8" size="8"/>
>                         </td>
>                     </tr>
>                     <tr>
>                         <td>
>                             <html:submit value="Set"/>
>                         </td>
>                     </tr>
>                 </table>
>             </html:form>
>
> Under that I want a list of existing administrators (there will probabl
> only be 5-10 admins, and definitely not more than 20):
>
>             <table>
>                 <tr>
>                     <th>Name</th>
>                 </tr>
>                 <tr>
>                     <td>
>                         me
>                     </td>
>                     <td>
>                         <html:link
> href="screen_manage_administrators.do?num=0">Edit</html:link>&nbsp;
>                         <html:link
> href="do_administrator_remove.do?num=0">Delete</html:link>
>                     </td>
>                 </tr>
>                 <tr>
>                     <td>
>                         myself
>                     </td>
>                     <td>
>                         <html:link
> href="screen_manage_administrators.do?num=1">Edit</html:link>&nbsp;
>                         <html:link
> href="do_administrator_remove.do?num=1">Delete</html:link>
>                     </td>
>                 </tr>
>             </table>
>
>
> If you enter in data that does not match an existing administrator name and
> submit it, it adds the administrator.
> If you click on the "edit" link of one of the administrators, it puts that
> admin's details into the edit form.
> If the administrator name matches an existing name, the data is updated.
> If you click on delete, it will ask confirmation and then delete the entry.
>
>
> My first question is:  Is it a good idea to be placing all of this
> functionality in one page, or should I be spreading it to other pages?
>
> My second question is: How would I implement such a layout in struts?
> I can associate a UserForm object with the form, but how would I interpret
> which administrator data to load into the edit form (via the argument
> "num")? Should I be making a separate form object to provide the list of
> administrators and then iterate over that list?  If so, how do I access 2
> different ActionForms within the same page?
> Would I be better off making an ActionForm that contains all of the data
> for the edit form as well as the collection of administrator data?
>
>
> Cheers!
>
> Karl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to