Re: Memory issues with Tapestry 4.1.x

2007-09-07 Thread mraible

I was able to fix the OOM issue in Tapestry by bumping up the memory for
Maven by just a bit. For example, it'll fail no matter what I set JAVA_OPTS
to, but if I change MAVEN_OPTS from "" to "
-- 
View this message in context: 
http://www.nabble.com/Memory-issues-with-Tapestry-4.1.x-tf4387514.html#a12567155
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: Context.xml

2007-09-07 Thread Nick Westgate

Please reply to your original thread if you solve your problem.

Because we care but are busy, and don't want to write unnecessary emails. ;-)

Cheers,
Nick.


Jean-Philippe Steinmetz wrote:

Thanks for the response. I actually was able to solve my own problem after
some very lengthy troubleshooting. I'm using Tomcat as my web server so
context.xml is what it uses for resource definitions. Anyway, I was missing
mysql-connector and commons-jdbc jars from my war package.

Jean-Philippe


-Original Message-
From: Fidel Chavarria [mailto:[EMAIL PROTECTED]
Sent: Friday, September 07, 2007 2:53 PM
To: users@tapestry.apache.org
Subject: RE: Context.xml



Hi,

 What is context.xml...  Are you using Spring ?
 What framework are you using to access your database ?

you need to post more explicit details ...





Jean-Philippe Steinmetz-2 wrote:

Btw I'm  using tapestry 5.


-Original Message-
From: Jean-Philippe Steinmetz [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 06, 2007 4:16 PM
To: 'Tapestry users'
Subject: Context.xml

I've discovered a new problem of mine that concerns the context.xml

file.



I access a mysql database in my framework that is referenced by my
context.xml file as a resource. I have my context.xml in the correct
directory src/main/webapp/META-INF but for some reason I keep getting

an

error when I do a lookup for the resource. Is Tapestry using its own
context
file I'm not aware of? How do I add my resource to the correct context
file
so that I can get my database connection? Thanks in advance.



Jean-Philippe Steinmetz




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




--
View this message in context: http://www.nabble.com/Context.xml-
tf4395210.html#a12563929
Sent from the Tapestry - User mailing list archive at Nabble.com.


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





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




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



Re: Input Validation example

2007-09-07 Thread Nick Westgate

[ERROR] Login Embedded component(s) form are defined within component class
edu.usc.k12.cpanel.pages.Login, but are not present in the component
template.


Yeah, there is a small bug in the template error reporting.

 is a component of type "Form" that is assigned a default id,
and that's the same as the type name "form". This matches Form _form.

To get rid of the error use:


You could use a better name than form though, like loginForm. ;-)


(Sorry I didn't post that earlier - I've been busy, and sick.)


if(!userExists) return new Login();

From what I gather this is the correct way to send a class? Anyhow, it
doesn't work so instead I put

if(!userExists) return "Login";


The valid return types are described here, though examples would be better:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

new Login() is a POJO which Tapestry doesn't know what to do with.
Login.class is what you are looking for to allow safe refactoring.


Which seems to work fine, except it won't work on the Start page. For some
reason that page just serves up an empty page. However, it could be
something else I haven't figured out yet, like this problem with the other
items. If you have any thoughts on these weird inconsistencies it'd be
helpful. Thanks.


Yes, there is also a bug in redirection from the root URL.
You've done well to find these 2 bugs in such a short time. ;-)

If you really need to, you can patch bug #2 at runtime until it's fixed:
http://wiki.apache.org/tapestry/Tapestry5RootPathEmptyResponse
(A simple introduction to the power of tapestry-ioc.)

Cheers,
Nick.

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



Re: Comment about Tapestry's growth

2007-09-07 Thread Jesse Kuhnert
Geez those guys are such ass clowns.

I wonder what the average kind of shop is that employs JSF engineers
anyways?  A factory of internal one off app developers?  (not that
internal apps are bad)

Searching on dice.com shows lots of "eh" employers for JSF while under
Tapestry I see fun looking names like
E*Trade/eBay/zillow/Expedia/etc

It's not always important to be the most popular,  just being the best
is fine by me.

On 9/7/07, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> If you take a closer look at the comments you'll see that JSF isn't all
> that hot after all, and the way the author came up with the numbers is
> questionable at best, so there's really nothing to see here.
>
> -Filip
>
> kranga skrev:
> > http://www.javalobby.org/java/forums/t101110.html
> >
> > Tapestry, despite being a strong competitor to JSF, has gone virtually
> > no where. once it is experienced its initial growth spurt after being
> > released. It's basically flat. Unlike the Ruby on Rails vs. Spring data,
> > the data at dice.com seems to support this one. There are currently only
> > 87 jobs listed for Tapestry. This part is hard to debate no matter how
> > you spin the numbers. Tapestry is virtually flat as far as having any
> > kind of growth.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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



RE: Context.xml

2007-09-07 Thread Jean-Philippe Steinmetz
Thanks for the response. I actually was able to solve my own problem after
some very lengthy troubleshooting. I'm using Tomcat as my web server so
context.xml is what it uses for resource definitions. Anyway, I was missing
mysql-connector and commons-jdbc jars from my war package.

Jean-Philippe

> -Original Message-
> From: Fidel Chavarria [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 07, 2007 2:53 PM
> To: users@tapestry.apache.org
> Subject: RE: Context.xml
> 
> 
> 
> Hi,
> 
>  What is context.xml...  Are you using Spring ?
>  What framework are you using to access your database ?
> 
> you need to post more explicit details ...
> 
> 
> 
> 
> 
> Jean-Philippe Steinmetz-2 wrote:
> >
> > Btw I'm  using tapestry 5.
> >
> >> -Original Message-
> >> From: Jean-Philippe Steinmetz [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, September 06, 2007 4:16 PM
> >> To: 'Tapestry users'
> >> Subject: Context.xml
> >>
> >> I've discovered a new problem of mine that concerns the context.xml
> file.
> >>
> >>
> >>
> >> I access a mysql database in my framework that is referenced by my
> >> context.xml file as a resource. I have my context.xml in the correct
> >> directory src/main/webapp/META-INF but for some reason I keep getting
> an
> >> error when I do a lookup for the resource. Is Tapestry using its own
> >> context
> >> file I'm not aware of? How do I add my resource to the correct context
> >> file
> >> so that I can get my database connection? Thanks in advance.
> >>
> >>
> >>
> >> Jean-Philippe Steinmetz
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/Context.xml-
> tf4395210.html#a12563929
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



RE: Context.xml

2007-09-07 Thread Fidel Chavarria


Hi,

 What is context.xml...  Are you using Spring ?
 What framework are you using to access your database ?

you need to post more explicit details ...





Jean-Philippe Steinmetz-2 wrote:
> 
> Btw I'm  using tapestry 5.
> 
>> -Original Message-
>> From: Jean-Philippe Steinmetz [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, September 06, 2007 4:16 PM
>> To: 'Tapestry users'
>> Subject: Context.xml
>> 
>> I've discovered a new problem of mine that concerns the context.xml file.
>> 
>> 
>> 
>> I access a mysql database in my framework that is referenced by my
>> context.xml file as a resource. I have my context.xml in the correct
>> directory src/main/webapp/META-INF but for some reason I keep getting an
>> error when I do a lookup for the resource. Is Tapestry using its own
>> context
>> file I'm not aware of? How do I add my resource to the correct context
>> file
>> so that I can get my database connection? Thanks in advance.
>> 
>> 
>> 
>> Jean-Philippe Steinmetz
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Context.xml-tf4395210.html#a12563929
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: [ANN] Tacos 4.1.0 release

2007-09-07 Thread Shing Hing Man
I have deployed the Tacos Demo 4.1.1 on my server at

http://lombok.demon.co.uk/tacosDemo41/app


Shing


--- andyhot <[EMAIL PROTECTED]> wrote:

> I should grab this opportunity in order to also
> thank Shing Hing Man for 
> his contributions...
> 
> Thx Shing!
> 
> Martino Piccinato wrote:
> > It's working perfectly. Thanks again for tacos, I
> think tapestry isn't
> > really complete without  it. The new DojoWidget
> component is great :-)
> >
> > On 9/6/07, Igor Drobiazko
> <[EMAIL PROTECTED]> wrote:
> >   
> >> On 9/6/07, Martino Piccinato
> <[EMAIL PROTECTED]> wrote:
> >> 
> >>> have you tested DojoWidget with menus?
> >>>   
> >> DojoWidget was tested with examples in the demo
> application. Please explore
> >> the demo app.
> >> Do you mean dojo.widget.Menu2? There is no
> example for this widget.
> >> You can try it out and report bugs, if you find
> some.
> >>
> >> 
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >   
> 
> -- 
> Andreas Andreou - [EMAIL PROTECTED] -
> http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page : http://www.lombok.demon.co.uk/



  ___ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html

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



Re: Comment about Tapestry's growth

2007-09-07 Thread Filip S. Adamsen
If you take a closer look at the comments you'll see that JSF isn't all 
that hot after all, and the way the author came up with the numbers is 
questionable at best, so there's really nothing to see here.


-Filip

kranga skrev:

http://www.javalobby.org/java/forums/t101110.html

Tapestry, despite being a strong competitor to JSF, has gone virtually 
no where. once it is experienced its initial growth spurt after being 
released. It's basically flat. Unlike the Ruby on Rails vs. Spring data, 
the data at dice.com seems to support this one. There are currently only 
87 jobs listed for Tapestry. This part is hard to debate no matter how 
you spin the numbers. Tapestry is virtually flat as far as having any 
kind of growth.



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




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



RE: Comment about Tapestry's growth

2007-09-07 Thread Mark Stang
Or if you want to get anything done, you need A LOT of programmers.

Mark J. Stang
Software Engineer
office: +1 303.468.2900
Ping Identity



-Original Message-
From: kranga [mailto:[EMAIL PROTECTED]
Sent: Fri 9/7/2007 2:14 PM
To: Tapestry users
Subject: Comment about Tapestry's growth
 
http://www.javalobby.org/java/forums/t101110.html

Tapestry, despite being a strong competitor to JSF, has gone virtually no 
where. once it is experienced its initial growth spurt after being released. 
It's basically flat. Unlike the Ruby on Rails vs. Spring data, the data at 
dice.com seems to support this one. There are currently only 87 jobs listed 
for Tapestry. This part is hard to debate no matter how you spin the 
numbers. Tapestry is virtually flat as far as having any kind of growth.


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




Comment about Tapestry's growth

2007-09-07 Thread kranga

http://www.javalobby.org/java/forums/t101110.html

Tapestry, despite being a strong competitor to JSF, has gone virtually no 
where. once it is experienced its initial growth spurt after being released. 
It's basically flat. Unlike the Ruby on Rails vs. Spring data, the data at 
dice.com seems to support this one. There are currently only 87 jobs listed 
for Tapestry. This part is hard to debate no matter how you spin the 
numbers. Tapestry is virtually flat as far as having any kind of growth.



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



Re: [info] Tapestry >= 4.1.2 memory issues potentially fixed in latest 4.1.3-SNAPSHOT

2007-09-07 Thread Renat Zubairov
Thanks Jesse!

Solution of this bug was a clear sign for us to switch to the latests
Tapestry version.

Would be very nice to have a new release ASAP that we can use it in production.

Renat

On 07/09/2007, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> Short version:
>
> Some users have brought up what appears to be a genuine memory
> consumption bug in the new OGNL expression compiling integration with
> Tapestry.   The good news is that we think(hope) it has now been
> addressed and fixed and would urge anyone experiencing any abnormally
> high memory usage of their Tapestry apps based around version 4.1.2 or
> greater to give the latest 4.1.3-SNAPSHOT version a try.
>
> Longer version:
>
> This issue doesn't have anything to do with OGNL itself,  just my
> implementation of the new compiler api it provides within Tapestry.
> The core reason for the high memory consumption is based around the
> javassist class pool that is used when generating and compiling
> "anything" in Tapestry - which also includes these new compiled OGNL
> expressions.
>
> The bug itself had to do with me generating javassist classes
> needlessly on expressions that weren't compilable ~yet~.   This is
> also probably why only a few people have seen this issue while others
> have been chugging along just fine.
>
> The yet part comes in when you are dealing with an expression where
> all object types involved in the expression can't be known yet.  For
> example,  suppose you had a state object looking something like this:
>
> public class UserState implements Serializable {
>
> User _user;
>
> public User getUser()
> {
> return _user;
> }
>
> public void setUser(User user)
> {
> _user = user;
> }
> }
>
> public class User implements Serializable {
>
> String _name;
>
> public String getName()
> {
>  return _name;
> }
> }
>
> and you needed to display the user name which you check in an ognl
> expression doing something like this:
>
> Hello,  
>
> If the user object isn't null when this expression is compiled then
> all is well and everything works great.   If the user object ~is~ null
> however,  the expression can't be compiled to native code yet because
> we have to do a lot of introspection and class hierarchy walking to
> determine the best classes to cast to in the generated java code.
> Tapestry falls back to using normal ognl evaluation in these instances
> ~until~ the user object isn't null - continually trying to compile and
> checking for this condition until it succeeds.  (there are instances
> where it gives up forever as well)
>
> The core bug was that I was interacting with javassist and setting up
> the new generated compiled expression classes ~before~ doing the work
> necessary to know whether or not the statement was compilable - so for
> every check a new javassist class was needlessly created and cached
> internally by javassist.
>
> In development mode this isn't much of an issue as we can clear out
> this cache of classes as often as we like - but in production we have
> to leave the cache in tact as it can never really be known that
> ~every~ component / page in the system has definitely been loaded and
> will never need to be referenced in another compiled statement again.
>
> I think I fixed the bug by doing a JIT sort of javassist class
> generation only after the majority of logic has passed that would
> normally result in Tapestry knowing whether or not any particular
> expression is compilable at all.
>
> Post Summary:
>
> Sorry to all for any worries/extra work this bug may have caused.
> I'm obviously very interested in hearing what peoples results are when
> using the new version.   Now that I've put things along the right path
> I'm sure that any remaining issues can be relatively quickly addressed
> and fixed once reported.
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Best regards,
Renat Zubairov

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



Re: [ANN] Tacos 4.1.0 release

2007-09-07 Thread andyhot
I should grab this opportunity in order to also thank Shing Hing Man for 
his contributions...


Thx Shing!

Martino Piccinato wrote:

It's working perfectly. Thanks again for tacos, I think tapestry isn't
really complete without  it. The new DojoWidget component is great :-)

On 9/6/07, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
  

On 9/6/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:


have you tested DojoWidget with menus?
  

DojoWidget was tested with examples in the demo application. Please explore
the demo app.
Do you mean dojo.widget.Menu2? There is no example for this widget.
You can try it out and report bugs, if you find some.




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


  


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


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



I couldn't get updated value of AutoCompleter

2007-09-07 Thread Owais

I tried following code..





when i get onChaneCountry Listener Invoked i get values J instead of Japan.

any help...

Thnx
-- 
View this message in context: 
http://www.nabble.com/I-couldn%27t-get-updated-value-of-AutoCompleter-tf4403134.html#a12561184
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: autocompleter can not use EventListener

2007-09-07 Thread Owais


Owais wrote:
> 
> I am trying samething. But my EventListener is invoked. I used following
> code.
> 
> < span jwcid="[EMAIL PROTECTED]:AjaxEventSubmit"
> updateComponents="ognl:{'tempDiv'}"
> effects="template:{highlight:{any:'[255,255,184], 500, 500'}}"
> listener="listener:onChaneCountry" />
> 
> < span jwcid="[EMAIL PROTECTED]:Autocompleter"
> listSource="ognl:searchList" value="ognl:currCountry"
> listener="listener:searchRepNumbers"
> eventListener="onchange=components.changeEvent.id" />
> 
> 
> 
> 
> 
> flyabovesun wrote:
>> 
>> I try bind one EventLister to an autocomplter. But it does not work. How
>> could I listen onblur or onfocus for autocompleter?
>> Thanks a lot
>> 
>> -- 
>> Haipeng Du
>> Software Engineer
>> Comphealth,
>> Salt Lake City
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/autocompleter-can-not-use-EventListener-tf3139025.html#a12561109
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: autocompleter can not use EventListener

2007-09-07 Thread Owais

I am trying samething. But my EventListener is invoked. I used following
code.









flyabovesun wrote:
> 
> I try bind one EventLister to an autocomplter. But it does not work. How
> could I listen onblur or onfocus for autocompleter?
> Thanks a lot
> 
> -- 
> Haipeng Du
> Software Engineer
> Comphealth,
> Salt Lake City
> 
> 

-- 
View this message in context: 
http://www.nabble.com/autocompleter-can-not-use-EventListener-tf3139025.html#a12561056
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: [info] Tapestry >= 4.1.2 memory issues potentially fixed in latest 4.1.3-SNAPSHOT

2007-09-07 Thread andyhot

That's an awesome bug report... thx for all the hard work Jesse.

P.S. I thought you were supposed to be on vacation!

Jesse Kuhnert wrote:

Short version:

Some users have brought up what appears to be a genuine memory
consumption bug in the new OGNL expression compiling integration with
Tapestry.   The good news is that we think(hope) it has now been
addressed and fixed and would urge anyone experiencing any abnormally
high memory usage of their Tapestry apps based around version 4.1.2 or
greater to give the latest 4.1.3-SNAPSHOT version a try.

Longer version:

This issue doesn't have anything to do with OGNL itself,  just my
implementation of the new compiler api it provides within Tapestry.
The core reason for the high memory consumption is based around the
javassist class pool that is used when generating and compiling
"anything" in Tapestry - which also includes these new compiled OGNL
expressions.

The bug itself had to do with me generating javassist classes
needlessly on expressions that weren't compilable ~yet~.   This is
also probably why only a few people have seen this issue while others
have been chugging along just fine.

The yet part comes in when you are dealing with an expression where
all object types involved in the expression can't be known yet.  For
example,  suppose you had a state object looking something like this:

public class UserState implements Serializable {

User _user;

public User getUser()
{
return _user;
}

public void setUser(User user)
{
_user = user;
}
}

public class User implements Serializable {

String _name;

public String getName()
{
 return _name;
}
}

and you needed to display the user name which you check in an ognl
expression doing something like this:

Hello,  

If the user object isn't null when this expression is compiled then
all is well and everything works great.   If the user object ~is~ null
however,  the expression can't be compiled to native code yet because
we have to do a lot of introspection and class hierarchy walking to
determine the best classes to cast to in the generated java code.
Tapestry falls back to using normal ognl evaluation in these instances
~until~ the user object isn't null - continually trying to compile and
checking for this condition until it succeeds.  (there are instances
where it gives up forever as well)

The core bug was that I was interacting with javassist and setting up
the new generated compiled expression classes ~before~ doing the work
necessary to know whether or not the statement was compilable - so for
every check a new javassist class was needlessly created and cached
internally by javassist.

In development mode this isn't much of an issue as we can clear out
this cache of classes as often as we like - but in production we have
to leave the cache in tact as it can never really be known that
~every~ component / page in the system has definitely been loaded and
will never need to be referenced in another compiled statement again.

I think I fixed the bug by doing a JIT sort of javassist class
generation only after the majority of logic has passed that would
normally result in Tapestry knowing whether or not any particular
expression is compilable at all.

Post Summary:

Sorry to all for any worries/extra work this bug may have caused.
I'm obviously very interested in hearing what peoples results are when
using the new version.   Now that I've put things along the right path
I'm sure that any remaining issues can be relatively quickly addressed
and fixed once reported.

  


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


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



Re: [ANN] Tacos 4.1.0 release

2007-09-07 Thread Martino Piccinato
It's working perfectly. Thanks again for tacos, I think tapestry isn't
really complete without  it. The new DojoWidget component is great :-)

On 9/6/07, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
> On 9/6/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:
> >
> >
> > have you tested DojoWidget with menus?
>
>
> DojoWidget was tested with examples in the demo application. Please explore
> the demo app.
> Do you mean dojo.widget.Menu2? There is no example for this widget.
> You can try it out and report bugs, if you find some.
>

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



[info] Tapestry >= 4.1.2 memory issues potentially fixed in latest 4.1.3-SNAPSHOT

2007-09-07 Thread Jesse Kuhnert
Short version:

Some users have brought up what appears to be a genuine memory
consumption bug in the new OGNL expression compiling integration with
Tapestry.   The good news is that we think(hope) it has now been
addressed and fixed and would urge anyone experiencing any abnormally
high memory usage of their Tapestry apps based around version 4.1.2 or
greater to give the latest 4.1.3-SNAPSHOT version a try.

Longer version:

This issue doesn't have anything to do with OGNL itself,  just my
implementation of the new compiler api it provides within Tapestry.
The core reason for the high memory consumption is based around the
javassist class pool that is used when generating and compiling
"anything" in Tapestry - which also includes these new compiled OGNL
expressions.

The bug itself had to do with me generating javassist classes
needlessly on expressions that weren't compilable ~yet~.   This is
also probably why only a few people have seen this issue while others
have been chugging along just fine.

The yet part comes in when you are dealing with an expression where
all object types involved in the expression can't be known yet.  For
example,  suppose you had a state object looking something like this:

public class UserState implements Serializable {

User _user;

public User getUser()
{
return _user;
}

public void setUser(User user)
{
_user = user;
}
}

public class User implements Serializable {

String _name;

public String getName()
{
 return _name;
}
}

and you needed to display the user name which you check in an ognl
expression doing something like this:

Hello,  

If the user object isn't null when this expression is compiled then
all is well and everything works great.   If the user object ~is~ null
however,  the expression can't be compiled to native code yet because
we have to do a lot of introspection and class hierarchy walking to
determine the best classes to cast to in the generated java code.
Tapestry falls back to using normal ognl evaluation in these instances
~until~ the user object isn't null - continually trying to compile and
checking for this condition until it succeeds.  (there are instances
where it gives up forever as well)

The core bug was that I was interacting with javassist and setting up
the new generated compiled expression classes ~before~ doing the work
necessary to know whether or not the statement was compilable - so for
every check a new javassist class was needlessly created and cached
internally by javassist.

In development mode this isn't much of an issue as we can clear out
this cache of classes as often as we like - but in production we have
to leave the cache in tact as it can never really be known that
~every~ component / page in the system has definitely been loaded and
will never need to be referenced in another compiled statement again.

I think I fixed the bug by doing a JIT sort of javassist class
generation only after the majority of logic has passed that would
normally result in Tapestry knowing whether or not any particular
expression is compilable at all.

Post Summary:

Sorry to all for any worries/extra work this bug may have caused.
I'm obviously very interested in hearing what peoples results are when
using the new version.   Now that I've put things along the right path
I'm sure that any remaining issues can be relatively quickly addressed
and fixed once reported.

-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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



Re: Input Validation example

2007-09-07 Thread Filip S. Adamsen

if(!userExists) return new Login();

This probably doesn't work because returning a page instance usually 
assumes it being injected via @InjectPage.


Jean-Philippe Steinmetz skrev:

Yea I've double checked the code a few times. For whatever reason I can get
the form to show up now but I'm still seeing the following message in the
tomcat stdout log.

[ERROR] Login Embedded component(s) form are defined within component class
edu.usc.k12.cpanel.pages.Login, but are not present in the component
template.

So it would appear to be working. As I've discovered other little quirks
here and there it seems to have solved this problem. I'm really not sure why
Tapestry would've given me these errors if it was a problem with something
else in my code.

For instance I had a problem where one of my context resources wasn't being
loaded because I didn't have the .jar file in Tomcat's lib directory. That's
solved now.

Here's another interesting quirk I've discovered. I do a page redirection
from onActivate as a security check. So if the user hasn't logged in, they
get sent to the login page. To do that I have

if(!userExists) return new Login();


From what I gather this is the correct way to send a class? Anyhow, it

doesn't work so instead I put

if(!userExists) return "Login";

Which seems to work fine, except it won't work on the Start page. For some
reason that page just serves up an empty page. However, it could be
something else I haven't figured out yet, like this problem with the other
items. If you have any thoughts on these weird inconsistencies it'd be
helpful. Thanks.

Jean-Philippe


-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 06, 2007 9:31 PM
To: Tapestry users
Subject: Re: Input Validation example

Are you sure you've copied the source exactly?

It's telling you that it can't match components with those id's to
component fields in the Java class.

So
 
...
 @Component(id = "password")
 private PasswordField _passwordField;

Cheers,
Nick.


Jean-Philippe Steinmetz wrote:

Well that problem seems to have been solved. Now I'm getting the message

Component Login does not contain an embedded component with id 'form'.

And

Component Login does not contain an embedded component with id

'password'.

Jean-Philippe


-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 05, 2007 8:13 PM
To: Tapestry users
Subject: Re: Input Validation example

This should work automatically. Read the component reference for
TextField.
Your java class should define a property with the same name as the

field's

id.

(It's already there if you copied the source.)

Cheers,
Nick.


Jean-Philippe Steinmetz wrote:

Hello all,



I'm having some trouble with the input validation example. I have

everything

set up as described in



http://tapestry.apache.org/tapestry5/tapestry-

core/guide/validation.html



but am getting the following error for my Login page:



Parameter(s) translate, value are required for
org.apache.tapestry.corelib.components.TextField, but have not been

bound.


Anyone know why? I'm using Tap 5.0.5



Jean-Philippe Steinmetz

---

Webmaster / Developer

Information Sciences Institute

University of Southern California

[EMAIL PROTECTED]

310.448.8471





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




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



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





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




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



RE: Input Validation example

2007-09-07 Thread Jean-Philippe Steinmetz
Yea I've double checked the code a few times. For whatever reason I can get
the form to show up now but I'm still seeing the following message in the
tomcat stdout log.

[ERROR] Login Embedded component(s) form are defined within component class
edu.usc.k12.cpanel.pages.Login, but are not present in the component
template.

So it would appear to be working. As I've discovered other little quirks
here and there it seems to have solved this problem. I'm really not sure why
Tapestry would've given me these errors if it was a problem with something
else in my code.

For instance I had a problem where one of my context resources wasn't being
loaded because I didn't have the .jar file in Tomcat's lib directory. That's
solved now.

Here's another interesting quirk I've discovered. I do a page redirection
from onActivate as a security check. So if the user hasn't logged in, they
get sent to the login page. To do that I have

if(!userExists) return new Login();

>From what I gather this is the correct way to send a class? Anyhow, it
doesn't work so instead I put

if(!userExists) return "Login";

Which seems to work fine, except it won't work on the Start page. For some
reason that page just serves up an empty page. However, it could be
something else I haven't figured out yet, like this problem with the other
items. If you have any thoughts on these weird inconsistencies it'd be
helpful. Thanks.

Jean-Philippe

> -Original Message-
> From: Nick Westgate [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 06, 2007 9:31 PM
> To: Tapestry users
> Subject: Re: Input Validation example
> 
> Are you sure you've copied the source exactly?
> 
> It's telling you that it can't match components with those id's to
> component fields in the Java class.
> 
> So
>   t:validate="required,minlength=3" size="30"/>
> ...
>  @Component(id = "password")
>  private PasswordField _passwordField;
> 
> Cheers,
> Nick.
> 
> 
> Jean-Philippe Steinmetz wrote:
> > Well that problem seems to have been solved. Now I'm getting the message
> >
> > Component Login does not contain an embedded component with id 'form'.
> >
> > And
> >
> > Component Login does not contain an embedded component with id
> 'password'.
> >
> > Jean-Philippe
> >
> >> -Original Message-
> >> From: Nick Westgate [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 05, 2007 8:13 PM
> >> To: Tapestry users
> >> Subject: Re: Input Validation example
> >>
> >> This should work automatically. Read the component reference for
> >> TextField.
> >> Your java class should define a property with the same name as the
> field's
> >> id.
> >>
> >> (It's already there if you copied the source.)
> >>
> >> Cheers,
> >> Nick.
> >>
> >>
> >> Jean-Philippe Steinmetz wrote:
> >>> Hello all,
> >>>
> >>>
> >>>
> >>> I'm having some trouble with the input validation example. I have
> >> everything
> >>> set up as described in
> >>>
> >>>
> >>>
> >>> http://tapestry.apache.org/tapestry5/tapestry-
> core/guide/validation.html
> >>>
> >>>
> >>>
> >>> but am getting the following error for my Login page:
> >>>
> >>>
> >>>
> >>> Parameter(s) translate, value are required for
> >>> org.apache.tapestry.corelib.components.TextField, but have not been
> >> bound.
> >>>
> >>>
> >>> Anyone know why? I'm using Tap 5.0.5
> >>>
> >>>
> >>>
> >>> Jean-Philippe Steinmetz
> >>>
> >>> ---
> >>>
> >>> Webmaster / Developer
> >>>
> >>> Information Sciences Institute
> >>>
> >>> University of Southern California
> >>>
> >>> [EMAIL PROTECTED]
> >>>
> >>> 310.448.8471
> >>>
> >>>
> >>>
> >>>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




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



Re: [T5] New HowTo: Adding a messageformat binding prefix

2007-09-07 Thread Nick Westgate

Nice!

Cheers,
Nick.


Filip S. Adamsen wrote:
http://wiki.apache.org/tapestry/Tapestry5HowToAddMessageFormatBindingPrefix 
describes how to add a messageformat prefix that allows you to do this:


  ${messageformat:key,value1,value2}

or this:

  

in your templates.

It uses org.apache.tapestry.ioc.Messages#format with the given key and 
value(s) to return a localized, formatted message.


The values can be literal if enclosed in single quotes or use any other 
binding prefix to retrieve a value - default prefix is prop.


Comments and suggestions for improvement are welcome.

-Filip

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




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



[T5] New HowTo: Adding a messageformat binding prefix

2007-09-07 Thread Filip S. Adamsen
http://wiki.apache.org/tapestry/Tapestry5HowToAddMessageFormatBindingPrefix 
describes how to add a messageformat prefix that allows you to do this:


  ${messageformat:key,value1,value2}

or this:

  

in your templates.

It uses org.apache.tapestry.ioc.Messages#format with the given key and 
value(s) to return a localized, formatted message.


The values can be literal if enclosed in single quotes or use any other 
binding prefix to retrieve a value - default prefix is prop.


Comments and suggestions for improvement are welcome.

-Filip

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



Re: Memory issues with Tapestry 4.1.x

2007-09-07 Thread mraible

I was able to fix the "can't Ctrl+C mvn jetty:run" issue in AppFuse Light by
upgrading to Tapestry 4.1.2. The other issue still remains. I guess I'll
pull out my profiler. 

Thanks,

Matt


mraible wrote:
> 
> If you have MySQL installed, there's a couple demos you should be able to
> use:
> 
> http://static.raibledesigns.com/downloads/appfuse-light-tapestry-1.8-SNAPSHOT.zip
> http://static.raibledesigns.com/downloads/appfuse-tapestry-2.0-SNAPSHOT.zip
> 
> It expects a MySQL admin user (for creating the database) with a username
> of "root" and a blank password. To change that, pass in
> -Djdbc.username=foo -Djdbc.password=bar when you run any Maven commands.
> 
> For AppFuse Light, you can reproduce the "can't shut down" issue by
> running "mvn jetty:run", then browsing a couple pages (list -> detail) and
> then using Ctrl+C to cancel it. This uses Tapestry 4.1.1.
> 
> For AppFuse, you can run "mvn" and it'll download Tomcat (using Cargo) and
> run UI tests using Canoo WebTest. It runs out of memory near the last test
> in the sequence. I've tried it with no JAVA_OPTS set and with the
> following and it happens using both:
> 
> -Xms768M -Xmx768M -XX:PermSize=512m -XX:MaxPermSize=512m
> -Djava.awt.headless=true -XX:+CMSClassUnloadingEnabled
> -XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC
> 
> Thanks,
> 
> Matt
> 
> 
> Marcus Schulte wrote:
>> 
>> There are a couple of reports on the list that seem to point in this
>> direction. Especially the HivemindClassPool seems to be a candidate for
>> further observation. Since there are productive apps on 4.1.2 with no
>> issues, an issue with a sample app / setup to reproduce an OOM would be
>> very
>> helpful.
>> 
>> 
>> 2007/9/5, mraible <[EMAIL PROTECTED]>:
>>>
>>>
>>> I've been experiencing some OOM issues in a couple applications ever
>>> since
>>> I
>>> upgraded from 4.0.x to 4.1.x. I didn't change any code for the most
>>> part,
>>> just some descriptors and such. Has anyone else noticed memory-hogging
>>> issues with 4.1.x?
>>>
>>> Even stranger, if I start up my app using "mvn jetty:run", browse a
>>> couple
>>> pages and hit Ctrl+C, it doesn't kill the process. I have to forcefully
>>> kill
>>> the process in order to shut down Jetty. This doesn't happen with the
>>> other
>>> web frameworks I'm using, so I'm confident it's caused by Tapestry
>>> 4.1.2.
>>>
>>> Thanks,
>>>
>>> Matt
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Memory-issues-with-Tapestry-4.1.x-tf4387514.html#a12508911
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> Marcus Schulte
>> http://marcus-schulte.blogspot.com
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Memory-issues-with-Tapestry-4.1.x-tf4387514.html#a12558392
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: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread Howard Lewis Ship
Here's the deal.

1) I always recommend that you provide an explicit t:id for form fields,
rather than let Tapestry assign the id.  In fact, I recommend assigning an
t:id to all non-trivial components.
2) Often, but far from always, you would end up using the same string in a
TextField for t:id and for the name of the property being edited (the
t:value parameter).
3) Thus the carrot: you can omit t:value when it will match t:id; the
TextField and similar components can default t:value based on t:id.
4) Don't fit that mold?  Use an explicit t:value.

So this is bad from one philosophy: that there should only be one way to
accomplish any one goal.

But I think it is good in terms of making things Just Work, which I find to
be very pragmatic.

On 9/7/07, smithfox <[EMAIL PROTECTED]> wrote:
>
>
> I do more test based you simple.
> Yes, a nested class also work.
>
> As you said: It's not tapestry issue.
>
> Your code is:
> [Page.java]
> private BznsPojo pojo= new BznsPojo();
>
> My code is:
> [Page.java]
> private BznsPojo pojo;
>
> @BeginRender
> void beginRender(){
>   pojo = createNewPojo();
> }
>
> private BznsPojo createNewPojo(){
>   BznsPojo pojo = new BznsPojo();
>   Product product = new Product();
>   pojo.setProduct(product);
>   return pojo;
> }
>
>
> So the problem is caused by lifecycle of pojo:
> I guess that  pojo's nested field object have already referenced by page
> template before BeginRender( and SteupRender) event.
>
> So I change the code:
>
> My code is:
> [Page.java]
> @Retain
> private BznsPojo pojo;
>
> .
>
>
> OK, It work.
>
> Thank for Filip's help.
>
>
>
>
> Filip S. Adamsen-2 wrote:
> >
> > I did a test, and it worked.
> >
> > Can you show me more of your source code? It might be some non-Tapestry
> > issue.
> >
> > smithfox skrev:
> >> Thank your very much.
> >> I test your code. It can pass.
> >>
> >> But my case is different with yours.
> >> Your business object is a simple POJO class.
> >> But if you add another business class to the simple POJO class as a
> >> field,
> >> the tapestry doesn't recognise it.
> >>
> >> "sale.date" can pass,
> >> But "sale.product.price" can't pass.
> >>
> >> You can do a test.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/T5%3A-How-to-bind-composite-class%27-field%28like-sale.product.price%29-in-page-template-tf4395512.html#a1289
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50


Creator Apache Tapestry and Apache HiveMind


Re: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread smithfox

I do more test based you simple.
Yes, a nested class also work.

As you said: It's not tapestry issue.

Your code is:
[Page.java]
private BznsPojo pojo= new BznsPojo();

My code is:
[Page.java]
private BznsPojo pojo;

@BeginRender
void beginRender(){
  pojo = createNewPojo();
}

private BznsPojo createNewPojo(){
  BznsPojo pojo = new BznsPojo();
  Product product = new Product();
  pojo.setProduct(product);
  return pojo;
}


So the problem is caused by lifecycle of pojo:
I guess that  pojo's nested field object have already referenced by page
template before BeginRender( and SteupRender) event.

So I change the code:

My code is:
[Page.java]
@Retain
private BznsPojo pojo;

.


OK, It work.

Thank for Filip's help. 




Filip S. Adamsen-2 wrote:
> 
> I did a test, and it worked.
> 
> Can you show me more of your source code? It might be some non-Tapestry 
> issue.
> 
> smithfox skrev:
>> Thank your very much.
>> I test your code. It can pass.
>> 
>> But my case is different with yours.
>> Your business object is a simple POJO class.
>> But if you add another business class to the simple POJO class as a
>> field,
>> the tapestry doesn't recognise it.
>> 
>> "sale.date" can pass, 
>> But "sale.product.price" can't pass.
>> 
>> You can do a test.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-How-to-bind-composite-class%27-field%28like-sale.product.price%29-in-page-template-tf4395512.html#a1289
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: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread Filip S. Adamsen

I did a test, and it worked.

Can you show me more of your source code? It might be some non-Tapestry 
issue.


smithfox skrev:

Thank your very much.
I test your code. It can pass.

But my case is different with yours.
Your business object is a simple POJO class.
But if you add another business class to the simple POJO class as a field,
the tapestry doesn't recognise it.

"sale.date" can pass, 
But "sale.product.price" can't pass.


You can do a test.


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



Re: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread smithfox

Thank your very much.
I test your code. It can pass.

But my case is different with yours.
Your business object is a simple POJO class.
But if you add another business class to the simple POJO class as a field,
the tapestry doesn't recognise it.

"sale.date" can pass, 
But "sale.product.price" can't pass.

You can do a test.


Filip S. Adamsen-2 wrote:
> 
> Login.java:
> 
> public class Login {
> 
>// Credentials is a simple POJO with two
>// properties, username and password
>private Credentials credentials = new Credentials();
> 
>/* lots of other stuff */
> }
> 
> Login.html:
> 
> [header stuff]
>
>  
> 
>  
>  
>  
>
> [footer stuff]
> 
> Renders as (minus the validation stuff etc.):
> 
> [header stuff]
>
>  
>  
>  
>
> [footer stuff]
> 
> The important thing is that Tapestry knows that the field username is 
> connected to the property credentials.username, and that the field 
> password is connected to the property credentials.password. But you 
> don't have to worry about that.
> 
> smithfox skrev:
>> I'm sure that I have getter and setter for price.
>> Could you show me your code. 
>> Thanks
>> 
>> 
>> Filip S. Adamsen-2 wrote:
>>> Make sure you've declared a getter and setter for price in your Product 
>>> class. The output you're seeing is expected and works for me in a 
>>> similar case.
>>>
>>> smithfox skrev:
 Yes, I tried earlier

 
 
 
 

 After render, the html is :
  

 Obviously, when i submit, occur exception beacuse my page class has no
 textfield field.



 Filip S. Adamsen-2 wrote:
> Yeah, then you definitely need to set the VALUE to sale.product.price, 
> not the id. Just listen to Nick, he knows what he's talking about. : )
>
> smithfox skrev:
>> It's a edit form.
>>
>> Nick Westgate wrote:
>>> Why are you binding the id to that? Don't you mean
>>> t:value="sale.product.price"?
>>>
>>> Cheers,
>>> Nick.
>>>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-How-to-bind-composite-class%27-field%28like-sale.product.price%29-in-page-template-tf4395512.html#a12554977
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: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread Filip S. Adamsen

Login.java:

public class Login {

  // Credentials is a simple POJO with two
  // properties, username and password
  private Credentials credentials = new Credentials();

  /* lots of other stuff */
}

Login.html:

[header stuff]
  





  
[footer stuff]

Renders as (minus the validation stuff etc.):

[header stuff]
  



  
[footer stuff]

The important thing is that Tapestry knows that the field username is 
connected to the property credentials.username, and that the field 
password is connected to the property credentials.password. But you 
don't have to worry about that.


smithfox skrev:

I'm sure that I have getter and setter for price.
Could you show me your code. 
Thanks



Filip S. Adamsen-2 wrote:
Make sure you've declared a getter and setter for price in your Product 
class. The output you're seeing is expected and works for me in a 
similar case.


smithfox skrev:

Yes, I tried earlier






After render, the html is :
 


Obviously, when i submit, occur exception beacuse my page class has no
textfield field.



Filip S. Adamsen-2 wrote:
Yeah, then you definitely need to set the VALUE to sale.product.price, 
not the id. Just listen to Nick, he knows what he's talking about. : )


smithfox skrev:

It's a edit form.

Nick Westgate wrote:

Why are you binding the id to that? Don't you mean
t:value="sale.product.price"?

Cheers,
Nick.


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




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







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



Re: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread smithfox

I'm sure that I have getter and setter for price.
Could you show me your code. 
Thanks


Filip S. Adamsen-2 wrote:
> 
> Make sure you've declared a getter and setter for price in your Product 
> class. The output you're seeing is expected and works for me in a 
> similar case.
> 
> smithfox skrev:
>> Yes, I tried earlier
>> 
>> 
>> 
>> 
>> 
>> 
>> After render, the html is :
>>  
>> 
>> Obviously, when i submit, occur exception beacuse my page class has no
>> textfield field.
>> 
>> 
>> 
>> Filip S. Adamsen-2 wrote:
>>> Yeah, then you definitely need to set the VALUE to sale.product.price, 
>>> not the id. Just listen to Nick, he knows what he's talking about. : )
>>>
>>> smithfox skrev:
 It's a edit form.

 Nick Westgate wrote:
> Why are you binding the id to that? Don't you mean
> t:value="sale.product.price"?
>
> Cheers,
> Nick.
>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-How-to-bind-composite-class%27-field%28like-sale.product.price%29-in-page-template-tf4395512.html#a12554435
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: tapestry components and applets

2007-09-07 Thread Filip S. Adamsen
Tapestry doesn't manage your applet's lifecycle - the browser does. Have 
you checked if start()/stop() are being called on subsequent requests 
instead of init()?


Jamie Counihan skrev:

Hi there,

I'm having a few problems with creating a component that contains an 
applet in tapestry 4.1.2.


I wanted my applet to play a simple mp3 file. The applet loaded on the 
first 2 attempts but did not load on subsequent requests.
I then created a simple applet that did nothing to see how it was being 
loaded in firefox 2.0.0.6 but again after the 2nd page the applet did 
not load.
I have to come to the conclusion that the applet implementation is not 
the problem but how its lifecycle is loaded/managed within the tapestry 
framework.


Has anyone created components containing applets?
Any ideas on way applets are not being initialised (init()) after 2 
requests with tapestry components?


Thanks,
Jamie

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




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



Re: T5: How to bind composite class' field(like sale.product.price) in page template

2007-09-07 Thread Filip S. Adamsen
Make sure you've declared a getter and setter for price in your Product 
class. The output you're seeing is expected and works for me in a 
similar case.


smithfox skrev:

Yes, I tried earlier






After render, the html is :
 


Obviously, when i submit, occur exception beacuse my page class has no
textfield field.



Filip S. Adamsen-2 wrote:
Yeah, then you definitely need to set the VALUE to sale.product.price, 
not the id. Just listen to Nick, he knows what he's talking about. : )


smithfox skrev:

It's a edit form.

Nick Westgate wrote:

Why are you binding the id to that? Don't you mean
t:value="sale.product.price"?

Cheers,
Nick.


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







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



[T5] Validator JavaScript problem with clientValidation=false

2007-09-07 Thread Christian Koeberl
Hello!

Has anybody ever tried to set "clientValidation=false" in a form with 
validators?

The T5 validators still generate the validation JavaScript but the form 
does not inlude the required JS-libs. This leads to an JS error on the 
client side.
This script is generated with clientValidation=false:




I looked around in the validators and it seems that they do not know if 
clientValidation is enabled or not - they just render the JS code with 
PageRenderSupport#addScript.

Anyone the same problems? Has anyone a workaround for this?

-- 
Chris

Cedric Brajus est absent(e).

2007-09-07 Thread cedric . brajus


Je serai absent(e) à partir du  07/09/2007 de retour le 08/09/2007.

I'm not available. In urgent matters please contact Michel Cardon :
[EMAIL PROTECTED]