Re: Palette component

2009-02-18 Thread jgn

I had the same problem. I am not sure what of the 5 things I did was the one
that help, but what I did was:

Implements Serializable
Implements Comparable
Override equals
Override hashcode
Override toString

I am not sure how is implemented the Pallete, but most of the time is a good
practice to implement this methods or override them if you are going to use
your beans with other components. 

Serializable: so the components can serialize them, logic :D
Comparable: It is used to reorder your beans on a list, or other things
equals: well, how would other classes or components would know if one of
your beans is equals to other if you do not override this ?.
Hashcode: Used on some kinds Maps, lists, etc, to get faster searches, or
something like this.
toString: well, u know
-- 
View this message in context: 
http://www.nabble.com/Palette-component-tp21678790p22090942.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: problem with t:formdata

2009-01-08 Thread jgn

Thank you, It works :). I think that I won't have any problem because I do
not have fields on the loop, just LinkSubmit components, thank you.


Fernando Padilla wrote:
> 
> by default t:loop serializes the source list into t:formdata, so that in 
> can have predictable form processing.  But if you can reconstitute the 
> source list used by the loop, and understand that the form might behave 
> erratic in some edge cases ( if the list changes between form render and 
> form handling ).
> 
> Then just look at the volatile flag on the loop component:
> 
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Loop.html
> 
> 
> 
> jgn wrote:
>> t:formdata is too big on a page that I have (5MB or more).
>> 
>> I have a form with only 12 fields and I display a table with 14 rows, the
>> problem is that if the loop component that displays the tables is inside
>> the
>> form, the t:formdata becomes huge. If is not inside the form, it works
>> just
>> fine :D.
>> 
>> The loop is throw a list of beans. Is a complex structure because that
>> beans
>> have properties that are beans too and so, but what I display is not all
>> the
>> info, just a couple of fields. I have all the information on memory to
>> save
>> time loading from DB, etc, that is why the info is big.
>> 
>> The problem seems to be (or I suppose, but not sure)  that the loop
>> component is serializing the beans and including them on the t:formdata
>> field. If this is true, is there a way to tell the loop component not to
>> serialize the beans ?, I mean, if they are not part of the form, why
>> serialize them ?.
>> 
>> I keep the loop inside the form because at the end of the table I have a
>> submit component, I need to keep it there for a reason long to explain,
>> so
>> to keep a short post, what can I do to keep the t:formdata smaller ? (the
>> response from tapestry is fast, but firefox takes a long time to display
>> the
>> results, from 3 to 4 seconds, because the size of the page)
>> 
>> Thank you.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/problem-with-t%3Aformdata-tp21366619p21366944.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: using prop: binding to evaluate an expression?

2009-01-08 Thread jgn

There is a Link to t5components on the tapestry home page. there you can find
a way to use ognl on t5 while t5.1 is released:

http://87.193.218.134:8080/t5components/t5c-commons/howto_ognlbinding.html

Just download the jars (do not forget the dependencies) and you can use
ognl.

I have used and works the same like t4, of course I try to use it as few as
posible but sometimes it save you time and reduce your page code.

-- 
View this message in context: 
http://www.nabble.com/using-prop%3A-binding-to-evaluate-an-expression--tp21352618p21366758.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



problem with t:formdata

2009-01-08 Thread jgn

t:formdata is too big on a page that I have (5MB or more).

I have a form with only 12 fields and I display a table with 14 rows, the
problem is that if the loop component that displays the tables is inside the
form, the t:formdata becomes huge. If is not inside the form, it works just
fine :D.

The loop is throw a list of beans. Is a complex structure because that beans
have properties that are beans too and so, but what I display is not all the
info, just a couple of fields. I have all the information on memory to save
time loading from DB, etc, that is why the info is big.

The problem seems to be (or I suppose, but not sure)  that the loop
component is serializing the beans and including them on the t:formdata
field. If this is true, is there a way to tell the loop component not to
serialize the beans ?, I mean, if they are not part of the form, why
serialize them ?.

I keep the loop inside the form because at the end of the table I have a
submit component, I need to keep it there for a reason long to explain, so
to keep a short post, what can I do to keep the t:formdata smaller ? (the
response from tapestry is fast, but firefox takes a long time to display the
results, from 3 to 4 seconds, because the size of the page)

Thank you.
-- 
View this message in context: 
http://www.nabble.com/problem-with-t%3Aformdata-tp21366619p21366619.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5components - Window

2008-07-24 Thread jgn

Maybe this would work:

You can use the t5componens/OnEvent mixin on a button or, maybe, on an
action link (I only have test this component on a textfield with the blur
event). Then, this mixin has a parameter called: onCompleteCallback, which
will call a javascript function when the ajax response finish. So, in this
javascript function you could open the window.

I mean, this would work if the idea is just to call a function on the server
side before open the window.

Hope this helps.
-- 
View this message in context: 
http://www.nabble.com/t5components---Window-tp18087605p18644933.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Encoding problem (UTF-8)

2008-05-16 Thread jgn

Hi. The problem was tomcat's version. On Ubuntu I was using tomcat 5.5
 and on Windows Tomcat 6. I just installed Tomcat 5.5 on Windows too and
 the problem was fixed. Of course you need to put the URIEncoder on the
 connectors of tomcat, add the the parameter -Dfile.encoding=UTF-8 to
 JAVA_OPTS, change the IDE to UTF-8, etc. 
-- 
View this message in context: 
http://www.nabble.com/Encoding-problem-%28UTF-8%29-tp16984643p17275086.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Encoding problem (UTF-8)

2008-04-30 Thread jgn

Hi. I am having a problem with encoding. I was using ISO-8859-1 but the
Autocomplete did not display the right way some characters (accutes) so I
decide to change all to UTF-8 (including the -Dfile.encoding=UTF-8, changing
the editor to UTF-8 and the URIEncoder to the connectors on the server.xml).
The problem with the autocomplete component is already fixed with this
changes, but I am using too the OnEvent component from t5components. The
function on the server side returns a JSONObject but :|, again, there are
problems with some characters (non US-ASCII characters).

I develop in Ubuntu and changing all to UTF-8 fixed both problems, but on
Windows dose not works with the JSONObject. The database is on UTF-8, all
data is saved ok, the only problem I get is when returning data on a
JSONObject.

Any idea ? :|

Thank you.
-- 
View this message in context: 
http://www.nabble.com/Encoding-problem-%28UTF-8%29-tp16984643p16984643.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5, Search and Grid Component

2008-04-20 Thread jgn

Hi. I have a simple page where I do a Search with a couple of fields that act
as filters. I use a flash strategy to persist the fields. I show the results
on a grid component.

The problem is that, when I try to reorder the grid for an specific column I
loose the filter values. I do not want to use a session strategy for the
persistence of the fields because, when I change to another page and then
back to the search page, the filter values are kept and I do not want this
and, well, persist this kind of fields on the session, what a waste of
memory.

Any Idea of what can I do ?.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/T5%2C-Search-and-Grid-Component-tp16801551p16801551.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5, Change default messeges

2008-04-20 Thread jgn

Hi. I would like to know how could I change the default messages for the
validator. I am from Mexico, so the default messages are in English. Is
there a way to change them to spanish ?.

Thank you.
-- 
View this message in context: 
http://www.nabble.com/T5%2C-Change-default-messeges-tp16801040p16801040.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Submit component and Zone Component

2008-04-13 Thread jgn

Hi. I have a page where I use the Zone component. Something like this:



 

...
...

...
...

...
...




As you can see, I have 2 Submit buttons. So I have these functions on my
page:

void onSelectedFromGrabar() {
...
}

void onSelectedFromCopiardir(){
...
}

The problem is that pressing any of the 2 submit buttons The function that
is called is onSelectedFromCopiardir(). If I do not use the Zone component
every thing works fine.

Any Idea ?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Submit-component-and-Zone-Component-tp16670494p16670494.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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