You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ron <mp...@vollbio.de> on 2005/03/12 20:52:44 UTC

table layout of radio buttons and others

Hi,
I am trying to lay out radio buttons to list members in a table, two in
a line.

I tried to use @Foreach (index="ognl:i"), with a

<span jwcid="@Condition" condition="ognl:i % 2 == 1">
    </tr><tr>
</span>

inside the foreach, which would have add a "row break". Tapestry won't
allow that.
This seems to me a quite frequent task.

Since I saw no solution for that, I added an 'every' parameter to the
Foreach, and made the 'element' be added only every X times of the
iteration (and be closed once at the end of the iteration if the 'every'
was no full covered).

Should I submit a Patch?

Cheers,
Ron





---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: table layout of radio buttons and others

Posted by Hanson Char <ha...@gmail.com>.
> Back to ron's question: once this feature is in, Table, among other
> components, could store the state in the URL and make your app stateless. 

There is a length limitation as to how far a URL can go.  When you say
"store the state in the URL", do you also mean the storing
automatically in the form of hidden fields to bypass the length
limitation ?  Otherwise, it won't work in the general case.

H


On Sun, 13 Mar 2005 10:26:03 +0200, Mind Bridge <mi...@yahoo.com> wrote:
> Hi,
> 
> > It would be great if you could take a look at my posting at the users
> > list regarding NullTableSessionStateManager :)
> 
> If I understand correctly, you want the sorting and paging information to be
> stored in the URL, rather than the session.
> 
> NullTableSessionStateManager is an implementation of
> ITableSessionStateManager that simply tells the component not to do extract
> the state information at all. You are probably more interested in
> ITableSessionStoreManager instead, even though it would not help at the
> moment either (as described below). It usually is used to manually store
> that information somewhere else, like in the Visit if it is to be shared
> among multiple pages.
> 
> At the moment, unfortunately, Tapestry has NO mechanism to persist
> information in the URL (rather than in the session), either as persistent
> properties, or in any other form. This is a feature marked for 3.1, but it
> is not there yet either. Howard has done almost everything related to it,
> but that final step is missing.
> 
> Again, there are a hell of lot of things dependent on that very feature, as
> described in other emails on this list.
> 
> *** Howard, do you plan to add that soon, given that what has been
> implemented so far is almost there? Or should I do it myself, following what
> you've done?
> 
> Back to ron's question: once this feature is in, Table, among other
> components, could store the state in the URL and make your app stateless. It
> will also be possible to do that by providing your own implementation of
> ITableSessionStoreManager relatively easily. At the moment, however, I am
> afraid that is a problem.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: table layout of radio buttons and others

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

> It would be great if you could take a look at my posting at the users
> list regarding NullTableSessionStateManager :)

If I understand correctly, you want the sorting and paging information to be
stored in the URL, rather than the session.

NullTableSessionStateManager is an implementation of
ITableSessionStateManager that simply tells the component not to do extract
the state information at all. You are probably more interested in
ITableSessionStoreManager instead, even though it would not help at the
moment either (as described below). It usually is used to manually store
that information somewhere else, like in the Visit if it is to be shared
among multiple pages.

At the moment, unfortunately, Tapestry has NO mechanism to persist
information in the URL (rather than in the session), either as persistent
properties, or in any other form. This is a feature marked for 3.1, but it
is not there yet either. Howard has done almost everything related to it,
but that final step is missing.

Again, there are a hell of lot of things dependent on that very feature, as
described in other emails on this list.


*** Howard, do you plan to add that soon, given that what has been
implemented so far is almost there? Or should I do it myself, following what
you've done?


Back to ron's question: once this feature is in, Table, among other
components, could store the state in the URL and make your app stateless. It
will also be possible to do that by providing your own implementation of
ITableSessionStoreManager relatively easily. At the moment, however, I am
afraid that is a problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: table layout of radio buttons and others

Posted by ron <mp...@vollbio.de>.
Hi,
Thanx, I find my solution eleganter, also as a custom Foreach component
in my app... but others mights benefit also from it...

<span jwcid="@Foreach" ... element="tr" every="2">
<td>....
</span>


It would be great if you could take a look at my posting at the users
list regarding NullTableSessionStateManager :)
Cheers,
Ron


ציטוט Mind Bridge:


>Hi,
>
>Something related: please have a look at the Splitter class in the 'Useful
>Classes' library on T-Deli (www.t-deli.com). It allows you to split your
>array into a matrix (a table) and then you can render it as you want with a
>Foreach in a Foreach without the problems encountered.
>
>
>----- Original Message ----- 
>From: "ron" <mp...@vollbio.de>
>To: <ta...@jakarta.apache.org>
>Sent: Saturday, March 12, 2005 9:52 PM
>Subject: table layout of radio buttons and others
>
>
>  
>
>>Hi,
>>I am trying to lay out radio buttons to list members in a table, two in
>>a line.
>>
>>I tried to use @Foreach (index="ognl:i"), with a
>>
>><span jwcid="@Condition" condition="ognl:i % 2 == 1">
>>    </tr><tr>
>></span>
>>
>>inside the foreach, which would have add a "row break". Tapestry won't
>>allow that.
>>This seems to me a quite frequent task.
>>
>>Since I saw no solution for that, I added an 'every' parameter to the
>>Foreach, and made the 'element' be added only every X times of the
>>iteration (and be closed once at the end of the iteration if the 'every'
>>was no full covered).
>>
>>Should I submit a Patch?
>>
>>Cheers,
>>Ron
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: table layout of radio buttons and others

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

Something related: please have a look at the Splitter class in the 'Useful
Classes' library on T-Deli (www.t-deli.com). It allows you to split your
array into a matrix (a table) and then you can render it as you want with a
Foreach in a Foreach without the problems encountered.


----- Original Message ----- 
From: "ron" <mp...@vollbio.de>
To: <ta...@jakarta.apache.org>
Sent: Saturday, March 12, 2005 9:52 PM
Subject: table layout of radio buttons and others


> Hi,
> I am trying to lay out radio buttons to list members in a table, two in
> a line.
>
> I tried to use @Foreach (index="ognl:i"), with a
>
> <span jwcid="@Condition" condition="ognl:i % 2 == 1">
>     </tr><tr>
> </span>
>
> inside the foreach, which would have add a "row break". Tapestry won't
> allow that.
> This seems to me a quite frequent task.
>
> Since I saw no solution for that, I added an 'every' parameter to the
> Foreach, and made the 'element' be added only every X times of the
> iteration (and be closed once at the end of the iteration if the 'every'
> was no full covered).
>
> Should I submit a Patch?
>
> Cheers,
> Ron
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org