Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Lance Java
Why can't you use a RequestFilter?

The HttpServletRequest has been set on RequestGlobals by the time the
RequestFilters are invoked. So you can @Inject HttpServletRequest in your
RequestFilter (or any service called by your RequestFilter). If you need to
wrap the HttpServletRequest,  you can @Inject RequestGlobals and call
storeServletRequestResponse(…).

I don't see a problem?


Re: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Howard Lewis Ship
Looks like the code that checks for case mismatch is broken when the path
separator is different.  It must be hard coded to look for /, which is a
problem on Windows.


On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen 
ville.virta...@orientimport.fi wrote:

 Dear list,



 just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log is
 littered with exceptions like this:



 Caused by: java.lang.IllegalStateException: Resource
 classpath:com/orient/web/customer/base/SecureBasePage.class does not match
 the case of the actual file name,

 'E:\projects\Orient\customer\target\classes\com\orient\web\customer\base\Sec
 ureBasePage.class'.



 java.lang.IllegalStateException: Resource
 context:WEB-INF/customerclient.properties does not match the case of the
 actual file name,

 E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.propertie
 s'.



 I'm running a maven build with jetty:run. What should I change to get up 
 running?



 Ville




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


VS: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Ville Virtanen
Hi,

thanks for the info. Should I reopen ticket
https://issues.apache.org/jira/browse/TAP5-1007 or create new one?

(And thanks for all the hard work, 5.4 is proving to be awesome!)

Ville

-Alkuperäinen viesti-
Lähettäjä: Howard Lewis Ship [mailto:hls...@gmail.com] 
Lähetetty: 30. elokuuta 2013 11:04
Vastaanottaja: Tapestry users
Aihe: Re: 5.4-alpha-15 resource exceptions

Looks like the code that checks for case mismatch is broken when the path
separator is different.  It must be hard coded to look for /, which is a
problem on Windows.


On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen 
ville.virta...@orientimport.fi wrote:

 Dear list,



 just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log 
 is littered with exceptions like this:



 Caused by: java.lang.IllegalStateException: Resource 
 classpath:com/orient/web/customer/base/SecureBasePage.class does not 
 match the case of the actual file name,

 'E:\projects\Orient\customer\target\classes\com\orient\web\customer\ba
 se\Sec
 ureBasePage.class'.



 java.lang.IllegalStateException: Resource 
 context:WEB-INF/customerclient.properties does not match the case of 
 the actual file name,

 E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.pro
 pertie
 s'.



 I'm running a maven build with jetty:run. What should I change to get 
 up  running?



 Ville




--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


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



Re: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Massimo Lusetti
Please open a new one


On Fri, Aug 30, 2013 at 10:28 AM, Ville Virtanen 
ville.virta...@orientimport.fi wrote:

 Hi,

 thanks for the info. Should I reopen ticket
 https://issues.apache.org/jira/browse/TAP5-1007 or create new one?

 (And thanks for all the hard work, 5.4 is proving to be awesome!)

 Ville

 -Alkuperäinen viesti-
 Lähettäjä: Howard Lewis Ship [mailto:hls...@gmail.com]
 Lähetetty: 30. elokuuta 2013 11:04
 Vastaanottaja: Tapestry users
 Aihe: Re: 5.4-alpha-15 resource exceptions

 Looks like the code that checks for case mismatch is broken when the path
 separator is different.  It must be hard coded to look for /, which is a
 problem on Windows.


 On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen 
 ville.virta...@orientimport.fi wrote:

  Dear list,
 
 
 
  just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log
  is littered with exceptions like this:
 
 
 
  Caused by: java.lang.IllegalStateException: Resource
  classpath:com/orient/web/customer/base/SecureBasePage.class does not
  match the case of the actual file name,
 
  'E:\projects\Orient\customer\target\classes\com\orient\web\customer\ba
  se\Sec
  ureBasePage.class'.
 
 
 
  java.lang.IllegalStateException: Resource
  context:WEB-INF/customerclient.properties does not match the case of
  the actual file name,
 
  E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.pro
  pertie
  s'.
 
 
 
  I'm running a maven build with jetty:run. What should I change to get
  up  running?
 
 
 
  Ville
 
 


 --
 Howard M. Lewis Ship

 Creator of Apache Tapestry

 The source for Tapestry training, mentoring and support. Contact me to
 learn
 how I can get you up and productive in Tapestry fast!

 (971) 678-5210
 http://howardlewisship.com


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




-- 
Massimo Lusetti


VS: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Ville Virtanen
Hi,

created https://issues.apache.org/jira/browse/TAP5-2165 to address this.

Ville

-Alkuperäinen viesti-
Lähettäjä: Massimo Lusetti [mailto:mluse...@gmail.com] 
Lähetetty: 30. elokuuta 2013 11:29
Vastaanottaja: Tapestry users
Aihe: Re: 5.4-alpha-15 resource exceptions

Please open a new one


On Fri, Aug 30, 2013 at 10:28 AM, Ville Virtanen 
ville.virta...@orientimport.fi wrote:

 Hi,

 thanks for the info. Should I reopen ticket
 https://issues.apache.org/jira/browse/TAP5-1007 or create new one?

 (And thanks for all the hard work, 5.4 is proving to be awesome!)

 Ville

 -Alkuperäinen viesti-
 Lähettäjä: Howard Lewis Ship [mailto:hls...@gmail.com]
 Lähetetty: 30. elokuuta 2013 11:04
 Vastaanottaja: Tapestry users
 Aihe: Re: 5.4-alpha-15 resource exceptions

 Looks like the code that checks for case mismatch is broken when the 
 path separator is different.  It must be hard coded to look for /, 
 which is a problem on Windows.


 On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen  
 ville.virta...@orientimport.fi wrote:

  Dear list,
 
 
 
  just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log 
  is littered with exceptions like this:
 
 
 
  Caused by: java.lang.IllegalStateException: Resource 
  classpath:com/orient/web/customer/base/SecureBasePage.class does not 
  match the case of the actual file name,
 
  'E:\projects\Orient\customer\target\classes\com\orient\web\customer\
  ba
  se\Sec
  ureBasePage.class'.
 
 
 
  java.lang.IllegalStateException: Resource 
  context:WEB-INF/customerclient.properties does not match the case of 
  the actual file name,
 
  E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.p
  ro
  pertie
  s'.
 
 
 
  I'm running a maven build with jetty:run. What should I change to 
  get up  running?
 
 
 
  Ville
 
 


 --
 Howard M. Lewis Ship

 Creator of Apache Tapestry

 The source for Tapestry training, mentoring and support. Contact me to 
 learn how I can get you up and productive in Tapestry fast!

 (971) 678-5210
 http://howardlewisship.com


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




--
Massimo Lusetti


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



Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Muhammad Gelbana
Didn't know it was that simple ! Thanks a lot :)
Now ApplicationStateManager (ASM) can be injected and used.

But there is another problem. I'm still not sure but I don't think web
services keep cookie sessions !
So If I facilitate session-id generation and send back a session-id to the
client when he logs in using a web-service call.
So the client will have to send me that session-id with over successive
call.

How can I tell ASM to use that session-id to get\set objects specific to
that session-id ?

I have a strong feeling I'll get another I don't see a problem? reply,
this is going to be simple too, correct ? :D


*-*
*Muhammad Gelbana*
Java Software Engineer


On Fri, Aug 30, 2013 at 9:24 AM, Lance Java lance.j...@googlemail.comwrote:

 Why can't you use a RequestFilter?

 The HttpServletRequest has been set on RequestGlobals by the time the
 RequestFilters are invoked. So you can @Inject HttpServletRequest in your
 RequestFilter (or any service called by your RequestFilter). If you need to
 wrap the HttpServletRequest,  you can @Inject RequestGlobals and call
 storeServletRequestResponse(…).

 I don't see a problem?



Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Lance Java
It depends how you are making the webservice call. Apache HTTPClient can
handle cookies and I'm sure many other web service libraries out there can
too.

If you are using java.net.URL directly then you won't have session / cookie
management on the client.


Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Lance Java
IMO using the session in a webservice is a bad idea. It's much better to
keep it stateless and pass the required info in each request.


Re: Using Hibernate Session outside of @CommitAfter. Bugs I saw in our project

2013-08-30 Thread Lance Java
I never annotate my services or dao's with @CommitAfter and only annotate
the actions in my pages / components. Is there a reason why you can't use
this approach?


Re: Lightweight Tapestry5 Design/Code Switch plugin for Eclipse

2013-08-30 Thread Dmitry Gusev
Glad you liked it, keep your eyes for updates.

Version 1.0.2 with bug fixes available from update site now.


On Fri, Aug 30, 2013 at 4:31 AM, Barry Books trs...@gmail.com wrote:

 Simple, Perfect

 Thanks
 Barry


 On Thu, Aug 29, 2013 at 4:38 PM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:

  Added Eclipse update site:
 
  https://dl.bintray.com/anjlab/eclipse
 
 
 
  On Thu, Aug 29, 2013 at 10:30 PM, Thiago H de Paula Figueiredo 
  thiag...@gmail.com wrote:
 
   Nice! Thanks! Any plans for an update site for easier installing?
  
  
   On Thu, 29 Aug 2013 12:27:38 -0300, Dmitry Gusev 
 dmitry.gu...@gmail.com
  
   wrote:
  
FYI:
  
   https://github.com/anjlab/**eclipse-tapestry5-plugin
  https://github.com/anjlab/eclipse-tapestry5-plugin
  
   TapestryTools doesn't work good for this when you have multiple files
  with
   same name, for example, multiple Index.tml files.
   This plugin aims to fix this.
  
  
  
   --
   Thiago H. de Paula Figueiredo
  
  
 --**--**-
   To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
  users-unsubscr...@tapestry.apache.org
   For additional commands, e-mail: users-h...@tapestry.apache.org
  
  
 
 
  --
  Dmitry Gusev
 
  AnjLab Team
  http://anjlab.com
 




-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Lightweight Tapestry5 Design/Code Switch plugin for Eclipse

2013-08-30 Thread Barry Books
As long as you are taking features requests:

Instead of using control-R to switch between java/tml it would be really
nice to have a tabbed editor with everything java/tml/properties/javascript
etc.

That said the current one solves 90% of my problems.


On Fri, Aug 30, 2013 at 6:39 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote:

 Glad you liked it, keep your eyes for updates.

 Version 1.0.2 with bug fixes available from update site now.


 On Fri, Aug 30, 2013 at 4:31 AM, Barry Books trs...@gmail.com wrote:

  Simple, Perfect
 
  Thanks
  Barry
 
 
  On Thu, Aug 29, 2013 at 4:38 PM, Dmitry Gusev dmitry.gu...@gmail.com
  wrote:
 
   Added Eclipse update site:
  
   https://dl.bintray.com/anjlab/eclipse
  
  
  
   On Thu, Aug 29, 2013 at 10:30 PM, Thiago H de Paula Figueiredo 
   thiag...@gmail.com wrote:
  
Nice! Thanks! Any plans for an update site for easier installing?
   
   
On Thu, 29 Aug 2013 12:27:38 -0300, Dmitry Gusev 
  dmitry.gu...@gmail.com
   
wrote:
   
 FYI:
   
https://github.com/anjlab/**eclipse-tapestry5-plugin
   https://github.com/anjlab/eclipse-tapestry5-plugin
   
TapestryTools doesn't work good for this when you have multiple
 files
   with
same name, for example, multiple Index.tml files.
This plugin aims to fix this.
   
   
   
--
Thiago H. de Paula Figueiredo
   
   
  --**--**-
To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
   users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
   
   
  
  
   --
   Dmitry Gusev
  
   AnjLab Team
   http://anjlab.com
  
 



 --
 Dmitry Gusev

 AnjLab Team
 http://anjlab.com



Re: Lightweight Tapestry5 Design/Code Switch plugin for Eclipse

2013-08-30 Thread Dmitry Gusev
I'll look what I can do with this on the weekends. I haven't worked with
editors (actually this is my first eclipse plugin ever :), but maybe a View
would be enough to list all these files for current document? Something
similar to the Outline view.
Maybe including @Import'ed stylesheets/libraries/stacks.

I really don't want to deal with editors and editor tabs, because I don't
want to force users use some specific editor. Somebody uses XML, somebody
JSP and even plain text editor for *.tml.


On Fri, Aug 30, 2013 at 4:19 PM, Barry Books trs...@gmail.com wrote:

 As long as you are taking features requests:

 Instead of using control-R to switch between java/tml it would be really
 nice to have a tabbed editor with everything java/tml/properties/javascript
 etc.

 That said the current one solves 90% of my problems.


 On Fri, Aug 30, 2013 at 6:39 AM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:

  Glad you liked it, keep your eyes for updates.
 
  Version 1.0.2 with bug fixes available from update site now.
 
 
  On Fri, Aug 30, 2013 at 4:31 AM, Barry Books trs...@gmail.com wrote:
 
   Simple, Perfect
  
   Thanks
   Barry
  
  
   On Thu, Aug 29, 2013 at 4:38 PM, Dmitry Gusev dmitry.gu...@gmail.com
   wrote:
  
Added Eclipse update site:
   
https://dl.bintray.com/anjlab/eclipse
   
   
   
On Thu, Aug 29, 2013 at 10:30 PM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:
   
 Nice! Thanks! Any plans for an update site for easier installing?


 On Thu, 29 Aug 2013 12:27:38 -0300, Dmitry Gusev 
   dmitry.gu...@gmail.com

 wrote:

  FYI:

 https://github.com/anjlab/**eclipse-tapestry5-plugin
https://github.com/anjlab/eclipse-tapestry5-plugin

 TapestryTools doesn't work good for this when you have multiple
  files
with
 same name, for example, multiple Index.tml files.
 This plugin aims to fix this.



 --
 Thiago H. de Paula Figueiredo


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


   
   
--
Dmitry Gusev
   
AnjLab Team
http://anjlab.com
   
  
 
 
 
  --
  Dmitry Gusev
 
  AnjLab Team
  http://anjlab.com
 




-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Lightweight Tapestry5 Design/Code Switch plugin for Eclipse

2013-08-30 Thread Barry Books
Had not thought of an Outline view. That would be nice and you would not
have to worry about too many tabs.


On Fri, Aug 30, 2013 at 7:26 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote:

 I'll look what I can do with this on the weekends. I haven't worked with
 editors (actually this is my first eclipse plugin ever :), but maybe a View
 would be enough to list all these files for current document? Something
 similar to the Outline view.
 Maybe including @Import'ed stylesheets/libraries/stacks.

 I really don't want to deal with editors and editor tabs, because I don't
 want to force users use some specific editor. Somebody uses XML, somebody
 JSP and even plain text editor for *.tml.


 On Fri, Aug 30, 2013 at 4:19 PM, Barry Books trs...@gmail.com wrote:

  As long as you are taking features requests:
 
  Instead of using control-R to switch between java/tml it would be really
  nice to have a tabbed editor with everything
 java/tml/properties/javascript
  etc.
 
  That said the current one solves 90% of my problems.
 
 
  On Fri, Aug 30, 2013 at 6:39 AM, Dmitry Gusev dmitry.gu...@gmail.com
  wrote:
 
   Glad you liked it, keep your eyes for updates.
  
   Version 1.0.2 with bug fixes available from update site now.
  
  
   On Fri, Aug 30, 2013 at 4:31 AM, Barry Books trs...@gmail.com wrote:
  
Simple, Perfect
   
Thanks
Barry
   
   
On Thu, Aug 29, 2013 at 4:38 PM, Dmitry Gusev 
 dmitry.gu...@gmail.com
wrote:
   
 Added Eclipse update site:

 https://dl.bintray.com/anjlab/eclipse



 On Thu, Aug 29, 2013 at 10:30 PM, Thiago H de Paula Figueiredo 
 thiag...@gmail.com wrote:

  Nice! Thanks! Any plans for an update site for easier installing?
 
 
  On Thu, 29 Aug 2013 12:27:38 -0300, Dmitry Gusev 
dmitry.gu...@gmail.com
 
  wrote:
 
   FYI:
 
  https://github.com/anjlab/**eclipse-tapestry5-plugin
 https://github.com/anjlab/eclipse-tapestry5-plugin
 
  TapestryTools doesn't work good for this when you have multiple
   files
 with
  same name, for example, multiple Index.tml files.
  This plugin aims to fix this.
 
 
 
  --
  Thiago H. de Paula Figueiredo
 
 
   
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
 users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 


 --
 Dmitry Gusev

 AnjLab Team
 http://anjlab.com

   
  
  
  
   --
   Dmitry Gusev
  
   AnjLab Team
   http://anjlab.com
  
 



 --
 Dmitry Gusev

 AnjLab Team
 http://anjlab.com



Re: Tapestry 5.4-alpha-15

2013-08-30 Thread Barry Books
Are there any Geb test cases in the source tree? I poked around a bit and
did not find any. I'm getting ready to write some new ones and I might as
well head down the new path.

Thanks
Barry


On Wed, Aug 28, 2013 at 3:33 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote:

 On Wed, Aug 28, 2013 at 6:58 PM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:

  Also no CSS files were loaded to the page, though I'm seeing bootstrap
 CSS
  classes applied to HTML elements and there are many *.js files added to
 the
  page, including some bootstrap.js.
 
  Should I add those manually?
 
 
 Sorry, found this in the release notes:

  185
 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=54_RELEASE_NOTES.txt;h=faad9147d6fb543141ef066d9000a9e510139d2f;hb=HEAD#l185
 The
 Bootstrap CSS is now only present if the `core` JavaScript stack is
 imported. You may need to change your application's
  186
 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=54_RELEASE_NOTES.txt;h=faad9147d6fb543141ef066d9000a9e510139d2f;hb=HEAD#l186
 layout
 component to do so explicitly, by adding `@Import(stack=core)` to
 the class.



  Here's the source:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;
 xmlns:p
  =tapestry:parameter
 
  head/head
 
  body
 
  t:beaneditform object=task /
 
  /body
 
  /html
 
  public class Index
 
  {
 
  @Property
 
  private Task task;
 
  }
 
  public class Task
 
  {
 
  @Validate(required)
 
  private String title;
 
 
 
  public String getTitle()
 
  {
 
  return title;
 
  }
 
  public void setTitle(String title)
 
  {
 
  this.title = title;
 
  }
 
  }
 
 
 
 
 
  On Wed, Aug 28, 2013 at 6:40 PM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:
 
  I've created test app using this release and found these messages in a
  console, which probably should be fixed:
 
  18:30:23.902  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Packaging of classpath assets has
  changed in release 5.4; Assets should no longer be on the main
 classpath,
  but should be moved to 'META-INF/assets/' or a sub-folder. Future
 releases
  of Tapestry may no longer support assets on the main classpath.
  18:30:23.902  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Classpath asset
  '/META-INF/assets/tapestry5/datepicker_106/js/datepicker.js' should be
  moved to folder
  '/META-INF/assets/core/META-INF/assets/tapestry5/datepicker_106/js/'.
  18:30:23.907  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Classpath asset
  '/META-INF/assets/tapestry5/datepicker_106/css/datepicker.css' should be
  moved to folder
  '/META-INF/assets/core/META-INF/assets/tapestry5/datepicker_106/css/'.
 
  The page contains t:beaneditform / editing simple object with one
 field
  of type String.
 
 
  On Wed, Aug 28, 2013 at 3:56 PM, Peter Hvass p.hv...@albourne.com
 wrote:
 
  It's obviously not super desirable but I found the relevant Github
 issue
  (https://github.com/SomMeri/less4j/issues/160) and stepped through,
  fixed the few small issues
  that were causing infinite loops and less compilation errors just
  temporarily for the time being so that we can fix up the class name
 usage
  in our projects.
 
 
  Just watch out for things like;
  .something {
  .something();
  } (infinite loop; so just copy paste the contents of .something() from
  either mixins.less or utilities.less)
 
 
  And mixin declarations whose variables end in a ;
  .somemixin(@someVar;)...
  (Just remove the trailing ;)
 
 
  We're now done changing bootstrap 2 class names to bootstrap 3 ones and
  the like. It wasn't too painful.
 
 
  It strikes me that there's no really good source or best practice for
  maintaining customized bootstrap less.
 
 
  Does anyone here have any ideas?
 
 
  For the time being we maintain a variables.less and bootstrap.less for
  each project. So we have variables-project.less,
 bootstrap-project.less.
  variables-project containing overridden variables from the vanilla
  variables.less and bootstrap-project.less including
 variables-project.less
  and allowing us to
  further shim in modifications to other bits of bootstrap.
 
  We'd ideally like to chop up and load only the necessary less files
  depending on what's in use on the page. For instance if we're only
 using the
  navbar, include a less file importing only the dependent less files for
  the navbar.
 
 
  Getting a bit OCD about all this. o_O
 
 
  Thanks again Howard! Looking forward to the first beta!
 
 
  - Original Message -
 
  From: Howard Lewis Ship hls...@gmail.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Wednesday, August 28, 2013 2:41:52 PM
  Subject: Re: Tapestry 5.4-alpha-15
 
  There's outstanding bugs in Less4J that they are in the process of
  correcting, to support compilation of Bootstrap 3.
 
 
  On Wed, Aug 28, 2013 at 12:41 PM, Howard Lewis Ship 

Re: JQuery Datatable Bind Mixin

2013-08-30 Thread Barry Books
You will need to provide a javascript callback function to the mixin that
puts the value into the url. It's called like this

if ( callback ) {   
   // TODO should work if value is array
   u.addContext = function(value) { u.url = u.url.replace(u.context,value) };
   callback(event,ui,u);
}

so I think your callback can be

function(event,ui,u) { u.addContext(Your Value); }



On Thu, Aug 29, 2013 at 6:18 PM, Taha Hafeez Siddiqi 
tawus.tapes...@gmail.com wrote:

 Try curRow.fileID instead of ${curRow.fileID} as parameter to bind.context

 Sent from my iPhone

 On 30-Aug-2013, at 3:26 AM, john c john998...@yahoo.com wrote:

  I am attempting to use the jquery/bind mixin with a datatable, but not
 having success.
  The relevant code is below. Basically I want to click a row and have it
 create a tapestry event, with the fileID.
  I have tested and found the event occurs, but I can't seem to pass the
 fileID context.
  Any ideas?
 
 
 
 ---
 
  t:jquery.datatable id=dataTable
 
t:mixins=jquery/bind bind.event=datatableclick
 bind.eventType=click bind.zone=theZone bind.context=${currRow.fileID}
  include=... 
  /t:jquery.datatable
 
 
 ---
 
 
  @Persist
  @Property
  private OutboundFile currRow;
 
  @InjectComponent
  private Zone theZone;
 
 
  @OnEvent(datatableclick)
  public Object onDatatableClickEvent(String value) {
  System.out.println(value:  + value);
  return theZone.getBody();
  }

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




Re: Using Hibernate Session outside of @CommitAfter. Bugs I saw in our project

2013-08-30 Thread Martin Kersten
I didnt started the project I am only maintaining it. I would love to
donate this code since this is so dangerous. I wont think about the money
this might have cost to find these bugs in a live system. Especially if the
database gots mixed up over these.

But you are right annotating actions and pages might be a better way
anyhow. But my standpoint is that the framework should protect me and my
coworker for doing such harmful stuff. I will look into the code again and
commit / provide some code to the jira. Maybe one can pick it up.

It also supports hibernates read only transactions to allow the utilization
of slave db nodes which is currently not supported by tapestry.


2013/8/30 Lance Java lance.j...@googlemail.com

 I never annotate my services or dao's with @CommitAfter and only annotate
 the actions in my pages / components. Is there a reason why you can't use
 this approach?



Re: Tapestry 5.4-alpha-15

2013-08-30 Thread Barry Books
I found one

https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-webresources/src/test/groovy/t5/webresources/tests/WebResourcesSpec.groovy;hb=e3b423ac


On Fri, Aug 30, 2013 at 7:48 AM, Barry Books trs...@gmail.com wrote:

 Are there any Geb test cases in the source tree? I poked around a bit and
 did not find any. I'm getting ready to write some new ones and I might as
 well head down the new path.

 Thanks
 Barry


 On Wed, Aug 28, 2013 at 3:33 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote:

 On Wed, Aug 28, 2013 at 6:58 PM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:

  Also no CSS files were loaded to the page, though I'm seeing bootstrap
 CSS
  classes applied to HTML elements and there are many *.js files added to
 the
  page, including some bootstrap.js.
 
  Should I add those manually?
 
 
 Sorry, found this in the release notes:

  185
 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=54_RELEASE_NOTES.txt;h=faad9147d6fb543141ef066d9000a9e510139d2f;hb=HEAD#l185
 The
 Bootstrap CSS is now only present if the `core` JavaScript stack is
 imported. You may need to change your application's
  186
 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=54_RELEASE_NOTES.txt;h=faad9147d6fb543141ef066d9000a9e510139d2f;hb=HEAD#l186
 layout
 component to do so explicitly, by adding `@Import(stack=core)` to
 the class.



  Here's the source:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;
 xmlns:p
  =tapestry:parameter
 
  head/head
 
  body
 
  t:beaneditform object=task /
 
  /body
 
  /html
 
  public class Index
 
  {
 
  @Property
 
  private Task task;
 
  }
 
  public class Task
 
  {
 
  @Validate(required)
 
  private String title;
 
 
 
  public String getTitle()
 
  {
 
  return title;
 
  }
 
  public void setTitle(String title)
 
  {
 
  this.title = title;
 
  }
 
  }
 
 
 
 
 
  On Wed, Aug 28, 2013 at 6:40 PM, Dmitry Gusev dmitry.gu...@gmail.com
 wrote:
 
  I've created test app using this release and found these messages in a
  console, which probably should be fixed:
 
  18:30:23.902  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Packaging of classpath assets has
  changed in release 5.4; Assets should no longer be on the main
 classpath,
  but should be moved to 'META-INF/assets/' or a sub-folder. Future
 releases
  of Tapestry may no longer support assets on the main classpath.
  18:30:23.902  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Classpath asset
  '/META-INF/assets/tapestry5/datepicker_106/js/datepicker.js' should be
  moved to folder
  '/META-INF/assets/core/META-INF/assets/tapestry5/datepicker_106/js/'.
  18:30:23.907  [http-bio-8080-exec-1] ERROR
  o.a.t.m.AssetsModule.AssetSource - Classpath asset
  '/META-INF/assets/tapestry5/datepicker_106/css/datepicker.css' should
 be
  moved to folder
  '/META-INF/assets/core/META-INF/assets/tapestry5/datepicker_106/css/'.
 
  The page contains t:beaneditform / editing simple object with one
 field
  of type String.
 
 
  On Wed, Aug 28, 2013 at 3:56 PM, Peter Hvass p.hv...@albourne.com
 wrote:
 
  It's obviously not super desirable but I found the relevant Github
 issue
  (https://github.com/SomMeri/less4j/issues/160) and stepped through,
  fixed the few small issues
  that were causing infinite loops and less compilation errors just
  temporarily for the time being so that we can fix up the class name
 usage
  in our projects.
 
 
  Just watch out for things like;
  .something {
  .something();
  } (infinite loop; so just copy paste the contents of .something() from
  either mixins.less or utilities.less)
 
 
  And mixin declarations whose variables end in a ;
  .somemixin(@someVar;)...
  (Just remove the trailing ;)
 
 
  We're now done changing bootstrap 2 class names to bootstrap 3 ones
 and
  the like. It wasn't too painful.
 
 
  It strikes me that there's no really good source or best practice for
  maintaining customized bootstrap less.
 
 
  Does anyone here have any ideas?
 
 
  For the time being we maintain a variables.less and bootstrap.less for
  each project. So we have variables-project.less,
 bootstrap-project.less.
  variables-project containing overridden variables from the vanilla
  variables.less and bootstrap-project.less including
 variables-project.less
  and allowing us to
  further shim in modifications to other bits of bootstrap.
 
  We'd ideally like to chop up and load only the necessary less files
  depending on what's in use on the page. For instance if we're only
 using the
  navbar, include a less file importing only the dependent less files
 for
  the navbar.
 
 
  Getting a bit OCD about all this. o_O
 
 
  Thanks again Howard! Looking forward to the first beta!
 
 
  - Original Message -
 
  From: Howard Lewis Ship hls...@gmail.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Wednesday, 

Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Muhammad Gelbana
I have one last question. Is it possible to instruct the
ApplicationStateManager to manage it's sessions using something else than a
HTTP based request (i.e. Whether its *HttpServletRequest* or Tapestry's *
Request*) ?

This has been fruitful discussion, thanks a lot :)

*-*
*Muhammad Gelbana*
Java Software Engineer


On Fri, Aug 30, 2013 at 12:28 PM, Lance Java lance.j...@googlemail.comwrote:

 IMO using the session in a webservice is a bad idea. It's much better to
 keep it stateless and pass the required info in each request.



Re: Using Hibernate Session outside of @CommitAfter. Bugs I saw in our project

2013-08-30 Thread Taha Siddiqi
Hi Martin

As Thiago has already pointed out, it would make more sense to have new 
annotations instead of changing @CommitAfter which is already in use.

I would suggest either create a new library which can add these new annotations 
to the existing tapestry-hibernate without breaking the code or
submit a patch(with tests of course) and some committer would look into it.

Although implementing @Transactional annotation would be great but even 
@WriteTransaction and @ReadOnlyTransaction (I think that you have pointed out) 
are not bad.

Anyways. You have done some useful work and it would be great if you can share 
it as a library!

regards
Taha

On Aug 30, 2013, at 6:56 PM, Martin Kersten wrote:

 I didnt started the project I am only maintaining it. I would love to
 donate this code since this is so dangerous. I wont think about the money
 this might have cost to find these bugs in a live system. Especially if the
 database gots mixed up over these.
 
 But you are right annotating actions and pages might be a better way
 anyhow. But my standpoint is that the framework should protect me and my
 coworker for doing such harmful stuff. I will look into the code again and
 commit / provide some code to the jira. Maybe one can pick it up.
 
 It also supports hibernates read only transactions to allow the utilization
 of slave db nodes which is currently not supported by tapestry.
 
 
 2013/8/30 Lance Java lance.j...@googlemail.com
 
 I never annotate my services or dao's with @CommitAfter and only annotate
 the actions in my pages / components. Is there a reason why you can't use
 this approach?
 



Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Aug 2013 12:15:00 -0300, Muhammad Gelbana m.gelb...@gmail.com  
wrote:



I have one last question. Is it possible to instruct the
ApplicationStateManager to manage it's sessions using something else  
than a HTTP based request (i.e. Whether its *HttpServletRequest* or  
Tapestry's *

Request*) ?


Tapestry's Request is just a thin layer over HttpServletRequest. Same for  
Session and HttpSession. So, in the end, it's actually the servlet  
container the one implementing the session handling. You can override,  
advise or decorate the ApplicationStateManager and implement it any way  
you want. I never had a situation that needed that. Why are you asking  
that? Any specific need?



This has been fruitful discussion, thanks a lot :)


:)

--
Thiago H. de Paula Figueiredo

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



Re: JQuery Datatable Bind Mixin

2013-08-30 Thread john c
Ok, here is a little more of the datatable code:

t:jquery.table id=dataTable

  t:row=currRow
  t:mixins=jquery/bind bind.event=datatableclick bind.eventType=click 
bind.zone=theZone bind.context=${currRow.fileID} 
include=...  

  p:buttonCell
                    t:jquery.dialogajaxlink t:dialog=myDialog 
t:zone=detailZone t:context=${thisfile.fileID}button 
class=smallgridbutton type=buttonRequeue/button/t:jquery.dialogajaxlink
                 /p:buttonCell

/t:jquery.datatable



currRow is defined in java with @Property annotation.

I have tried in the tml:

bind.context=${currRow.fileID}

bind.context=currRow.fileID

I am always getting an error: currRow is NULL.


Why is that?  



Now with the callback, where does this Java code go? 





 From: Barry Books trs...@gmail.com
To: Tapestry users users@tapestry.apache.org 
Sent: Friday, 30 August 2013 8:59 AM
Subject: Re: JQuery Datatable Bind Mixin
 

You will need to provide a javascript callback function to the mixin that
puts the value into the url. It's called like this

if ( callback ) {                    
   // TODO should work if value is array
   u.addContext = function(value) { u.url = u.url.replace(u.context,value) };
   callback(event,ui,u);
}

so I think your callback can be

function(event,ui,u) { u.addContext(Your Value); }



On Thu, Aug 29, 2013 at 6:18 PM, Taha Hafeez Siddiqi 
tawus.tapes...@gmail.com wrote:

 Try curRow.fileID instead of ${curRow.fileID} as parameter to bind.context

 Sent from my iPhone

 On 30-Aug-2013, at 3:26 AM, john c john998...@yahoo.com wrote:

  I am attempting to use the jquery/bind mixin with a datatable, but not
 having success.
  The relevant code is below. Basically I want to click a row and have it
 create a tapestry event, with the fileID.
  I have tested and found the event occurs, but I can't seem to pass the
 fileID context.
  Any ideas?
 
 
 
 ---
 
  t:jquery.datatable id=dataTable
 
    t:mixins=jquery/bind bind.event=datatableclick
 bind.eventType=click bind.zone=theZone bind.context=${currRow.fileID}
  include=... 
  /t:jquery.datatable
 
 
 ---
 
 
      @Persist
      @Property
      private OutboundFile currRow;
 
      @InjectComponent
      private Zone theZone;
 
 
      @OnEvent(datatableclick)
      public Object onDatatableClickEvent(String value) {
          System.out.println(value:  + value);
          return theZone.getBody();
      }

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



Re: JQuery Datatable Bind Mixin

2013-08-30 Thread Barry Books
The callback is javascript. The bind mixin has no way of know what value
you would like to pass back so the callback gets the value you want in the
javascript event then adds it into the event url

It's been a while but I think it's something like this

t:jquery.table id=dataTable

  t:row=currRow
  t:mixins=jquery/bind bind.event=datatableclick bind.eventType=click
bind.zone=theZone bind.callback=function(event,ui,u) {
u.addContext(Your Value); }
include=... 


On Fri, Aug 30, 2013 at 2:23 PM, john c john998...@yahoo.com wrote:

 Ok, here is a little more of the datatable code:

 t:jquery.table id=dataTable

   t:row=currRow
   t:mixins=jquery/bind bind.event=datatableclick
 bind.eventType=click bind.zone=theZone bind.context=${currRow.fileID}
 include=... 

   p:buttonCell
 t:jquery.dialogajaxlink t:dialog=myDialog
 t:zone=detailZone t:context=${thisfile.fileID}button
 class=smallgridbutton
 type=buttonRequeue/button/t:jquery.dialogajaxlink
  /p:buttonCell

 /t:jquery.datatable



 currRow is defined in java with @Property annotation.

 I have tried in the tml:

 bind.context=${currRow.fileID}

 bind.context=currRow.fileID

 I am always getting an error: currRow is NULL.


 Why is that?


 

 Now with the callback, where does this Java code go?




 
  From: Barry Books trs...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Friday, 30 August 2013 8:59 AM
 Subject: Re: JQuery Datatable Bind Mixin


 You will need to provide a javascript callback function to the mixin that
 puts the value into the url. It's called like this

 if ( callback ) {
// TODO should work if value is array
u.addContext = function(value) { u.url = u.url.replace(u.context,value)
 };
callback(event,ui,u);
 }

 so I think your callback can be

 function(event,ui,u) { u.addContext(Your Value); }



 On Thu, Aug 29, 2013 at 6:18 PM, Taha Hafeez Siddiqi 
 tawus.tapes...@gmail.com wrote:

  Try curRow.fileID instead of ${curRow.fileID} as parameter to
 bind.context
 
  Sent from my iPhone
 
  On 30-Aug-2013, at 3:26 AM, john c john998...@yahoo.com wrote:
 
   I am attempting to use the jquery/bind mixin with a datatable, but not
  having success.
   The relevant code is below. Basically I want to click a row and have it
  create a tapestry event, with the fileID.
   I have tested and found the event occurs, but I can't seem to pass the
  fileID context.
   Any ideas?
  
  
  
 
 ---
  
   t:jquery.datatable id=dataTable
  
 t:mixins=jquery/bind bind.event=datatableclick
  bind.eventType=click bind.zone=theZone
 bind.context=${currRow.fileID}
   include=... 
   /t:jquery.datatable
  
  
 
 ---
  
  
   @Persist
   @Property
   private OutboundFile currRow;
  
   @InjectComponent
   private Zone theZone;
  
  
   @OnEvent(datatableclick)
   public Object onDatatableClickEvent(String value) {
   System.out.println(value:  + value);
   return theZone.getBody();
   }
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 



Godzilla's Guide to Gradle/Geb

2013-08-30 Thread Barry Books
I'm no expert, in fact this is my first Gradle/Geb project. The following
works for me with 5.4 alpha:

With the Eclipse Gradle plugin I can do a Gradle build which runs the tests
and creates a war file.

create a build.gradle file with this

apply plugin: 'java'

apply plugin: 'war'

apply plugin: 'jetty'

apply plugin: 'eclipse-wtp'

apply plugin: 'groovy'

apply plugin: 'maven'



 project.ext.versions = [

jetty: 7.6.11.v20130520,

tomcat: 6.0.30,

testng: 6.5.2,

easymock: 3.0,

servletapi: 2.5,

spock: 0.7-groovy-2.0,

hibernate: 4.1.2.Final,

groovy: 2.0.6,

slf4j: 1.7.2,

wro4j: 1.7.0,

geb: 0.9.0,

selenium: 2.33.0

]


repositories {

  mavenCentral()

  maven {

url https://repository.apache.org/content/groups/staging;

}

}


dependencies {

compile 'org.apache.tapestry:tapestry-core:5.4-alpha-15'

compile 'org.apache.tapestry:tapestry-test:5.4-alpha-15'

compile 'org.apache.tapestry:tapestry-runner:5.4-alpha-15'

compile 'com.paypal.sdk:rest-api-sdk:0.5.2'

runtime 'javax.servlet:jstl:1.1.2'

providedCompile 'javax.servlet:servlet-api:2.5'

testRuntime org.slf4j:slf4j-log4j12:${versions.slf4j}

groovy org.codehaus.groovy:groovy-all:${versions.groovy}

testCompile org.gebish:geb-spock:${versions.geb}

testCompile org.spockframework:spock-core:${versions.spock}

testCompile
org.seleniumhq.selenium:selenium-java:${versions.selenium}, {

exclude group: org.eclipse.jetty

}

testCompile
org.seleniumhq.selenium:selenium-server:${versions.selenium}, {

exclude group: org.eclipse.jetty

}

}


test {

useJUnit()

systemProperties(geb.build.reportsDir: $reporting.baseDir/geb,

tapestry.compiled-asset-cache-dir:
$buildDir/compiled-asset-cache,

tapestry.production-mode: false)

}


in src/test/resources/GebConfig.groovy


driver = firefox


baseUrl = http://localhost:8080/sandbox;


waiting {

  // Long timeout since we have to wait for Rhino  friends to spin up

  timeout = 60

}


in src/test/groovy/tests/IndexTest.groovy


package tests


import geb.spock.GebReportingSpec

import org.apache.tapestry5.test.Jetty7Runner

import spock.lang.Shared


class IndexTest extends GebReportingSpec {


 @Shared

def runner;


 def setupSpec() {

runner = new Jetty7Runner(src/main/webapp, /sandbox, 8080, 8081);

runner.start()

}


 def cleanupSpec() {

runner.stop()

}



 def Check Index() {

when:

// Open index page

go()

then:

$(.title).text().trim() == Index

}

 def Check Button() {

when:

// Open index page

go()

then:

$(.btn).value().trim() == Create/Update

}

}


Adding tab to default project (index, about, contact)

2013-08-30 Thread Jeremy Villalobos
I am still new to Tapestry 5.  For a prototype, I am doing very simple user
login portal.   I would like to show a couple of option along with index,
about and contact, but they would only show up if the user is signed in.

How do I access the Layout class from a Page ?

I see on the documentation that I can use Nested Layouts  but I still
need some sample code or project to see how it works.

Thanks


Re: Tapestry 5.2.5: Tapestry Exception MarkupWriter.element() and not followed up with MarkupWriter.end()

2013-08-30 Thread rukmini n
Hi All,

Any one knows, what might be issue here. I'm still stuck. Please help..


On Tue, Aug 13, 2013 at 2:08 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote:

 Yup. Things change. Bugs get exposed etc.  that's just the way it is
 unfortunately.



 On Aug 13, 2013, at 5:02 PM, rukmini n rukmini...@gmail.com wrote:

  OK.. But this was working fine, earlier.. We upgraded tapestry from
 5.0.15
  to 5.2.5. Since then we are seeing this issue.
 
 
  Thanks,
  Rukmini
 
  On Tue, Aug 13, 2013 at 12:48 PM, Lenny Primak lpri...@hope.nyc.ny.us
 wrote:
 
  I would suggest you crack open the debugger, and debug the code that
  throws NPE.
  Even if it's inside Tapestry, it'll shine the light on what's causing it
  in your code.
  You will learn the mistake immediately, and learn something new in the
  process.
 
  On Aug 13, 2013, at 3:45 PM, rukmini n wrote:
 
  Hi Thiago..
 
  I tried, what you suggested.. But I got the exception. Please help..
 
 
  Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException [at
  classpath:com/test/ui/components/sh/common/LoginComponent.tml, line 44]
at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194)
at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AfterRenderBodyPhase.render(ComponentPageElementImpl.java:371)
at
 
 org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
... 110 more
  Caused by: java.lang.NullPointerException
at org.apache.tapestry5.dom.Node.moveBefore(Node.java:106)
at org.apache.tapestry5.dom.Element.pop(Element.java:657)
at
 
 com.test.ui.components.sh.common.FieldValidationErrorMsg.afterRenderBody(FieldValidationErrorMsg.java:104)
at
 
 com.test.ui.components.sh.common.FieldValidationErrorMsg$MethodAccess_afterRenderBody_1407932bda2.invoke(FieldValidationErrorMsg$MethodAccess_afterRenderBody_1407932bda2.java)
at
 
 org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117)
at
 
 org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86)
at
 
 org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at
 
 com.test.ui.components.sh.common.FieldValidationErrorMsg.afterRenderBody(FieldValidationErrorMsg.java)
at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AfterRenderBodyPhase.invokeComponent(ComponentPageElementImpl.java:364)
at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:176)
... 112 more
 
 
  Thanks,
  Rukmini
 
  On Tue, Aug 13, 2013 at 12:18 PM, Thiago H de Paula Figueiredo 
  thiag...@gmail.com wrote:
 
  On Tue, 13 Aug 2013 15:04:54 -0300, rukmini n rukmini...@gmail.com
  wrote:
 
  Hi Thiago,
 
  Hi!
 
  I think the problem is here:
 
 msgEle.removeChildren();
msgEle.pop();
 
  Have you tried just using msgEle.remove(), as you seem to want to
 remove
  the element completely?
 
 
  --
  Thiago H. de Paula Figueiredo
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
  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
 
 

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




Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Muhammad Gelbana

 Why are you asking that? Any specific need?


I'm asking because having a maintained session between the client and the
server is a better scenario. Instead of having to authenticate the user's
credentials upon every request. I'm aware there are other standard methods
to have a statefull web service, but I haven't explored that area yet, and
I thought it could be done faster and easier using the
ApplicationStateManager. Frankly the idea is not fully developed in my head.

Also I always like exploring all possible options to always be free to
chose whatever fit my needs more, and I always like to know more Tapestry
tricks.

I haven't used any other web framework and IoC other than Tapestry and I'm
not planning to do so anytime soon. It's a very good framework and I love
using it. So I'm always trying to find out ways to tweak it in every way
possible.



*-*
*Muhammad Gelbana*
Java Software Engineer


On Fri, Aug 30, 2013 at 6:58 PM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Fri, 30 Aug 2013 12:15:00 -0300, Muhammad Gelbana m.gelb...@gmail.com
 wrote:

  I have one last question. Is it possible to instruct the
 ApplicationStateManager to manage it's sessions using something else than
 a HTTP based request (i.e. Whether its *HttpServletRequest* or Tapestry's *
 Request*) ?


 Tapestry's Request is just a thin layer over HttpServletRequest. Same for
 Session and HttpSession. So, in the end, it's actually the servlet
 container the one implementing the session handling. You can override,
 advise or decorate the ApplicationStateManager and implement it any way you
 want. I never had a situation that needed that. Why are you asking that?
 Any specific need?


  This has been fruitful discussion, thanks a lot :)


 :)


 --
 Thiago H. de Paula Figueiredo

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




Re: Include everything with jquery java anotation ImportJQueryUI

2013-08-30 Thread Boris Horvat
btw any plans to update the jquery (the plugin I would like to use requires
newer jquery as it would seem)


On Thu, Aug 29, 2013 at 11:08 PM, Boris Horvat horvat.z.bo...@gmail.comwrote:

 Well I probably wont use them all but there is a possibility that I will
 use many. Still the plugin I plan to use will depend on quite a few and I
 was just curios if there is such way to add them all at once (I guess many
 of mine plugins will use some of them)

 PS I would follow the approach and create a component for this that much
 is certain :D


 On Thu, Aug 29, 2013 at 7:42 PM, Thiago H de Paula Figueiredo 
 thiag...@gmail.com wrote:

 On Thu, 29 Aug 2013 13:47:34 -0300, Boris Horvat 
 horvat.z.bo...@gmail.com wrote:

  Something like that but easier :D

 I would like to avoid doing

 @ImportJQueryUI({jquery.ui.**core, jquery.ui.widget,
 jquery.ui.mouse,
 jquery.ui.position, jquery.ui.accordion, jquery.ui.autocomplete,
 jquery.ui.button, jquery.ui.datepicker, jquery.ui.dialog,
 jquery.ui.draggable, jquery.ui.droppable, jquery.effects.blind,
 jquery.effects.bounce, jquery.effects.clip, jquery.effects.drop,
 jquery.effects.explode, jquery.effects.fade, jquery.effects.fold,
 jquery.effects.highlight, jquery.effects.pulsate,
 jquery.effects.scale, jquery.effects.shake, jquery.effects.slide,
 jquery.effects.transfer, jquery.ui.progressbar,
 jquery.ui.resizable,
 jquery.ui.selectable, jquery.ui.slider, jquery.ui.sortable,
 jquery.ui.tabs})


 Are you really using everything in the list above? I'd create one
 component for each thing there and each component imports the stuff it
 actually needs.

 --
 Thiago H. de Paula Figueiredo

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




 --
 Sincerely
 *Boris Horvat*




-- 
Sincerely
*Boris Horvat*


Re: Adding tab to default project (index, about, contact)

2013-08-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Aug 2013 17:33:28 -0300, Jeremy Villalobos  
jeremyvillalo...@gmail.com wrote:


I am still new to Tapestry 5.  For a prototype, I am doing very simple  
user login portal.   I would like to show a couple of option along with  
index,

about and contact, but they would only show up if the user is signed in.

How do I access the Layout class from a Page ?


You can @InjectComponent private Layout layout; in the page, but that's  
something to be avoided. The best practice is to have top-down  
communication: from page to component and from a component to the  
components declared inside it. What exactly do you need? Anyway, the  
logged in or not state wouldn't be handled inside just a given component  
or page. Instead, the simpler solution would be to have some sort of User  
class and declare @SessionState(create = false) private User user; fields  
in any page or component that needs it. See  
http://tapestry.apache.org/session-storage.html for more details.



I see on the documentation that I can use Nested Layouts  but I still
need some sample code or project to see how it works.


The Layout component is a component as each other, having no special  
meaning or treatment. If you use one component inside another, you're  
having nested components, and the same is valid for layouts, because  
layouts are ordinary components.


--
Thiago H. de Paula Figueiredo

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



Re: Tapestry 5.2.5: Tapestry Exception MarkupWriter.element() and not followed up with MarkupWriter.end()

2013-08-30 Thread Thiago H de Paula Figueiredo

On Fri, 30 Aug 2013 18:05:33 -0300, rukmini n rukmini...@gmail.com wrote:


Hi All,


Hi!


Any one knows, what might be issue here. I'm still stuck. Please help..


The error itself happens at  
com.test.ui.components.sh.common.FieldValidationErrorMsg.afterRenderBody,  
so we need its source to help you.


--
Thiago H. de Paula Figueiredo

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



Re: [5.3.7] Integrating Metro web services (Using Derkoe's code)

2013-08-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Aug 2013 17:51:17 -0300, Muhammad Gelbana m.gelb...@gmail.com  
wrote:



I'm asking because having a maintained session between the client and the
server is a better scenario. Instead of having to authenticate the user's
credentials upon every request.


As far as I know, that's how almost any webservice works and you're  
swimming against the tide here. As Lance already said, doing this or not  
depends on what the client is. If it uses HttpClient, it already supports  
cookies, so you don't need to change anything server-side. If not, then we  
need to know how the client is implemented to give y


I'm aware there are other standard methods to have a statefull web  
service, but I haven't explored that area yet, and I thought it could be  
done faster and easier using the
ApplicationStateManager. Frankly the idea is not fully developed in my  
head.


The problem with this is that you have to handle the session creation  
yourself and knowing which session should be used in a given request.  
That's a difficult problem that, if not implemented very, very carefully,  
can lead to session hijacking and other security problems.  
ApplicationStateManager is the service that handles the @SessionState  
annotation, so you can override, advice or decorate to make it work anyway  
you want.



Also I always like exploring all possible options to always be free to
chose whatever fit my needs more, and I always like to know more Tapestry
tricks.


Nice. :) The problem here, if I got it right, is that you want to replace  
a functionality which isn't implemented by Tapestry itself (session  
handling), being implemented by servlet containers instead. Of course, you  
can take a look at the sources of Jetty and Tomcat to know how they deal  
with sessions.


--
Thiago H. de Paula Figueiredo

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



Re: Using Hibernate Session outside of @CommitAfter. Bugs I saw in our project

2013-08-30 Thread John
Seperation of concerns rules the approach below out, however you can always 
create a top level facade layer between your DAOs and pages/components to 
resolve this. Your DAO classes can then be trivial CRUD implementations.

John
  - Original Message - 
  From: Lance Java 
  To: Tapestry users 
  Sent: Friday, August 30, 2013 11:47 AM
  Subject: Re: Using Hibernate Session outside of @CommitAfter. Bugs I saw in 
our project


  I never annotate my services or dao's with @CommitAfter and only annotate
  the actions in my pages / components. Is there a reason why you can't use
  this approach?


Re: Tapestry 5.2.5: Tapestry Exception MarkupWriter.element() and not followed up with MarkupWriter.end()

2013-08-30 Thread rukmini n
Thiago thanks for reponding. Here is the java code


  public class FieldValidationErrorMsg {

@Parameter(required = true, defaultPrefix=literal)
private String fieldId;

@Parameter
private Form form;

@Parameter
private Boolean leaveMessage;

@Parameter (defaultPrefix=literal)
private String errorId;

@Parameter (defaultPrefix=literal)
private String labelId;

@Environmental(false)
private ValidationTracker tracker;

public void setFieldId(String fieldId) {
this.fieldId = fieldId;
}
public String getFieldId() {
return this.fieldId;
}
public String getLabelId() {
return this.labelId;
}
public void setForm(Form form) {
this.form = form;
}

public void afterRenderBody(MarkupWriter writer) {
final String _fieldId = this.fieldId;
Field f = new Field() {
public String getLabel() { return null; }
public boolean isDisabled() { return false; }
public String getClientId() { return _fieldId; }
public String getControlName() { return _fieldId; }
public boolean isRequired() { return false; }
};

// grab the FieldValidationErrorMsg component
Element msgEle = writer.getElement();

ValidationTracker tracker;
if ( this.form != null ) {
tracker = this.form.getDefaultTracker();
} else {
tracker = this.tracker;
}

if ( (this.errorId != null  tracker.getError(f) != null 
tracker.getError(f).contains(this.errorId))
 || (this.errorId == null  tracker.inError(f)) ) {
// we need to display the error message, so do nothing, leave
it as is
} else {
// remove the error message, unless there's an instruction to
leave it in place
if (this.leaveMessage==null || !this.leaveMessage) {
msgEle.removeChildren();
msgEle.pop();
} else {
// we're leaving it in place, but will hide it on page load
by adding a class hidden
String curClassValue = msgEle.getAttribute(class);
String[] classValues = {class,hidden +curClassValue};
msgEle.forceAttributes(classValues);
}
}
}

}

and FieldValidationErrorMsg tml is

?xml version=1.0 encoding=UTF-8?
label for=${fieldId} class=error generated=false xmlns:t=
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
t:if test=labelId
t:sh.common.addAttribute name=id value=${labelId}/
/t:if
t:body /
/label


From whers its being called is Login.tml

div class=input clear
label
for=loginEmail${msg:common.formElement.Email}/label
input name=loginEmail t:id=loginEmail
t:type=TextField t:value=loginModel.loginEmail /
label t:type=sh/common/FieldValidationErrorMsg
t:fieldId=loginEmail
t:errorId=requiredFieldIsMissing${msg:common.formElement.EnterValidEmail}/label
/div


Thanks,
Rukmini


On Fri, Aug 30, 2013 at 2:28 PM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Fri, 30 Aug 2013 18:05:33 -0300, rukmini n rukmini...@gmail.com
 wrote:

  Hi All,


 Hi!


  Any one knows, what might be issue here. I'm still stuck. Please help..


 The error itself happens at com.test.ui.components.sh.**common.**
 FieldValidationErrorMsg.**afterRenderBody, so we need its source to help
 you.


 --
 Thiago H. de Paula Figueiredo

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




Re: Tapestry 5.2.5: Tapestry Exception MarkupWriter.element() and not followed up with MarkupWriter.end()

2013-08-30 Thread Thiago H de Paula Figueiredo

On Fri, 30 Aug 2013 19:49:38 -0300, rukmini n rukmini...@gmail.com wrote:


msgEle.removeChildren();
msgEle.pop();


I had already suggested you to replace the code above, both lines, to  
msgEle.remove(), but you left the call to pop(), which is quite probably  
the source of your problem. Please pay more attention to the suggestions  
the list gives you. ;)


--
Thiago H. de Paula Figueiredo

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