> 
> >Is there a detailed description or running demo of this concept? I'm 
> >trying to figure out exactly what an 'editable table' is.
> >
> >At first glance, it seems like this logic could be handled in a
> >JSP body.  Is there more that I am missing?
> >  
> >
> Perhaps calling it an editable table isn't exactly correct. What I am 
> talking about is creating a table which contains form 
> controls, and the 
> names and values of those form controls can be controlled via the tag 
> itself. For example imagine I have a list of employees displayed in a 
> table, and there is a text box in one of the rows for their telephone 
> extension. You enter a value and submit the form. The code 
> handling the 
> submit (for example struts) will have to identify from the 
> name of the 
> form control which telephone extension you are actually changing. You 
> can easily create a ColumnDecorator to create a text field with the 
> correct value in it, but you cannot properly name the field 
> as you have 
> no real idea as to where the cell occurs - you don't know if its the 
> first row or the 30th.

1) If there is a natural primary key, like a phone_id, then I would use 
that in a hidden field.

2) If there isn't a natural primary, would access to the index 
number suffice?  Take a look at
http://java.sun.com/webservices/docs/1.0/api/javax/servlet/jsp/jstl/core
/LoopTagStatus.html

this is what the JSTL tags expose via the varStatus attribute.  I'm
thinking
about about proposing a varStatus implementation for displaytag, it
would
be useful for a large set of problems.

I have to admit, I'm overall skeptical of having a tag that did CRUD on
the 
list data itself.  IMHO, it seems like this is either business logic or 
custom control logic that is best left to the individual apps.

Maybe displaytag should have a third party extensions page (like struts
does
at http://jakarta.apache.org/struts/resources/extensions.html) that
links to
various useful extensions.  Extensions are non-core, but semi-endorsed
code 
that may or may not migrate to the core (a la Validator). My portlet
hack would likely end up there; I 
think this proposal might also fit there as well.  


> 
> -- 
> sam
> http://www.magpiebrain.com/
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program. 
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?   SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/ 
> _______________________________________________
> displaytag-devel mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-devel
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to