formatting attributes

2014-05-14 Thread Aristedes Maniatis
I understand that I can do this in the tml:

span itemprop=startDatet:output value=someDate 
format=literal:-MM-DD hh:mm:ss 'UTC' Z/span


But I want to put the value into an attribute to suit a Google schema 
microformat, like this:

abbr itemprop=startDate content=${format:date=-MM-DD hh:mm:ss 'UTC' 
Z,someDate} title=


This does not work. What am I missing here?


Ari Maniatis


-- 
--
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

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



Form values after zone update

2014-05-14 Thread Erich Gormann
Hi, 

I have put a loop renedering form filelds inside a zone. The zone is
enclosed by the form component. 
Inside the loop a zone update is triggered afer a valueChanged event. 

Alle values entered in the form elements at tis time are lost after zone
update. 

What is the recommended way to avoid this? Do I have to nest the form insde
the zone instead of enclosing the zone by the form? The intention of my
construction was to avoid a complete page reload like triggered by a form
submit, but now form values are not stored. 

Regards
Erich

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



Re: WebSocket for tapestry

2014-05-14 Thread Lance Java
If you just want Tapestry to manage an existing servlet, you can copy the
technique used by
AtmosphereHttpServletRequestFilter.

Make sure you set the async flag on the tapestry filter

   filter
filter-nameapp/filter-name
filter-classorg.apache.tapestry5.TapestryFilter/filter-class
async-supportedtrue/async-supported
/filter
 On 14 May 2014 04:22, Bogdan Ivascu ivascu.bogdan...@gmail.com wrote:

 Hi Lance,
   I did see numerous discussions around your implementation. My goal here
 is to try and get a better understanding of where and how this framework
 can be extended. I am however pressed for time and if I cannot get it to
 work, I will most likely end up using your implementation.

 Thanks,
 Bogdan.


 On Tue, May 13, 2014 at 3:34 AM, Lance Java lance.j...@googlemail.com
 wrote:

  Take a look at tapestry-atmosphere [1] and tapestry-cometd [2]
 
  [1] https://github.com/uklance/tapestry-atmosphere
  [2] https://github.com/uklance/tapestry-cometd
  On 13 May 2014 02:10, Bogdan Ivascu ivascu.bogdan...@gmail.com
 wrote:
 
   Hi everyone,
 I want to add webSocket support for my tapestry project and need a
 few
   pointers. What I have is a dead simple Servlet, implementing the java
   WebSocket api. I would like to bring this servlet into my tapestry
  project
   and have it managed by tapestry itself. To be more clear, I don't want
 to
   use the ignore path functionality to expose it, but rather have
  tapestry's
   filter control the access to this servlet.
  
   The biggest problem that I have right now is that I don't have a clear
   understanding of what I need to do to make this happen. Will this
 servlet
   be a service or a page with no tml, where would it sit, how do I
  configure
   tapestry so that it knows to create a new instance for each request.
  
   A nudge of where I could document myself regarding this type of
  integration
   would be most welcome.
  
   Thank you,
   Bogdan.
  
 



Re: formatting attributes

2014-05-14 Thread Chris Poulsen
You probably do not want the ${ } as that converts its contents into a
string.

-- 
Chris


On Wed, May 14, 2014 at 8:24 AM, Aristedes Maniatis a...@ish.com.au wrote:

 I understand that I can do this in the tml:

 span itemprop=startDatet:output value=someDate
 format=literal:-MM-DD hh:mm:ss 'UTC' Z/span


 But I want to put the value into an attribute to suit a Google schema
 microformat, like this:

 abbr itemprop=startDate content=${format:date=-MM-DD hh:mm:ss
 'UTC' Z,someDate} title=


 This does not work. What am I missing here?


 Ari Maniatis


 --
 --
 Aristedes Maniatis
 ish
 http://www.ish.com.au
 Level 1, 30 Wilson Street Newtown 2042 Australia
 phone +61 2 9550 5001   fax +61 2 9550 4001
 GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

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




Re: formatting attributes

2014-05-14 Thread Chris Poulsen
Sorry, apparently I didn't really read your question ;)

Can't you create a getter in your page to return what you need?




On Wed, May 14, 2014 at 2:09 PM, Chris Poulsen mailingl...@nesluop.dkwrote:

 You probably do not want the ${ } as that converts its contents into a
 string.

 --
 Chris


 On Wed, May 14, 2014 at 8:24 AM, Aristedes Maniatis a...@ish.com.auwrote:

 I understand that I can do this in the tml:

 span itemprop=startDatet:output value=someDate
 format=literal:-MM-DD hh:mm:ss 'UTC' Z/span


 But I want to put the value into an attribute to suit a Google schema
 microformat, like this:

 abbr itemprop=startDate content=${format:date=-MM-DD hh:mm:ss
 'UTC' Z,someDate} title=


 This does not work. What am I missing here?


 Ari Maniatis


 --
 --
 Aristedes Maniatis
 ish
 http://www.ish.com.au
 Level 1, 30 Wilson Street Newtown 2042 Australia
 phone +61 2 9550 5001   fax +61 2 9550 4001
 GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

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





Re: Form values after zone update

2014-05-14 Thread Thiago H de Paula Figueiredo
On Wed, 14 May 2014 04:08:38 -0300, Erich Gormann e.gorm...@gormann.de  
wrote:



Hi,


Hi!


I have put a loop renedering form filelds inside a zone. The zone is
enclosed by the form component.
Inside the loop a zone update is triggered afer a valueChanged event.

Alle values entered in the form elements at tis time are lost after zone
update.


It's lost because you're rendering them in a second request, the whole  
page one being the first, and Tapestry doesn't persist field values  
between requests by default (nor it should).


What is the recommended way to avoid this? Do I have to nest the form  
insde the zone instead of enclosing the zone by the form? The intention  
of my

construction was to avoid a complete page reload like triggered by a form
submit, but now form values are not stored.


The easiest is to annotated the edited fields with @Persist. Another one  
is to wait for a Tapestry release in which the Select component has a  
context parameter so you can repopulate the edited fields inside  
onValueChanged().


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Invalidating a session

2014-05-14 Thread Michael Gentry
Generally, yes, but sometimes you need access to methods not available in
Request.


On Tue, May 13, 2014 at 8:09 AM, Thiago H de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Mon, 12 May 2014 11:04:40 -0300, Michael Gentry mgen...@masslight.net
 wrote:

  Hi Sanket,

 We use:

 @Inject
 private HttpServletRequest request;
 ...
 if (request.getSession(false) != null)
 request.getSession(false).invalidate();

 However, since we also use an SSO, we have to remove all cookies
 associated
 with the SSO, etc.


 I'd do this instead:

 @Inject
 private Request request;


 ...

 if (request.getSession(false) != null) {
 request.getSession(false).invalidate();
 }

 --
 Thiago H. de Paula Figueiredo
 Tapestry, Java and Hibernate consultant and developer
 http://machina.com.br

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