Re: Name of application module class too complicated?

2010-03-17 Thread Klaus Kopruch

+1 for Josh's suggestion


Josh Canfield wrote:
 
 I've always just used AppModule...
 
 How about:
 look for FilterNameModule
 look for AppModule
 Throw exception can't find FilterNameModule or AppModule
 

-- 
View this message in context: 
http://old.nabble.com/Name-of-application-module-class-too-complicated--tp27857530p27928213.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



[OT] Tapestry 5 Contractor wanted asap in London

2010-03-17 Thread Ben Gidley
Apologies for spamming this list - but we are looking for a contractor with
Tapestry 5 for immediate start in London (we need on site).

If anyone is interested please email me!


Ben Gidley

www.gidley.co.uk
b...@gidley.co.uk


[Announce] Wooki - Collaborative Writing - version 0.2.0 is here!

2010-03-17 Thread Robin Komiwes
We are pleased to announce Wooki 0.2.0 release. We have been working more
than two months on this major update and we hope you will appreciate our
efforts.

For newcomers, Wooki is a collaborative writing tool that let users publish
and review documents. It is open source and distributed under the Apache 2.0
License. Of course, it is based on Tapestry 5.

What's new in Wooki 0.2.0?


   - PDF generation is now powered by Flying Saucer, which will offer great
   possibilities for PDF stylization
   - Redesigned User Interface to provide a more intuitive layout
   - Editor has been also improved with AJAX autosave, on the fly image
   upload and a fullscreen mode to make the edition easier
   - Feeds! Wooki now produces feeds on many pages. This feature is the
   result of integrating Rome library into Tapestry.
   - Spring 2.5 has been updated to Spring 3.
   - Last but not least this new version also includes a bunch of new
   Tapestry components. A great example is our Twitter like more button.

We are looking forward to blog about all thoses technicals asides on spread
the source blog.

Our demo website has been updated, try Wooki 0.2.0 now at
http://http://wookicentral.com/demo
wookicentral 
http://wookicentral.com/demo.com/demohttp://wookicentral.com/demo

We would like to thanks all our Github bugs reporters, all our followers,
everyone who have contributed to this project in some way and everyone who
supports it.

Next release should focus on providing a REST API, more imports and exports
formats and improving our core source code.

Regards,

- Wooki developpers team -- Christophe Cordenier, Robin Komiwes, Bruno
Verachten -- http://
http://wookicentral.comwookicentralhttp://wookicentral.com
.com http://wookicentral.com -- Source code :
http://github.com/robink/wooki -- http://twitter.com/spreadthesource


XSS vulnerability in calendar component

2010-03-17 Thread françois facon
Hello

The calendar component provided in tapestry 5.1.0.5 could be used to allow
code injection by malicious web users into any page that uses datefield .

To reproduce the vulnerability, put js code like  scriptalert(T5 is
great); /script in any datefield  and click on the related calendar bitma

After quick search in the DateField.js, it seems like the field value is not
escaping

triggerClicked : function()
{
if (this.field.disabled) return;

if (this.popup == null)
{
this.createPopup();

}
else
{
if (this.popup.visible())
{
this.hidePopup();
return;
}
}


var value = $F(this.field);


if (value == )
{
this.datePicker.setDate(null);
this.positionPopup();
this.revealPopup();
return;
}

var resultHandler = function(result)
{
var date = new Date();
date.setTime(result);
this.datePicker.setDate(date);
this.positionPopup();
this.revealPopup();
};

var errorHandler = function(message)
{
this.field.showValidationMessage(message);
this.field.activate();
};

this.sendServerRequest(this.parseURL, value, resultHandler,
errorHandler);
},


escaping the field value seems solve this vulnerability  var value =
escape($F(this.field));

Do i have to create a Jira for this issues?

In order to deliver a patch we are currently using a decorator for
assetSource in order to provide another version of datefIeld.js.
Is there a better way to fix this issue?


Best Regards
François  Nourredine


Use of hibernate in tapestry tutorial JBoss 5.1

2010-03-17 Thread jaques robert
Hi,

In this tutorial there is facility for using hibernate in tapestry using the 
package entities of the project :

But what entities? Normally, the available entities are listed inside 
hibernate.cfg.xml, but that's not necessary with Tapestry; in another 
example of convention over configuration, Tapestry locates all entity 
classes inside the entities package and adds them to the configuration. 
Currently, that is just the Address entity.

http://tapestry.apache.org/tapestry5/tutorial1/forms2.html

However with JBoss 5.1 I've got this error when executing the sample :


location
classpath:org/apache/tapestry5/corelib/components/BeanEditForm.tml, line 
1org.hibernate.MappingException
Unknown entity: 
com.repository.wizard.tapestry.entities.Address
messages
* Unknown entity: 
com.repository.wizard.tapestry.entities.Address
throwableCount
1
throwables
* org.hibernate.MappingException: Unknown entity: 
com.repository.wizard.tapestry.entities.Address

Does somebody manage to run it on JBoss 5.1 ?

Regards,
Mondes_engloutis.



  

Re: Simple Event Propagation Problem

2010-03-17 Thread Nicolas Bouillon
Thank you Howard for the clear response. Of course it works well now.

I was a bit surprised that it doesn't worked because I had already done
this kind of event propagation for a method named onSuccess(). But I
believed it worked because I had not specified the name of the component.

On Tue, 16 Mar 2010 15:24:46 -0700, Howard Lewis Ship hls...@gmail.com
wrote:
 Because the action event was not caught by it's immediate container
 (the Layout component), it propagated up with a new origin: the Layout
 component itself.  so onActionFromLayout() would work (because the id
 'layout' will have been autoassigned by Tapestry).
 
 The concept here is that the Layout component should limit how much of
 its internal structure is exposed to the outside world: it should
 ideally be a black box.
 
 Often, a component will capture action events from one or more
 components and trigger new events with names customized to what the
 component does; here is might trigger an edit event, and you would
 name your method onEditFromLayout().
 
 
 
 On Tue, Mar 16, 2010 at 2:57 PM, Nicolas Bouillon nico...@bouil.org
 wrote:
 Hi,

 I have a simple problem. I use a component as a layout, and i want to
 have
 an action link that will be handled by the page that use the layout. I
 believed that the event from actionLink goes from the Layout Component
to
 my
 page containing the component (here it is Index)

 Here is the source excerpt :

 Index.tml :
 html t:type=layout p:title=title
   
 /html

 Layout.tml
 
   t:actionlink t:id=editEdit/t:actionlink
 ...
 div id=content
               h2${title}/h2
               t:body /
 /div
 

 Index.java

   @OnEvent(component = edit, value = EventConstants.ACTION)
   public Object onActionFromEdit() {
       return Edit.class;

   }

 And I got the following error :

 16/03/2010 22:51:51 ERROR
 org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler -
 Processing of request failed with uncaught exception: Request event
 'action'
 (on component w/Index:layout.edit) was not handled; you must provide a
 matching event handler method in the component or in one of its
 containers.
 org.apache.tapestry5.ioc.internal.util.TapestryException: Request event
 'action' (on component w/Index:layout.edit) was not handled; you must
 provide a matching event handler method in the component or in one of
its
 containers. [at classpath:org/bouil/tapestry/components/Layout.tml, line
 59]
   at

org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:79)
   at

org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
   at

$ComponentEventRequestHandler_12768f52a94.handle($ComponentEventRequestHandler_12768f52a94.java)
   at

org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
 ...

 What's wrong ?

 Thanks.
 Nicolas.


 -
 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: XSS vulnerability in calendar component

2010-03-17 Thread Howard Lewis Ship
Please file an issue in JIRA; a patch is most welcome!

2010/3/17 françois facon fra.fa...@gmail.com:
 Hello

 The calendar component provided in tapestry 5.1.0.5 could be used to allow
 code injection by malicious web users into any page that uses datefield .

 To reproduce the vulnerability, put js code like  scriptalert(T5 is
 great); /script in any datefield  and click on the related calendar bitma

 After quick search in the DateField.js, it seems like the field value is not
 escaping

 triggerClicked : function()
    {
        if (this.field.disabled) return;

        if (this.popup == null)
        {
            this.createPopup();

        }
        else
        {
            if (this.popup.visible())
            {
                this.hidePopup();
                return;
            }
        }


        var value = $F(this.field);


        if (value == )
        {
            this.datePicker.setDate(null);
            this.positionPopup();
            this.revealPopup();
            return;
        }

        var resultHandler = function(result)
        {
            var date = new Date();
            date.setTime(result);
            this.datePicker.setDate(date);
            this.positionPopup();
            this.revealPopup();
        };

        var errorHandler = function(message)
        {
            this.field.showValidationMessage(message);
            this.field.activate();
        };

        this.sendServerRequest(this.parseURL, value, resultHandler,
 errorHandler);
    },


 escaping the field value seems solve this vulnerability      var value =
 escape($F(this.field));

 Do i have to create a Jira for this issues?

 In order to deliver a patch we are currently using a decorator for
 assetSource in order to provide another version of datefIeld.js.
 Is there a better way to fix this issue?


 Best Regards
 François  Nourredine




-- 
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: Tapestry in Action on SeeSaw

2010-03-17 Thread Howard Lewis Ship
Will it be recorded?  I'd really like to see this, but I can't jump
over to London for it !

On Wed, Mar 17, 2010 at 2:11 AM, Ben Gidley b...@gidley.co.uk wrote:
 Hi,

 If you are interested I am doing at free talk at Skillsmatter in London next
 Tuesday (23rd March 2010) going through how we used tapestry on seesaw.com

 Details of the talk and directions are at
 http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486

 Ben Gidley

 www.gidley.co.uk
 b...@gidley.co.uk




-- 
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



Order of processing of mixins

2010-03-17 Thread LiborGMC

Hi there,
I've implemented two mixins which just add some JavaScript code to action
onClick to actionLink. I defined these two mixins to one actionLink. I
expect that order in which mixins are fired is the same as I defined in
t:mixins attribute. Firefox 3 is keeping this order but IE 8 isn't. Can I
specify somehow the order of processing of mixins?

I think it is bug I would expected that behaviour is independent from type
of browser.

Regards
-- 
View this message in context: 
http://old.nabble.com/Order-of-processing-of-mixins-tp27933566p27933566.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: Order of processing of mixins

2010-03-17 Thread Michael Prescott
As I understand it, mixin order is unspecified.  A developer on our team had
this issue and wound up implementing a custom component, IIRC.

Michael

On Wed, Mar 17, 2010 at 11:45 AM, LiborGMC l.pre...@gmc.net wrote:


 Hi there,
 I've implemented two mixins which just add some JavaScript code to action
 onClick to actionLink. I defined these two mixins to one actionLink. I
 expect that order in which mixins are fired is the same as I defined in
 t:mixins attribute. Firefox 3 is keeping this order but IE 8 isn't. Can I
 specify somehow the order of processing of mixins?

 I think it is bug I would expected that behaviour is independent from type
 of browser.

 Regards
 --
 View this message in context:
 http://old.nabble.com/Order-of-processing-of-mixins-tp27933566p27933566.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: Order of processing of mixins

2010-03-17 Thread Robert Zeigler

Depends on what version of Tapestry you are using.
Explicit ordering of mixins is in trunk.

Robert

On Mar 17, 2010, at 3/178:50 AM , Michael Prescott wrote:

As I understand it, mixin order is unspecified.  A developer on our  
team had

this issue and wound up implementing a custom component, IIRC.

Michael

On Wed, Mar 17, 2010 at 11:45 AM, LiborGMC l.pre...@gmc.net wrote:



Hi there,
I've implemented two mixins which just add some JavaScript code to  
action
onClick to actionLink. I defined these two mixins to one  
actionLink. I
expect that order in which mixins are fired is the same as I  
defined in
t:mixins attribute. Firefox 3 is keeping this order but IE 8  
isn't. Can I

specify somehow the order of processing of mixins?

I think it is bug I would expected that behaviour is independent  
from type

of browser.

Regards
--
View this message in context:
http://old.nabble.com/Order-of-processing-of-mixins-tp27933566p27933566.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



How to order libraries mapping ?

2010-03-17 Thread Nourredine K.
Hello,
 
I want to provide an easy way, for users (developpers), to
extend GUI modules (CRUD tapestry pages/components). So we give them a
generic module (a component library) that they can extend/override.
 
The constraint is that we don't want to use url rewriting. So,
we use the same alias for both mappings (generic and extended modules) and the
users have to use the same name for their extended pages and components as the
generic ones.
 
The ideal would be to have an ordered list for libraries
mapping (I know that the method contributeComponentClassResolver uses an
unordered list)
 
Any idea to handle libraries mapping order ?
 
Nourredine.


  

Re: XSS vulnerability in calendar component

2010-03-17 Thread françois facon
https://issues.apache.org/jira/browse/TAP5-1057


Re: Tapestry in Action on SeeSaw

2010-03-17 Thread Ben Gidley
I believe they will be recording it - so you should be able to catch a
screen/pod cast.
Ben Gidley

www.gidley.co.uk
b...@gidley.co.uk


On Wed, Mar 17, 2010 at 3:18 PM, Howard Lewis Ship hls...@gmail.com wrote:

 Will it be recorded?  I'd really like to see this, but I can't jump
 over to London for it !

 On Wed, Mar 17, 2010 at 2:11 AM, Ben Gidley b...@gidley.co.uk wrote:
  Hi,
 
  If you are interested I am doing at free talk at Skillsmatter in London
 next
  Tuesday (23rd March 2010) going through how we used tapestry on
 seesaw.com
 
  Details of the talk and directions are at
  http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486
 
  Ben Gidley
 
  www.gidley.co.uk
  b...@gidley.co.uk
 



 --
 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: Tapestry in Action on SeeSaw

2010-03-17 Thread Inge Solvoll
Please send the link if/when there is a screencast! :)

On Wed, Mar 17, 2010 at 5:42 PM, Ben Gidley b...@gidley.co.uk wrote:

 I believe they will be recording it - so you should be able to catch a
 screen/pod cast.
 Ben Gidley

 www.gidley.co.uk
 b...@gidley.co.uk


 On Wed, Mar 17, 2010 at 3:18 PM, Howard Lewis Ship hls...@gmail.com
 wrote:

  Will it be recorded?  I'd really like to see this, but I can't jump
  over to London for it !
 
  On Wed, Mar 17, 2010 at 2:11 AM, Ben Gidley b...@gidley.co.uk wrote:
   Hi,
  
   If you are interested I am doing at free talk at Skillsmatter in London
  next
   Tuesday (23rd March 2010) going through how we used tapestry on
  seesaw.com
  
   Details of the talk and directions are at
   http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486
  
   Ben Gidley
  
   www.gidley.co.uk
   b...@gidley.co.uk
  
 
 
 
  --
  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: Tapestry in Action on SeeSaw

2010-03-17 Thread Ivano Luberti
+1

Il 17/03/2010 18.13, Inge Solvoll ha scritto:
 Please send the link if/when there is a screencast! :)

 On Wed, Mar 17, 2010 at 5:42 PM, Ben Gidley b...@gidley.co.uk wrote:

   
 I believe they will be recording it - so you should be able to catch a
 screen/pod cast.
 Ben Gidley

 www.gidley.co.uk
 b...@gidley.co.uk


 On Wed, Mar 17, 2010 at 3:18 PM, Howard Lewis Ship hls...@gmail.com
 wrote:

 
 Will it be recorded?  I'd really like to see this, but I can't jump
 over to London for it !

 On Wed, Mar 17, 2010 at 2:11 AM, Ben Gidley b...@gidley.co.uk wrote:
   
 Hi,

 If you are interested I am doing at free talk at Skillsmatter in London
 
 next
   
 Tuesday (23rd March 2010) going through how we used tapestry on
 
 seesaw.com
   
 Details of the talk and directions are at
 http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486

 Ben Gidley

 www.gidley.co.uk
 b...@gidley.co.uk

 


 --
 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


   
 
   

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


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



How to hook component into validation?

2010-03-17 Thread Michael Prescott
I have a component which is a wrapper around some form fields.  (Imagine an
'edit address' component.)

If I want to provide some custom validation, is there a way to listen to the
enclosing form's validation event?  The problem is that the form is defined
in the page, not in my component. Right now, the page catches the validation
event and then calls a validate(Form form) method on my component.

But I'm wondering if there's a way to have my component do this
automatically, so that future users won't have to remember to hook this up.
(Plus, the page's validation event handler does nothing else, so it's kinda
silly.)

Any tips greatly appreciated!

Michael


Re: Tapestry in Action on SeeSaw

2010-03-17 Thread Alfonso Quiroga
+1 , I want to see the video :)

On Wed, Mar 17, 2010 at 2:17 PM, Ivano Luberti lube...@archicoop.it wrote:

 +1

 Il 17/03/2010 18.13, Inge Solvoll ha scritto:
  Please send the link if/when there is a screencast! :)
 
  On Wed, Mar 17, 2010 at 5:42 PM, Ben Gidley b...@gidley.co.uk wrote:
 
 
  I believe they will be recording it - so you should be able to catch a
  screen/pod cast.
  Ben Gidley
 
  www.gidley.co.uk
  b...@gidley.co.uk
 
 
  On Wed, Mar 17, 2010 at 3:18 PM, Howard Lewis Ship hls...@gmail.com
  wrote:
 
 
  Will it be recorded?  I'd really like to see this, but I can't jump
  over to London for it !
 
  On Wed, Mar 17, 2010 at 2:11 AM, Ben Gidley b...@gidley.co.uk wrote:
 
  Hi,
 
  If you are interested I am doing at free talk at Skillsmatter in
 London
 
  next
 
  Tuesday (23rd March 2010) going through how we used tapestry on
 
  seesaw.com
 
  Details of the talk and directions are at
  http://skillsmatter.com/event/java-jee/tapestry-5-in-action/zx-486
 
  Ben Gidley
 
  www.gidley.co.uk
  b...@gidley.co.uk
 
 
 
 
  --
  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
 
 
 
 
 

 --
 ==
 dott. Ivano Mario Luberti
 Archimede Informatica societa' cooperativa a r. l.
 Sede Operativa
 Via Gereschi 36 - 56126- Pisa
 tel.: +39-050- 580959
 tel/fax: +39-050-9711344
 web: www.archicoop.it
 ==


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




Modifying the title in a layout component

2010-03-17 Thread Robert Hailey


I'm using 5.1.0.5 and thought I could do something like this...

[Page.tml]
html t:type=layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd 


head t:type=header
titleMy Page Title/title
/head
body t:type=passthru
h1My Page Content/h1
/body
/html

The 'passthru' component was easy to make, but apparently the  
t:extension-point works much more logically than I was expecting, re- 
rendering it's parent template. :)


[Header.tml]
t:extend xmlns:t=http://tapestry.apache.org/schema/ 
tapestry_5_1_0.xsd

t:replace id=headerExtensionPoint
t:body/
/t:replace
/t:extend

So my question is this, is there a component whose body can be swapped  
out based on the presence of another component in the tree? Is it  
possible to write one? It would be a shame to sacrifice the WYSIWYG  
elegance just for the page title...


I suppose this is the way it is normally done:
http://code.google.com/p/shams/wiki/Component

--
Robert Hailey




How to create absolute URL?

2010-03-17 Thread Algirdas

For registration process, I need to send user an email with an absolute link
to my site, which finalizes the
registration, that is, full URL with protocol (may be https), site name,
page  parameters:

http://www.somemysite.com/register/p=RTWE343434dsfdf3435353sfsdfsdfdsf


Is there a way from Tapestry (5.1.0.5) to generate such URL?
-- 
View this message in context: 
http://n2.nabble.com/How-to-create-absolute-URL-tp4752509p4752509.html
Sent from the Tapestry Users 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 create absolute URL?

2010-03-17 Thread Dariusz Majewski
Hi,

Not sure that this is the best way, but I did it like this:

@Inject
private Request request;

@Inject
private RequestGlobals requestGlobals;

public String getHostUrl(){
if(hostUrl == null){
hostUrl =
getRequestGlobals().getHTTPServletRequest().getScheme()+://;
hostUrl += getRequest().getServerName();
if(getRequestGlobals().getHTTPServletRequest().getServerPort()
!= 80){
hostUrl +=
:+getRequestGlobals().getHTTPServletRequest().getServerPort();
}
}
return hostUrl;
}

--
Cheers,
Dariusz


On Wed, Mar 17, 2010 at 7:35 PM, Algirdas algirda...@gmail.com wrote:


 For registration process, I need to send user an email with an absolute
 link
 to my site, which finalizes the
 registration, that is, full URL with protocol (may be https), site name,
 page  parameters:

 http://www.somemysite.com/register/p=RTWE343434dsfdf3435353sfsdfsdfdsf


 Is there a way from Tapestry (5.1.0.5) to generate such URL?
 --
 View this message in context:
 http://n2.nabble.com/How-to-create-absolute-URL-tp4752509p4752509.html
 Sent from the Tapestry Users 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 hook component into validation?

2010-03-17 Thread Joost Schouten (ml)
You can listen for the validation events on the individual form elements 
of your component.


eg:

@Enviromental
private ValidationTracker validationTracker;

@OnEvent(component = myFormField, value = EventConstants.VALIDATE)
private void validateFormField(Object valueAboutToBeSet) {
   //do your validation and record errors where needed with the 
validationTracker

}

Hope this helps,
Joost

Michael Prescott wrote:

I have a component which is a wrapper around some form fields.  (Imagine an
'edit address' component.)

If I want to provide some custom validation, is there a way to listen to the
enclosing form's validation event?  The problem is that the form is defined
in the page, not in my component. Right now, the page catches the validation
event and then calls a validate(Form form) method on my component.

But I'm wondering if there's a way to have my component do this
automatically, so that future users won't have to remember to hook this up.
(Plus, the page's validation event handler does nothing else, so it's kinda
silly.)

Any tips greatly appreciated!

Michael

  



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



Re: [Announce] Wooki - Collaborative Writing - version 0.2.0 is here!

2010-03-17 Thread abangkis
Great, i was waiting for this.

Congrats ! :)

On Wed, Mar 17, 2010 at 9:19 PM, Robin Komiwes odiss...@gmail.com wrote:
 We are pleased to announce Wooki 0.2.0 release. We have been working more
 than two months on this major update and we hope you will appreciate our
 efforts.

 For newcomers, Wooki is a collaborative writing tool that let users publish
 and review documents. It is open source and distributed under the Apache 2.0
 License. Of course, it is based on Tapestry 5.

 What's new in Wooki 0.2.0?


   - PDF generation is now powered by Flying Saucer, which will offer great
   possibilities for PDF stylization
   - Redesigned User Interface to provide a more intuitive layout
   - Editor has been also improved with AJAX autosave, on the fly image
   upload and a fullscreen mode to make the edition easier
   - Feeds! Wooki now produces feeds on many pages. This feature is the
   result of integrating Rome library into Tapestry.
   - Spring 2.5 has been updated to Spring 3.
   - Last but not least this new version also includes a bunch of new
   Tapestry components. A great example is our Twitter like more button.

 We are looking forward to blog about all thoses technicals asides on spread
 the source blog.

 Our demo website has been updated, try Wooki 0.2.0 now at
 http://http://wookicentral.com/demo
 wookicentral 
 http://wookicentral.com/demo.com/demohttp://wookicentral.com/demo

 We would like to thanks all our Github bugs reporters, all our followers,
 everyone who have contributed to this project in some way and everyone who
 supports it.

 Next release should focus on providing a REST API, more imports and exports
 formats and improving our core source code.

 Regards,

 - Wooki developpers team -- Christophe Cordenier, Robin Komiwes, Bruno
 Verachten -- http://
 http://wookicentral.comwookicentralhttp://wookicentral.com
 .com http://wookicentral.com -- Source code :
 http://github.com/robink/wooki -- http://twitter.com/spreadthesource


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