On Thu, 12 Jun 2003, Andrew Lapanik wrote:

> Hello Display,
> 
> First.
> We didn't discuss situation when application has more than one
> resourse bundle. In our projects we try to make orientation on not
> experienced developer who use well known JSTL <fmt> tag to show
> messages.
> In general, table column allways have some meta data for showing and
> processing its content. May be it will be logical and necessary step
> to include in column body some metadata tags, like <title>, so it will
> be possible to use ready features of other taglibs and not to
> implement them.

Seems like a good idea. Right now, can't you just define the title before 
the <display:table> and then include it in the attributes like 
title="<%=myCustomTitle%>"? This may not be optimal, but it prevents 
creating additional complexity in an already too complex tag.

> 
> Second.
> In connection we the previous I propose to create <decorator> tag
> inside column tag, that uses some simple template features decorate
> the content of the column, for example
> <display:column ...>
>   <display:decorate><b>{0}</b><display:decorate>
> </display:column>
> 
> using MessageFormat. Or any other convenient templates may be used.
> Here may be any other solution, but this can be the simpliest.
> It is not difficult to implement using predefined decorator for this
> case.

In my opinion, this behavior is outside the scope of this tag. If you are 
actually able to specify exactly what each table cell displays, then you 
can format it any way you'd like. I do agree that it would be useful if 
there was a nice decorator-like tag for displaying dates and prices and 
things.

> 
> Third.
> It is possible to create another tag, for example <control> that is
> the extension of <decorate> for showing active elements inside table
> cell. Creating this tag we can incapsulate the variation of inputs,
> textarea and select html in this tag for convenient creation of
> controls and may be processing event for editing selected row in
> table. Example
>   <disp:column...>
>     <disp:control type="textarea" name="text_{0}" rows="5"/>{0}</disp:control>
>   </disp:column>
> If we need something special, we use <decorate> tag.

How is this different from allowing the user to create the input fields 
directly? What would be wrong with this much simpler solution?

<display:column...>
  <input type="textarea" name="whatever">
</display:column>

> 
> And the last question, i don't understand clearly, what do we wait
> from refactored code by John York in this situation. May be processing
> variables like ${status.index}? Or how it is connected with discussed
> questions?

Because it solves 2 of your three problems above. If the tag worked like 
an iterate tag, you could do this:

<display:table id="myBean" name="myCollection"...>
  <display:column title="Column1">
    Completely customizable content: 
    <bean:write name="myBean" property="anyBeanVar"/>  
  </diaply:column>
</display:table>

You can also nest any other existing JSP tag within <display:table>, so 
you could do things like optionally displaying certain columns based on 
some external criteria. This was one of the main reasons I refactored the 
code, because I have a report in my webapp that allowed the user to 
specify which columns to display.

John



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to