>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 28 May 2003 3:02 p.m.
> To: [EMAIL PROTECTED]
> Subject: Basic CRUD
>
> I am putting together a simple web app that performs CRUD operations on a
> database table.  The web app consists of 1 jsp page which handles all CRUD
> actions.  The first part of the page contains a form with 2 fields and
> 'create' and 'retrieve' buttons.  Both these functions work fine.  When a
> 'retrieve' (select id,field1,field2 from table1) is done, a table is
> rendered with the resultset on the same page.  For each record of the
> recordset, there exists an 'update' and 'delete' button.  The problem is
> how do I tell my action class which record to act on?

The difficulty of this kind of problems is that there is no *standard* way
to
handle CRUD operations in general. However, the just unveiled Carrier
allows you to visually compose hyper action wizards. In particular, the
demo for the Ant Project Configuration has a lot of CRUD operations.

If I understand your business problem, here is a very similar situation:
an Ant project may contain several targets, so there are CRUD operations
on the targets. For each target, there are several tasks. So we have
CRUD operations on the tasks. For each task, there might be several
nested attributes, so more CRUD operations. Some we do it on the
same page, some we do it on different page in the demo. There are
total of 39 pages just for this demo with nested level up to 5.

This demo is done exclusively within Struts. No javascript! Even
there is no custom code for this demo. You compose
the Ant Project Configuration as hyper action wizards completely
within Carrier rich client. And any submited forms will be automatically
persisted and restored for you as necessary.

The algorithms that makes this happen is called Wheels. When you
download Carrier at www.netspread.com, the source codes for the
Wheels will be available for you.

Jing

>
> class MyFormBean extends ActionForm {
>    private MyBean myBean;
>    private ArrayList myBeanList;
> }
>
> class MyBean {
>    private Long id;
>    private String field1;
>    private String field2;
> }
>
>
> The idea is to manage this 1 particular db table from a single view with a
> single action class extended from LookupDispatchAction.  I've tried
> several ways with no success.  I've tried using 1 form that includes
> everything.  I've tried using a form for each record.  I've tried using
> the nested taglib.  I believe this is view/jsp/taglib problem since the
> actions are firing correctly.  How can I populate 'myBean' with the data
> of the corresponding record from which the 'update' or 'delete' buttons
> were clicked?
>
> I prefer not to use checkboxes with a global 'update' and 'delete' button.
>  I prefer not to use javascript (I'm not a big fan of this scripting
> language and only use it when absolutely necessary, which is rare).  I
> prefer not to go to a second page to "edit".
>
> Can this be done exclusively within Struts?
>
> Thanks in advance.
> -Eric
>
>
> ---------------------------------------------------------------------
> 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]
>
>


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

Reply via email to