Re: About T5 integration modules

2009-12-24 Thread Gerald Bauer
Howard,

I agree with you but I don't think that is the issue here. The question was
how come with Frameworks such as Wicket there is an explosion of integration
modules written and well documented whereas in Tapestry there is only a
handful. Is this because Tapestry is too complex for achieving such goals?



On Wed, Dec 23, 2009 at 5:21 PM, Howard Lewis Ship hls...@gmail.com wrote:

 While it's true that other frameworks (Grails, Wicket, Rails) have
 large numbers of integrations, if you talk to real developers you find
 out that the majority of those integrations are not actually usable
 for production work. All too often, they are orphaned, unsupported,
 incomplete, naive or coded against an earlier version of the core
 framework ... or some combination of all of those.

 I do a lot of training and consulting on Tapestry with a lot of groups
 and what I find is that one size does not fit all, even for simple
 things like user authentication/login. I'm quite happy to have a
 limited number of basic integrations that are documented, supported
 and tested.  Would I like every application to just be a matter of
 mixing pre-built modules together?  Yes.  Do I think it is realistic,
 for ANY framework?  No.

 On Wed, Dec 23, 2009 at 7:48 AM, Howard Lewis Ship hls...@gmail.com
 wrote:
  Noe, I've been down this path before, regrettably.  The ONLY thing to
  do it to ignore the trolls.
 
  On Tue, Dec 22, 2009 at 11:29 PM, Newham, Cameron cameron.new...@bl.uk
 wrote:
  I don't agree with the OP that the ServerSide discussion shows Tapestry
 has lost the battle - two posters state they don't want to see Tapestry
 mentioned. That's all there is.
 
  However, I can't agree with you Thiago. The old saying is if you say it
 enough times then people will believe it is true.
 
  If you are just going to stand by and let trolls post bad things about
 Tapestry unchallenged then they have won the argument - regardless of how
 bad their argument may be and how incorrect their views may be.
 
  After all, someone pitching up and wanting a framework will read what
 they've written and believe it. Who is to say these anti-Tapestry people are
 wrong?  Not you - because you won't counter their arguments! :-)
 
  Sure - don't feed the trolls. But all that is necessary is to say
 something positive; not engage them in an argument.
 
  Merry Xmas everyone.
 
 
  -Original Message-
  From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
  Sent: 22 December 2009 15:26
  To: Tapestry users
  Subject: Re: Discussion
 
  Em Tue, 22 Dec 2009 12:45:20 -0200, Banchi Liko banchi...@gmail.com
  escreveu:
 
  Hi guys,
 
  Hi!
 
  There is a discussion going on here
  http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems
  like Tapestry ihas already been ruled out as a viable and serious web
  framework.
 
  TheServerSide comments has too many trolls to have a good, reasonable
  discussion there.
 
  Wicket seems to be the favorite.
 
  Some people who bother to post there like Wicket. Most people who like
  Tapestry, maybe all of them, don't bother to post there.
 
  I'm sad Tapestry has lost the battle and afraid it might die soon.
 
  Please source or explain your statements or you'll be treated like a
 troll
  here.
 
  Please go and contribute and let your voice be
  heard before Tapestry dies a horrible death.
 
  No, thank you. Posting there will not change Tapestry's fate. Using it,
  exchanging ideas in the mailing lists and contributing code will (and
  already is).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
  and instructor
  Owner, software architect and developer, Ars Machina Tecnologia da
  Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  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
 
 
 
 
 
  --
  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
 



 --
 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: About T5 integration modules

2009-12-24 Thread cordenier christophe
Hello,

And what about integration of Tapestry in other framework ?

From my experience view, integrating technologies in Tapestry is fun and
fast, and the one provided by Tapestry are really good and enough to do what
a Web Application should do. !but when i want to do the inverse i am facing
a problem with Tapestry public API. Getting the Tapestry registry is simple
but calling services from the outside is not as easy.

For exemple, currently i am trying to secure my application by using
spring-security to centralize security concerns, and then create a RoleVoter
to secure also Tapestry URLs. To achieve this, Spring allows me to access to
the servlet context and then to Tapestry Registry, now we can imagine that
analyzing the URL will be as easy as using the ComponentEventLinkEncoder
service, but in real i had to create an instance of RequestImpl, retrieve
others services, set the request into the RequestGlobals... service just to
analyze the URL !

Tapestry is so powerful and has everything to work standalone (see wrappers
around servlet API, or PageTester, ...), but sometimes it's hard to exploit
this great feature ...

Best Regards,
Christophe



2009/12/23 Howard Lewis Ship hls...@gmail.com

 While it's true that other frameworks (Grails, Wicket, Rails) have
 large numbers of integrations, if you talk to real developers you find
 out that the majority of those integrations are not actually usable
 for production work. All too often, they are orphaned, unsupported,
 incomplete, naive or coded against an earlier version of the core
 framework ... or some combination of all of those.

 I do a lot of training and consulting on Tapestry with a lot of groups
 and what I find is that one size does not fit all, even for simple
 things like user authentication/login. I'm quite happy to have a
 limited number of basic integrations that are documented, supported
 and tested.  Would I like every application to just be a matter of
 mixing pre-built modules together?  Yes.  Do I think it is realistic,
 for ANY framework?  No.

 On Wed, Dec 23, 2009 at 7:48 AM, Howard Lewis Ship hls...@gmail.com
 wrote:
  Noe, I've been down this path before, regrettably.  The ONLY thing to
  do it to ignore the trolls.
 
  On Tue, Dec 22, 2009 at 11:29 PM, Newham, Cameron cameron.new...@bl.uk
 wrote:
  I don't agree with the OP that the ServerSide discussion shows Tapestry
 has lost the battle - two posters state they don't want to see Tapestry
 mentioned. That's all there is.
 
  However, I can't agree with you Thiago. The old saying is if you say it
 enough times then people will believe it is true.
 
  If you are just going to stand by and let trolls post bad things about
 Tapestry unchallenged then they have won the argument - regardless of how
 bad their argument may be and how incorrect their views may be.
 
  After all, someone pitching up and wanting a framework will read what
 they've written and believe it. Who is to say these anti-Tapestry people are
 wrong?  Not you - because you won't counter their arguments! :-)
 
  Sure - don't feed the trolls. But all that is necessary is to say
 something positive; not engage them in an argument.
 
  Merry Xmas everyone.
 
 
  -Original Message-
  From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
  Sent: 22 December 2009 15:26
  To: Tapestry users
  Subject: Re: Discussion
 
  Em Tue, 22 Dec 2009 12:45:20 -0200, Banchi Liko banchi...@gmail.com
  escreveu:
 
  Hi guys,
 
  Hi!
 
  There is a discussion going on here
  http://www.theserverside.com/news/thread.tss?thread_id=58858 and seems
  like Tapestry ihas already been ruled out as a viable and serious web
  framework.
 
  TheServerSide comments has too many trolls to have a good, reasonable
  discussion there.
 
  Wicket seems to be the favorite.
 
  Some people who bother to post there like Wicket. Most people who like
  Tapestry, maybe all of them, don't bother to post there.
 
  I'm sad Tapestry has lost the battle and afraid it might die soon.
 
  Please source or explain your statements or you'll be treated like a
 troll
  here.
 
  Please go and contribute and let your voice be
  heard before Tapestry dies a horrible death.
 
  No, thank you. Posting there will not change Tapestry's fate. Using it,
  exchanging ideas in the mailing lists and contributing code will (and
  already is).
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
  and instructor
  Owner, software architect and developer, Ars Machina Tecnologia da
  Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  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: 

Re: Number Formatting in TextField (T5)

2009-12-24 Thread Thiago H. de Paula Figueiredo
Em Thu, 24 Dec 2009 01:09:03 -0200, Benny Law benny.mk@gmail.com  
escreveu:



Hi Thiago,


Hi!

I just thought of another idea and would like to bounce it off you.  
Instead of subclassing AbstractTextField to create NumericField, I can  
just use
TextField as is, but define a new binding prefix for the translate  
parameter

which will allow the format pattern to be specified as the binding
expression, like this:

t:textfield t:id=latitude translate=numberformat:0.0 /


This is very clever! I guess it'll work. :) Just pay attention that the  
parameter received by the translate is a FieldTranslator, not a Translator  
itself.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: About T5 integration modules

2009-12-24 Thread Thiago H. de Paula Figueiredo
Em Thu, 24 Dec 2009 07:40:09 -0200, Gerald Bauer gtat...@gmail.com  
escreveu:


I agree with you but I don't think that is the issue here. The question  
was how come with Frameworks such as Wicket there is an explosion of  
integrationmodules written and well documented whereas in Tapestry there  
is only a
handful. Is this because Tapestry is too complex for achieving such  
goals?


No. Some years ago, when Tapestry was still in its 5.0.5 version  
(pre-pre-pre-alpha), I wrote a very simple Hibernate integration package  
in Tapestry-IoC, including automatic transaction management. I was a  
complete T-IoC newbie then. I wrote it in 8 hours, most of them dealing  
with the transaction management itself, not with T-IoC.


Summary of the reasons Tapestry and Tapestry-IoC don't have the same  
number of integrations as Wicket, as discussed recently in  
http://old.nabble.com/Discussion-to26889452s302.html:


1) Someone has to write them. Time is needed for this.

2) Wicket is way older (4.5 years vs 1.5 years), so the Wicket people had  
3x more time to write them than the Tapestry people.


3) More people use Wicket than Tapestry (I don't have any figures), so the  
total amount of time for writing integrations is larger.


Sometimes, technology-related issues have non-technology causes. And  
sometimes the best option is not the mostly used. Example: Struts until  
some time ago, JSF now.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Tapestry URL Rewriting Support and form submit

2009-12-24 Thread Sergey Kashin

Hello.

I have create one simple rule for url rewriting.
as described in manual 
http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html


All works fine except submit action. Tapestry redirect to 
rewrite page except original

if submit action occurs.
 
Example:

rule: rewrite /test to /testRewrited

urls looks like /test until submit action occurs
after submit it looks /testRewrited
if I'am not define return page in
onSuccess() page method.

It seems like a bug.



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



Re: About T5 integration modules

2009-12-24 Thread Ivano Luberti
Thiago, every time I see your solutions and the easyness with which you
find them I wonder how you have learned to use Tapestry.
Do you are involved in design and development of  Tapestry core  ? Are
you a committer that hase learned by using it?
Knowing that could really show the way to others , wouldn't it ?

Thiago H. de Paula Figueiredo ha scritto:
 Em Thu, 24 Dec 2009 07:40:09 -0200, Gerald Bauer gtat...@gmail.com
 escreveu:

 I agree with you but I don't think that is the issue here. The
 question was how come with Frameworks such as Wicket there is an
 explosion of integrationmodules written and well documented whereas
 in Tapestry there is only a
 handful. Is this because Tapestry is too complex for achieving such
 goals?

 No. Some years ago, when Tapestry was still in its 5.0.5 version
 (pre-pre-pre-alpha), I wrote a very simple Hibernate integration
 package in Tapestry-IoC, including automatic transaction management. I
 was a complete T-IoC newbie then. I wrote it in 8 hours, most of them
 dealing with the transaction management itself, not with T-IoC.

 Summary of the reasons Tapestry and Tapestry-IoC don't have the same
 number of integrations as Wicket, as discussed recently in
 http://old.nabble.com/Discussion-to26889452s302.html:

 1) Someone has to write them. Time is needed for this.

 2) Wicket is way older (4.5 years vs 1.5 years), so the Wicket people
 had 3x more time to write them than the Tapestry people.

 3) More people use Wicket than Tapestry (I don't have any figures), so
 the total amount of time for writing integrations is larger.

 Sometimes, technology-related issues have non-technology causes. And
 sometimes the best option is not the mostly used. Example: Struts
 until some time ago, JSF now.


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



Re: Tapestry URL Rewriting Support and form submit

2009-12-24 Thread Thiago H. de Paula Figueiredo

Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin ayr...@ngs.ru escreveu:


Hello.


Hi!

All works fine except submit action. Tapestry redirect to rewrite page  
except original

if submit action occurs.
  Example:
rule: rewrite /test to /testRewrited


Are you rewriting /test.form to /testRewrited.form, for example? URL  
rewriting is trickier than it sounds. ;)


Please post your rule implementation here so we can take a look at it. :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Discussion

2009-12-24 Thread Alessandro Bottoni
Il 23/12/2009 19:48, Thiago H. de Paula Figueiredo ha scritto:
 Em Wed, 23 Dec 2009 16:22:49 -0200, Piero Sartini 
 I don't like it as well - but tapestry should provide an alternative.
 Maybe the question is if tapestry wants to be a full-stack framework
 or just deliver some building blocks. For being a full-stack
 framework, there is not enough functionality available. To just
 provide building blocks, it dictates too much (javascript library,
 markup, and so on). Of course this is just my feeling.
 
 I cannot speak for the project, but I think Tapestry tries to be a Web
 framework, not a full stack. At least not yet. ;)

Regarding this topics, let me remind the ML people that there are at
least two projects that tries to supply Tapestry 5 with the remaining
components needed to build a full-stack framework (or something like
that): Tynamo (formerly known as Trails) and AppFuse. T5 can be a
simple framework but Tynamo and AppFuse are much more than this.
Looking at T5 from this perspective, it looks very good.

T5 should/could supply us with just the fundamental blocks and
Tynamo/AppFuse could/should do the rest. Also, it should be much easier
to manage the whole dev process in this way.

I think that what the newbie (like me) and the end-user/dev are
expecting from T5+Tynamo is something like a Drupal on steroids: a
empty CMS (coming from a Maven archetype) that can be easily configured
(like Drupal) and extended (Drupal is a pain to modify and extend, when
used for big and complex projects). In other words, a empty system than
can be used as a good starting point for a real-world (that is: quite
complex) web application.

Such a Maven archetype should supply all of the basic building blocks of
a real-world application:
- access control (Acegi/Spring security or something like that)
- i18n/i10n and language switching
- persistance (against MySQL, for example)
- user registration
- user administration
- captcha?
- e-mail verification (send/verify)
- etc.

To the end-user should remain the responsability to de/activate every
single feature and to configure them.

Such a system, being based on a well-engineered technology like T5,
would be immensely easier to extend and modify than CMSs like Drupal and
immensely more robust.

As long as I can see, T5 and Tynamo are already evolving together in
this way. It is just a matter of time to have such a Drupal-on-steroids
archetype.

As Piero said, at the moment T5 is probably enforcing some choice that
could/should be left to the end-user/dev (javascript library, markup,
etc.) but, as long as I can see, it should not be very hard to loosen
such requisites in future releases. Dojo and JQuery can already be used
together with T5 (cannot they?) and allowing the dev to use a different
mark-up should be just a matter to accept a different XML namespace (a
superset of the T5's). Am I wrong?

JM2C
-- 

Alessandro Bottoni
Website: http://www.alessandrobottoni.it/

Perfection is finally attained not when there is no longer anything to
add but when there is no longer anything to take away.
 -- Antoine de Saint-Exupéry


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

RE: Example of overriding the default ValidationDecorator

2009-12-24 Thread Blower, Andy
 Unfortunately it seems that it does not help against these error-
 bubbles.

To override the client side you'll need to read tapestry.js and follow some of 
what it does. Personally I feel that the error bubbles should not be part of 
the T5 core, but an optional example validation module.

I created an inline validation decorator which puts the validation messages 
inside the field labels (for accessibility reasons) and overrode parts of 
tapestry.js in a js file added in our page layout so it comes on every page. 
Removing and changing the client side validation functions. Compare with the 
std tapestry.js versions and hopefully it will help you.

The js looks like this:

Tapestry.FormEventManager.addMethods(
{
initialize : function(form)
{
this.form = $(form);

this.form.onsubmit = 
this.handleSubmit.bindAsEventListener(this);
},

handleSubmit : function(domevent)
{
var t = $T(this.form);

t.validationError = false;

this.form.fire(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT, 
this.form);

// This flag can be set to prevent the form from submitting 
normally.
// This is used for some Ajax cases where the form submission 
must
// run via Ajax.Request.

if (this.preventSubmission)
{
// Prevent the normal submission.

Event.stop(domevent);

// Instead ...

this.form.fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);

return false;
}

// Validation is OK, not doing Ajax, continue as planned.

return true;
}
});

Tapestry.FieldEventManager.addMethods(
{
initialize : function(field)
{
this.field = $(field);

var id = this.field.id;
this.label = $(id + '-label');
this.icon = $(id + '-icon');

this.translator = Prototype.K;

document.observe(Tapestry.FOCUS_CHANGE_EVENT, function(event)
{
// If changing focus *within the same form* then 
perform validation.
// Note that Tapestry.currentFocusField does not change
// until after the FOCUS_CHANGE_EVENT notification.
if (Tapestry.currentFocusField == this.field  
this.field.form == event.memo.form) {
this.validateInput();
}
}.bindAsEventListener(this));
},

// Removes validation decorations if present.
removeDecorations : function()
{
this.field.removeClassName(t-error);

if (this.label) {
this.icon.hide();
this.label.insert(this.icon);
var errorMsgId = this.field.id + ':error';
if (!this.errorMessage) {
this.errorMessage = $(errorMsgId);
}
if (this.errorMessage) {
Element.remove(this.errorMessage);
this.errorMessage = null;
}
}
},

/**
 * Show a validation error message, which will add decorations to the
 * field and it label.
 * @param message validation message to display
 */
showValidationMessage : function(message)
{
$T(this.field).validationError = true;
$T(this.field.form).validationError = true;
this.field.addClassName(t-error);

if (this.label) {
var errorMsgId = this.field.id + ':error';
if (!this.errorMessage) {
this.errorMessage = $(errorMsgId);
}
if (!this.errorMessage) {
this.errorMessage = new Element('span', {'id': 
errorMsgId, 'class': 't-error'});
this.label.insert({ bottom: this.errorMessage});
}
this.errorMessage.update(message);
this.errorMessage.insert({top: this.icon});
this.icon.show();
}
}
});


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



Re: Discussion

2009-12-24 Thread Wilson Ikeda
Alfonso Quiroga wrote:

³Last, it would be good more components (ui components).²

+1 , plus it really would be nice if it comes before the above
javascript/prototype/jquery implementation/change:

³There's a plan not to switch from Prototype to jQuery. There's a plan to
have JavaScript stacks, one implemented with Prototype, another with
jQuery. No dates yet.²

How much javascript are the developers here using? I prefer to use only when
necessary (yeah, I¹m one that runs from it like from the devil :-))

Merry Christmas to everyone on the list.


Re: Number Formatting in TextField (T5)

2009-12-24 Thread Benny Law
On Thu, Dec 24, 2009 at 5:41 AM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:


 This is very clever! I guess it'll work. :) Just pay attention that the
 parameter received by the translate is a FieldTranslator, not a Translator
 itself.

 Thanks Thiago. I already found out the hard way, but it's basically working
now :) The last thing I still need to figure out is the purpose of
FieldTranslator (I read the doc but still didn't fully get it) and how I can
allow the error messages to be overridden in the message catalogue on a per
field basis in the standard manner. I guess I need to use some other service
to do that. Any hint will be appreciated :)


Re: Tapestry URL Rewriting Support and form submit

2009-12-24 Thread Sergey Kashin

Thanks for fast reply.

You're absolutely right!
I'am not rewrite .form.

Big thanks!

On Thu, 24 Dec 2009 10:01:22 -0200
 Thiago H. de Paula Figueiredo thiag...@gmail.com 
wrote:
Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin 
ayr...@ngs.ru escreveu:



Hello.


Hi!

All works fine except submit action. Tapestry redirect 
to rewrite page  
except original

if submit action occurs.
  Example:
rule: rewrite /test to /testRewrited


Are you rewriting /test.form to /testRewrited.form, for 
example? URL  rewriting is trickier than it sounds. ;)


Please post your rule implementation here so we can take 
a look at it. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate 
consultant, developer,  and instructor
Owner, software architect and developer, Ars Machina 
Tecnologia da  Informação Ltda.

http://www.arsmachina.com.br

-
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: Tapestry URL Rewriting Support and form submit

2009-12-24 Thread Sergey Kashin

upss.. not solved

i have two pages
/test/testpage
and
/rewrited_tst/testpage

if i browse
/test/testpage
rewrite works correctly:
url looks like /test/testpage
and processed
/rewrited_tst/testpage

if i click submit button in form (name frm in page)
rewrite works not correctly:
url looks like /rewrited_tst/testpage but i expect url 
like /test/testpage

all other processed correctly
/rewrited_tst/testpage and expect /rewrited_tst/testpage


my rewrite rule:
URLRewriterRule rule2 = new URLRewriterRule()
{

public Request process(Request request, 
URLRewriteContext context)

{
final String path = request.getPath();
if (path.equalsIgnoreCase(/test/testpage))
{
request = new 
SimpleRequestWrapper(request, /rewrited_tst/testpage);

}
if 
(path.equalsIgnoreCase(/test/testpage.frm))

{
request = new 
SimpleRequestWrapper(request, 
/rewrited_tst/testpage.frm);

}
return request;

}

public RewriteRuleApplicability applicability()
{
return RewriteRuleApplicability.INBOUND;
}

};
configuration.add(rule2, rule2);








On Thu, 24 Dec 2009 23:48:01 +0600
 Sergey Kashin ayr...@ngs.ru wrote:

Thanks for fast reply.

You're absolutely right!
I'am not rewrite .form.

Big thanks!

On Thu, 24 Dec 2009 10:01:22 -0200
 Thiago H. de Paula Figueiredo thiag...@gmail.com 
wrote:
Em Thu, 24 Dec 2009 09:14:10 -0200, Sergey Kashin 
ayr...@ngs.ru escreveu:



Hello.


Hi!

All works fine except submit action. Tapestry redirect 
to rewrite page  
except original

if submit action occurs.
  Example:
rule: rewrite /test to /testRewrited


Are you rewriting /test.form to /testRewrited.form, for 
example? URL  rewriting is trickier than it sounds. ;)


Please post your rule implementation here so we can take 
a look at it. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate 
consultant, developer,  and instructor
Owner, software architect and developer, Ars Machina 
Tecnologia da  Informação Ltda.

http://www.arsmachina.com.br

-
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





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



Re: About T5 integration modules

2009-12-24 Thread Howard Lewis Ship
On Thu, Dec 24, 2009 at 2:09 AM, cordenier christophe
christophe.corden...@gmail.com wrote:
 Hello,

 And what about integration of Tapestry in other framework ?

 From my experience view, integrating technologies in Tapestry is fun and
 fast, and the one provided by Tapestry are really good and enough to do what
 a Web Application should do. !but when i want to do the inverse i am facing
 a problem with Tapestry public API. Getting the Tapestry registry is simple
 but calling services from the outside is not as easy.

 For exemple, currently i am trying to secure my application by using
 spring-security to centralize security concerns, and then create a RoleVoter
 to secure also Tapestry URLs. To achieve this, Spring allows me to access to
 the servlet context and then to Tapestry Registry, now we can imagine that
 analyzing the URL will be as easy as using the ComponentEventLinkEncoder
 service, but in real i had to create an instance of RequestImpl, retrieve
 others services, set the request into the RequestGlobals... service just to
 analyze the URL !

I can see where your frustration might come from in this respect. At
many times during the
development of Tapestry, we've had to make a choice: easy and
automatic for the typical user,
or easily extensible for the power-developer. That's a no-brainer:
easy and automatic for the typical user is the way to go.

In this particular case, it was all about making things work correctly
from inside Tapestry; the idea
that you would be analyzing a Tapestry URL when not in the middle of
processing a Tapestry request (and therefore, deep
into the pipeline that automatically sets up the RequestGlobals
values) is just foreign to Tapestry. That is, to make
that rare use-case easier for you, would complicate the code for most
other users, making it that much harder to extend and
override Tapestry for more typical use cases.

In fact, where other people might write servlets, I would tend to
contribute a new Dispatcher to the MasterDispatcher
service to accomplish the same goal (in the rare case that existing
Dispatchers and other Tapestry mechanisms could not
fulfill the required role).

I'm also a bit surprised at how eager people are to make use of
cumbersome solutions like Spring Security to accomplish simple tasks
such
as protecting pages.  The Spring Security logic is path-based,
requiring an awkward mapping from paths to Tapestry pages.  When I
need to implement that
kind of security, I define annotations that I can place on pages and
provide a filter that checks for the annotation on the page ... and
I've seen multiple clients
do the same thing. Ideally there would be a single solution for this,
but I've found that page security is just not a one-size-fits-all
solution.

In other words, jumping over backwards for integrations with
technologies is often not the best approach. Yes, it would be nice to
have a checkbox compatible with Spring Security but I'd rather talk
about how easy it is to create your own custom extensions that work
precisely as you need.

We've had this discussion at Formos; it was often easier to create a
totally custom solution in Tapestry than it was to take an
off-the-shelf solution that did 80% of what was needed and customize
it the last 20% of the way.


 Tapestry is so powerful and has everything to work standalone (see wrappers
 around servlet API, or PageTester, ...), but sometimes it's hard to exploit
 this great feature ...

 Best Regards,
 Christophe



 2009/12/23 Howard Lewis Ship hls...@gmail.com

 While it's true that other frameworks (Grails, Wicket, Rails) have
 large numbers of integrations, if you talk to real developers you find
 out that the majority of those integrations are not actually usable
 for production work. All too often, they are orphaned, unsupported,
 incomplete, naive or coded against an earlier version of the core
 framework ... or some combination of all of those.

 I do a lot of training and consulting on Tapestry with a lot of groups
 and what I find is that one size does not fit all, even for simple
 things like user authentication/login. I'm quite happy to have a
 limited number of basic integrations that are documented, supported
 and tested.  Would I like every application to just be a matter of
 mixing pre-built modules together?  Yes.  Do I think it is realistic,
 for ANY framework?  No.

 On Wed, Dec 23, 2009 at 7:48 AM, Howard Lewis Ship hls...@gmail.com
 wrote:
  Noe, I've been down this path before, regrettably.  The ONLY thing to
  do it to ignore the trolls.
 
  On Tue, Dec 22, 2009 at 11:29 PM, Newham, Cameron cameron.new...@bl.uk
 wrote:
  I don't agree with the OP that the ServerSide discussion shows Tapestry
 has lost the battle - two posters state they don't want to see Tapestry
 mentioned. That's all there is.
 
  However, I can't agree with you Thiago. The old saying is if you say it
 enough times then people will believe it is true.
 
  If you are just going to stand by and let trolls 

Re: About T5 integration modules

2009-12-24 Thread Marcus Veloso
Hi,

About pages protected access, I think that the tapestry5-portlet module will
provide (through portal platform) implementations of much of the common
functionality that any web-based application would require: role-based
security (including authentication and authorization), user registration and
administration, self resetting of user passwords.

In the mean time, I'm using Chenillekit Access module.

Best Regards,
Marcus