Stephen,

I don't know if this will help or not, but I solved this problem recently
with JSTL. Very neat, but it came from using the SQL tags in the jsp (UGH,
not pretty). I can send you more if this will help. It takes it info from
the sql result set returned and therefore will configure the resulting html
table, headers and all, on the fly, which is what I needed at the time.

Let me know,

Steve Chambers



|---------+--------------------------------------------------------->
|         |           Stephen Davidson <[EMAIL PROTECTED]>          |
|         |           Sent by:                                      |
|         |           [EMAIL PROTECTED]|
|         |           amework.com                                   |
|         |                                                         |
|         |                                                         |
|         |           09/30/2003 05:16 PM                           |
|         |           Please respond to developers                  |
|         |                                                         |
|---------+--------------------------------------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       [EMAIL PROTECTED]                                                  
               |
  |       cc:                                                                          
                          |
  |       Subject:  Re: [Keelgroup] Struts Headache, help?                             
                          |
  
>--------------------------------------------------------------------------------------------------------------|




Hi Michael.

Order is definately NOT being preserved.  Part of the problem may be (and
will eventually be) the fact that the titles come from one table, and the
data may (or may not) be loaded from another table.

I did have a look at the "List" model in CRUD, but it is guaranteed to be
pulling headers and data from the same table.  Its also doing some
additional stuff that I am not at the moment, and I am having some trouble
following
some of what it is doing.

Bottom line, I am seeing Titles and columns that are not being displayed in
the same order.  Specifically, columns are all displayed lined up, but not
necessarily under their correct titles.

I already have the outputs placed by column name, so I am trying to figure
out how to fish them out again.  One of the requirements I am looking at is
the ability to rearrange the order of the columns displayed on the fly, so
being able to call the stuff back out on demand would be a great help.

Thanks,
Steve


Michael Nash JGlobal.com wrote:
> Steve:
>
> If you "load" the columns in the right order (e.g. the same order as the
headers when constructing the outputs in the model), this order should be
preserved I believe. The other way to do it is to "name" each of the nested
inputs, and fish them back out by name (e.g. col1, col2, col3), rather than
just iterating over the collection, but that's a bit awkward.
>
> Are you finding the order is not being preserved at the moment?
>
> I believe we do a similar thing in CRUD (in the "list" model), and it
always seems to be in the right order.
>
> Mike
>
>
>
> On Tue, 30 Sep 2003 13:45:00 -0500
> Stephen Davidson <[EMAIL PROTECTED]> wrote:
>
>
>>Greetings.
>>
>>I have run into an odd situation, and I am looking for some input on how
to handle it.  Specifically, I have a "Boss" table (in this case Archive),
and several smaller tables, but with identical Columns (Sets).  The other
>>tables are basically mirroring whats on various media devices (raid
arrays, raid racks, DVD Juke Box sets, etc).
>>
>>Now, the Archive table basically defines the whole thing, so I am pulling
the titles for the columns from that.  The question is, how do I ensure
that the data from another table is loaded/displayed with the columns in
the
>>same order as the headers?
>>
>>My current method is not working, and my Struts is not good enough to
figure a way to make this work.
>>
>>Thanks,
>>Steve
>>
>>
>><table align="center" cellspacing="0" border="1" cellpadding="2">
>>           <!-- Header Row -->
>>           <tr>
>>                       <logic:iterate id="clipTitle" name
="editClipTitles" property="nested">
>>                 <td><bean:write name="clipTitle"/></td>
>>                       </logic:iterate>
>>           </tr>
>>           <!-- Table Body -->
>>           <logic:iterate id="row" name="clipValues" property
="nested"><tr>
>>                       <logic : iterate id="fieldValue" name="row"
property="nested"><td>
>>                       <bean : write name="fieldValue"/>
>>           </td></logic:iterate>
>>           </tr></logic:iterate>
>></table>
>>
>>--
>>Java/J2EE Developer/Integrator
>>Co-Chair, Dallas/FortWorth J2EE Sig
>>214-724-7741
>>
>
> Michael Nash
>
> JGlobal Ltd.
>  http://www.jglobal.com
>
> Bahamas Commerce and Trade
> http://www.bahamascommerce.com
>
>


--
Java/J2EE Developer/Integrator
Co-Chair, Dallas/FortWorth J2EE Sig
214-724-7741


http://keelframework.org/documentation
Keelgroup mailing list
[EMAIL PROTECTED]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com





http://keelframework.org/documentation
Keelgroup mailing list
[EMAIL PROTECTED]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com

Reply via email to