Re: Again with the tapestry, hibernate and switching the database

2012-09-26 Thread esper
Thanks for the reply Taha! It is indeed very useful.
I still find it hard to believe that you can't load/rebuild the entire
different hibernate session with Tapestry. No matter the time it takes. As I
said, I only need those databases to work one at the time. 

Somehow I imagined it like this:
- create different hibernate configuration for each database
- create a session helper to execute something like this
sessionFactory = new Configuration().configure().buildSessionFactory();
- load the session object back to tapestry

But, can it be done?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Again-with-the-tapestry-hibernate-and-switching-the-database-tp5716477p5716495.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: Ordering problem

2012-09-26 Thread Lance Java
You will need to store your cart somewhere between requests. Either in the
session or on the client via a cookie. Most likely, it will be a global
session object and you will declare it as:

@SessionState(create=?)
private Cart cart;

http://tapestry.apache.org/session-storage.html





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Ordering-problem-tp5716481p5716496.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: Again with the tapestry, hibernate and switching the database

2012-09-26 Thread Taha Siddiqi
My point here is that you can't do it with tapestry-hibernate module but you 
can always do it with tapestry and hibernate. :)

You can take a look at https://github.com/tawus/tapestry5 where I have modified 
tapestry-hibernate to work with multiple databases. If you can tweak it further 
you might to able to accomplish choosing session based on client.



On Sep 26, 2012, at 12:27 PM, esper wrote:

 Thanks for the reply Taha! It is indeed very useful.
 I still find it hard to believe that you can't load/rebuild the entire
 different hibernate session with Tapestry. No matter the time it takes. As I
 said, I only need those databases to work one at the time. 
 
 Somehow I imagined it like this:
 - create different hibernate configuration for each database
 - create a session helper to execute something like this
 sessionFactory = new Configuration().configure().buildSessionFactory();
 - load the session object back to tapestry
 
 But, can it be done?
 
 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Again-with-the-tapestry-hibernate-and-switching-the-database-tp5716477p5716495.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
 



Updating image inside zone

2012-09-26 Thread ch_pasha
Hi all, 

I have an image with dynamic content inside zone component (jfreechart
actually). Unfortunately when triggering the zone update image content is
never updated - getter method returning streamresponse is called only once
when the page is first loaded but never again,when zone is updated. Is it an
expected behaviour? How can I make the image populate content each time zone
is updated?





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498.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: Updating image inside zone

2012-09-26 Thread Dieter Sauvillers
Can you provide the code when performing zone update?

On 26 September 2012 11:50, ch_pasha ch_pa...@yahoo.com wrote:
 Hi all,

 I have an image with dynamic content inside zone component (jfreechart
 actually). Unfortunately when triggering the zone update image content is
 never updated - getter method returning streamresponse is called only once
 when the page is first loaded but never again,when zone is updated. Is it an
 expected behaviour? How can I make the image populate content each time zone
 is updated?





 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498.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


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



Re: Updating image inside zone

2012-09-26 Thread ch_pasha
Yes I can


tml wrote
 t:eventlink event=showChart context=[execution] zone=chartZone
 ${execution.id}
 /t:eventlink
 
 t:zone t:id=chartZone id=chartZone update=show
 
 jfreechart:jpegchart t:id=chart cliendId=chart
   chart=chart
   width=850 height=600/
 /t:zone



java wrote
 @InjectComponent
 private Zone chartZone;
 
 @OnEvent(value = showChart)
 Object onShowChart(RestwertExecution execution) {
 this.execution = execution;
 return httpRequest.isXHR() ? chartZone.getBody() : null;
 }
 
 
 public JFreeChart getChart() {
   return new MyChart().generate(dao.loadSomeData());
 }

As I said, I see that zone is updated (there are also log entries for
dao.loadSomeData() every time). but the getChart() method is never called
again and chart content is obviously the same




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716500.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: Tapestry 5.3.2 autocomplete mixin not working

2012-09-26 Thread djst
Hey

I fixed the problem. It turned out that some of my code in onActivate() caused 
it not to
call onProvideCompletions(), so the error was a bit besides my question. Sorry 
about that.

Anyway, thanks for your quick answers and help!

/David

From: Charlouze [via Tapestry] 
[mailto:ml-node+s1045711n5716484...@n5.nabble.com]
Sent: 25. september 2012 14:28
To: David Teglbjærg
Subject: Re: Tapestry 5.3.2 autocomplete mixin not working

Hello,

I had similar weird trouble once. I was using tapestry 5.3 and it did not
found my setupRender() function in one of my page classes. I did not do
anything specific to correct that bug except from restarting eclipse and
adding the correct attributes (MarkupWriter and Event) to the function even
if they are not required. I am really not sure what corrects the problem.

I will briefly introduce myself given that it is the first time I am
sending an email to this list. I'm a young french software architect
working in a small and young company called Enyx. I'm using Tapestry for 1
year and a half but I just recently subscribe to the mailing-lists.

Charles Capon.

2012/9/25 djst [hidden email]/user/SendEmail.jtp?type=nodenode=5716484i=0

 Hey!

 Thanks for the reply, but I'm not using tapestry5-jquery.

 I did make some progress though. I just tried my sample code in a fresh
 new project and it works.
 Pretty weird, but I'll try to figure out what is interfering in my current
 project.

 Thanks for the replies.

 /David


 From: ccureau [via Tapestry] [mailto:
 [hidden email]/user/SendEmail.jtp?type=nodenode=5716484i=1]
 Sent: 25. september 2012 13:38
 To: David Teglbjærg
 Subject: Re: Tapestry 5.3.2 autocomplete mixin not working

 Hi!

 This may or may not be your issue, but f you are using tapestry5-jquery,
 you may have some issues with autocomplete unless you use
 t:mixins=jquery/autocomplete or disable Prototype first.

 Just a thought...

 On Wed, Sep 12, 2012 at 9:48 AM, djst [hidden
 email]/user/SendEmail.jtp?type=nodenode=5716479i=0 wrote:

  Hi there.
 
  I'm trying to get the auto-completion mixin in Tapestry 5.3.2 to work
 put I
  cannot get it to function properly. Tapestry does not call my
  onProvideCompletionsFrom eventhandler. When inputting characters into the
  textfield I get a little loading icon on the right side of my text field
  but
  nothing further happens. If I uncomment my eventhandler function exactly
  the
  same happens. I can, though, see that a POST is sent since I'm getting
 the
  following debug message:
 
  127.0.0.1 -  -  [12/sep/2012:14:29:19 +] POST
  /RMS/randomise.testfield:autocomplete HTTP/1.1 200 29
  http://localhost:8080/RMS/randomise;
 
  Here is my code:
 
  From my Someclass.tml:
 
  t:textfield t:id=TestField t:value=testValue
 t:mixins=autocomplete/
 
  From my Someclass.java:
 
  public class SomeClass{
 
  @Property
  String testValue;
 
  ListString onProvideCompletionsFromTestField(String partial)
  {
  ListString matches = new ArrayListString();
  String testString = help;
  if(testString.contains(partial))
  matches.add(testString);
 
  return matches;
  }
  }
 
  I then try to type h in the textfield and I suppose I it should
  autocomplete to help, as I said, the loading icon just keeps spinning
 and
  nothing happens. I've tried different suggestions from other posts where
  people are having the same problem, but non of them turned out to be
 fixes.
 
  Do you have any idea how I can fix this issue?
 
  Thanks in advance.
 
  /David
 
 
 
 
  --
  View this message in context:
 
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-2-autocomplete-mixin-not-working-tp5716234.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden
 email]/user/SendEmail.jtp?type=nodenode=5716479i=1
  For additional commands, e-mail: [hidden
 email]/user/SendEmail.jtp?type=nodenode=5716479i=2
 
 

 
 If you reply to this email, your message will be added to the discussion
 below:

 http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-2-autocomplete-mixin-not-working-tp5716234p5716479.html
 To unsubscribe from Tapestry 5.3.2 autocomplete mixin not working, click
 here
 .
 NAML
 http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 




 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-2-autocomplete-mixin-not-working-tp5716234p5716483.html
 Sent from the Tapestry - User mailing list archive at 

Re: Updating image inside zone

2012-09-26 Thread Charlouze
Maybe your component jfreechart:jpegchart caches the datas.

2012/9/26 ch_pasha ch_pa...@yahoo.com

 Yes I can


 tml wrote
  t:eventlink event=showChart context=[execution] zone=chartZone
  ${execution.id}
  /t:eventlink
 
  t:zone t:id=chartZone id=chartZone update=show
 
  jfreechart:jpegchart t:id=chart cliendId=chart
chart=chart
width=850 height=600/
  /t:zone



 java wrote
  @InjectComponent
  private Zone chartZone;
 
  @OnEvent(value = showChart)
  Object onShowChart(RestwertExecution execution) {
  this.execution = execution;
  return httpRequest.isXHR() ? chartZone.getBody() : null;
  }
 
 
  public JFreeChart getChart() {
return new MyChart().generate(dao.loadSomeData());
  }

 As I said, I see that zone is updated (there are also log entries for
 dao.loadSomeData() every time). but the getChart() method is never called
 again and chart content is obviously the same




 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716500.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: Updating image inside zone

2012-09-26 Thread ch_pasha
No, I think I solved the problem by adding fake context to the chart
component. 
I think the problem was that browser cached the image with src=someurl
(because the chart is 
ultimately just an html img. By adding random data (our context) to the
url we 
prevent the image from  caching (this is my guess). 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Updating-image-inside-zone-tp5716498p5716503.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: How to get selected value from Autocomplete list onto server side?

2012-09-26 Thread djst
Okay... 

Isn't there a way another way of implementing this?

Or is there a way to extend or configure the autocomplete mixin to provide
submission when
the user chooses from the dropdown menu?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716508.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: How to get selected value from Autocomplete list onto server side?

2012-09-26 Thread Dieter Sauvillers
I guess what you are looking for is a mix of two different things on
one hand the autocomplete mixin which provides the pincodes, but on
the other hand you want the onvaluechanged from a select component.

Maybe you can look at that implementation, but I think is pretty
similar to the zoneupdater.

Regards

On 26 September 2012 16:25, djst da...@ctu.dk wrote:
 Okay...

 Isn't there a way another way of implementing this?

 Or is there a way to extend or configure the autocomplete mixin to provide
 submission when
 the user chooses from the dropdown menu?



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716508.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


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



Re: How to get selected value from Autocomplete list onto server side?

2012-09-26 Thread djst
Okay. I'll look in to it.

Thanks for the help. :)



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716510.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: BufferedImage in Tapestry

2012-09-26 Thread gonzalomp87
Hi! Up the thread because I have a problem.

I was working with Jetty and the above code worked perfectly but  in tomcat
not showing the image and nor give any error .Anyone know what could be the
cause?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BufferedImage-in-Tapestry-tp5714465p5716512.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: Tapestry Spring localization

2012-09-26 Thread mandark
If we want to use decorators, why not decorate the
org.apache.tapestry5.ioc.Messages interface and why decorate
ComponentMessagesSource. Also, is there a good example for me to follow for
decorating the interface.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Using-Persist-with-entities-tp5716411p5716513.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