Re: [T4.1.5] with Dojo 1.1.1 Using Beyond Dojo

2008-07-21 Thread Martino Piccinato
Hi Richard,

I'll be very interested in co-operating to have a dojo-1.x
implementation. In my opinion at the moment being stuck with dojo
0.4.3 is the only big tapestry 4 pitfall.

Martino

On Mon, Jul 21, 2008 at 11:50 AM, Richard Hoberman
[EMAIL PROTECTED] wrote:

 I'm considering upgrading to the latest Dojo library using the mechanism
 described at:

 http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html

 Has anyone managed to use this?  How time-consuming was it?  Does anyone
 have an implementation they'd be willing to share?  If not, how much
 interest is there in co-operating on creating one?

 Thanks

 Richard Hoberman

 FYI, this was discussed at:
 [1] http://www.nabble.com/T4.1.3---Upgrade-Dojo-td13621341.html#a14341740
 [2]
 http://www.nabble.com/-T4.1--Alternate-JS-library-and-tapestry.event.buildEventProperties-td15470996.html#a15470996




 --
 View this message in context: 
 http://n2.nabble.com/-T4.1.5--with-Dojo-1.1.1-Using-Beyond-Dojo-tp574931p574931.html
 Sent from the Tapestry Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4]: Execute arbitrary JS from EventListener

2007-12-27 Thread Martino Piccinato
I think you are looking for

http://tapestry.apache.org/tapestry4.1/jsdoc/index.html

in particular for

http://tapestry.apache.org/tapestry4.1/jsdoc/files/fx-js.html

On Dec 27, 2007 6:39 PM, Kevin Menard [EMAIL PROTECTED] wrote:
 Hey all,

 I have the need to call arbitrary JS after updating components from an
 EventListener.  The use case is the following:

 If client-side validation is disabled I show a div that display the error
 message.  When a form is submitted asynchronously, I can update the contents
 of the div, but then I just end up with an empty div.  What I'd like to do
 is hide it.  I had some code for jQuery to hide it after the DOM loads, but
 that doesn't help me on the async update.

 There's likely an obvious answer to this, but due to lack of experience I'm
 just missing it.  So, feel free to treat me as clueless.

 --
 Kevin



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: A web flow idea on T5

2007-12-26 Thread Martino Piccinato
This is exactly what I'm trying to do for T4, it should be quite
inobstrusive so that conversational persistence could be added without
much effort and be easily used with your pattern if needed. Be careful
that the problem might not just be having 2 flows at a time for the
same session but also managing interrupted flows.
I don't know much of T5 internals: is the persistence strategy system
so different from T4?

As far as I can see (am I wrong?) there's nothing in your webflow
pattern that couldn't be also done in a T4 application as it does not
imply any new feature so I think I could test everything in T4

Martino

On Dec 24, 2007 8:25 PM, jeffrey ai [EMAIL PROTECTED] wrote:

 You are right.
 So far, I think our system will only support one flow at a time. This will
 not only make design simpler, but also save some server resource. If a
 system needs to support multiple flows, it needs a way to identify different
 flows in one session.

 Cheers,
 Jeffrey Ai



 Martino Piccinato wrote:
 
  Hi,
 
  I think the only thing missing is a conversational type of
  persistence. That is that the application state object and persisted
  link shouldn't be simply session persisted but at least session
  persisted with some kind of flowkey prefix so to separate different
  flows. This would imply also some flow/conversation control mechanism
  (start/restart/reset/getFlowKey) I was planning to do a similar thing
  for T4.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/T5%3A-A-web-flow-idea-on-T5-tp14442158p14490669.html

 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: A web flow idea on T5

2007-12-22 Thread Martino Piccinato
Hi,

I think the only thing missing is a conversational type of
persistence. That is that the application state object and persisted
link shouldn't be simply session persisted but at least session
persisted with some kind of flowkey prefix so to separate different
flows. This would imply also some flow/conversation control mechanism
(start/restart/reset/getFlowKey) I was planning to do a similar thing
for T4.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: New tacos release

2007-12-20 Thread Martino Piccinato
Congratulation Andy, I still think tacos is a must for tapestry users
and look forward for tapestry 4.1.4/dojo 1.0 upgrade



On Dec 19, 2007 8:10 PM, andyhot [EMAIL PROTECTED] wrote:
 Hi,
 the new tacos release (4.1.1) is already deployed at maven's central repo.

 Details are at http://tacos.sourceforge.net/tacos4.1/ , here are some
 quick notes:

 -) tapdoc and tapdoc-maven-plugin. These can now work with annotation-only
 components, see
 http://tacos.sourceforge.net/tacos4.1/tapdoc/tapdoc-maven-plugin/usage.html
 -) several improvements and fixes to @dojo:Widget
 -) Timeline component based on http://simile.mit.edu/timeline/
 -) new annotation @Cached along with @InjectPageLink,
 @InjectExternalLink, e.t.c.
 see http://tacos.sourceforge.net/tacos4.1/tacos-annotations/index.html
 -) new binding prefixes (absoluteAsset)
 -) new page/component resolvers, see
 http://tacos.sourceforge.net/tacos4.1/tacos-core/quick-start/resolvers.html

 Demo (for now) http://andyhot.gr/tacos-demo/app

 --
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4] SpecificationParser (custom component specification elements)

2007-12-19 Thread Martino Piccinato
Hi,

I was wondering whether it would be possible to add custom
tags/features to component/pages specification. It seems not to be
possible (or at least not suggested) as  SpecificationParser
id pretty hardcoded.

I guess the only way to have custom enhancements of a Component would
be to work with annotations/annotationsworker (that is just with Java
= 1.5), am I right?

Thnx

Martino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4.1.3 - Upgrade Dojo

2007-12-16 Thread Martino Piccinato
+1 tnx to Jesse and Andreas.

I think this work is important for T4 users but also for the overall
tapestry community as it's important to show that tapestry framework
can provide long term support and evolve all his versions/projects in
a reasonable way for who invested in it.
IMHO even T5 adoption will benefit from T4 support and evolution.


On Dec 15, 2007 1:15 PM, fdegrassi [EMAIL PROTECTED] wrote:
 Let me join you in this.The dedication that Andreas and Jesse put in
 supporting Tapestry 4 is really something.
 Sure, it's fantastic to have a brand new web framework every two years,
 but some of us build real web application with Tapestry and would be
 screwed if someone didn't take the responsibility for mantaining the
 old version.
 Thanks a lot.

 Francesco Degrassi

 Matt Brock wrote:
 
  Andreas Andreou wrote:
  I just uploaded the docs, so you can now see what is possible with
  4.1.4-SNAPSHOT at:
  http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html
 
  The adapter javascript file mentioned is:
  https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js
 
  I'm aware we need more docs + an example implementation, but lack of
  time hasn't made this possible yet.
 
 
  I just wanted to say on behalf on Tap~4 users everywhere: thank you for your
  efforts!



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4.1.3 - Upgrade Dojo

2007-12-14 Thread Martino Piccinato
I think it was my mail and in fact there was no clear date/plan to
upgrade to 1.0 (but maybe I misunderstood...).

In fact it would be a great thing upgrading to 1.0 we tapestry4ers are
quite scared by the t5 only list traffic lately ;-)

On Dec 14, 2007 1:46 PM, Matt Brock [EMAIL PROTECTED] wrote:

 Yes, it's  http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902  in
 JIRA.  Andreas Andreou implied he was working on it in
 http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this
 post  in response to a similar question a month ago, but I haven't heard
 anything else since then.


 Joshua Jackson-3 wrote:
 
  On 12/14/07, Matt Brock [EMAIL PROTECTED] wrote:
  That's great. Has it been written on JIRA yet?
 

 --
 View this message in context: 
 http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4.1.3 - Upgrade Dojo

2007-12-14 Thread Martino Piccinato
That's great Andreas! Is there a plan to also provide a standard
adapter to dojo 1.0? the fact that this is called beyonddojo is
confusing :-)

On Dec 14, 2007 7:08 PM, Andreas Andreou [EMAIL PROTECTED] wrote:
 I just uploaded the docs, so you can now see what is possible with
 4.1.4-SNAPSHOT at:
 http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html

 The adapter javascript file mentioned is:
 https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js

 I'm aware we need more docs + an example implementation, but lack of
 time hasn't made this possible yet.
 I'll let you know when related work resumes (hoping for middle of next week)


 On Dec 14, 2007 2:57 PM, Martino Piccinato [EMAIL PROTECTED] wrote:
  I think it was my mail and in fact there was no clear date/plan to
  upgrade to 1.0 (but maybe I misunderstood...).
 
  In fact it would be a great thing upgrading to 1.0 we tapestry4ers are
  quite scared by the t5 only list traffic lately ;-)
 
 
  On Dec 14, 2007 1:46 PM, Matt Brock [EMAIL PROTECTED] wrote:
  
   Yes, it's  http://issues.apache.org/jira/browse/TAPESTRY-1902 issue #1902 
in
   JIRA.  Andreas Andreou implied he was working on it in
   http://www.nabble.com/Moving-on-from-4.0.*-to13635906.html#a13636810 this
   post  in response to a similar question a month ago, but I haven't heard
   anything else since then.
  
  
   Joshua Jackson-3 wrote:
   
On 12/14/07, Matt Brock [EMAIL PROTECTED] wrote:
That's great. Has it been written on JIRA yet?
   
  
   --
   View this message in context: 
   http://www.nabble.com/T4.1.3---Upgrade-Dojo-tp13621341p14335044.html
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OGNL race condition(s) (?)

2007-11-29 Thread Martino Piccinato
Hi all,

some time ago we had a strange problem with our tapestry application,
there was a component repeatedly throwing a ClassCastException, in
fact one of this component's parameter was passed
a User (interface) object being in that specific case a SimpleUser
concrete implementation. When using the component we had SimpleUser
ClassCastException on that binding evaluation.

The two strange things were that:

- the component was working perfectly with our previous application
version (note: we were using tapestry 4.0 and OGNL 2.6.9 for our
previous application version)
- and, definitely smore strange, the component was working perfectly
on all our workstations, on our development server and on our test
server, the only place where this problem was (always?) occurring was
on production whose only difference seemed to me to use a much more
powerful server (test server and production server have same
os/jvm/tapestry version/libraries/processor architecture/tomcat
version)

Having not been for this last strange thing, the problem would have
been relatively easily solved because in fact was that User
interface was missing a (needed) setter that the concrete
implementation SimpleUser had. As far as I understand Jesse did a
big work to remove/replace java reflection for new OGNL 2.7 so in fact
OGNL in this case was more respectful of the declared type and acted
consistently. .
What I still cannot explain is why the issue was happening just on
production and could not be replicated anywhere else (and there goes
for the supposed race condition)

I'm writing this also because we have now having a similar problem,
meaning the the only similarity is the fact that it happens on
production server and not on any other host, in fact it looks like an
innocuous

Exception: Unable to parse OGNL expression 'role.user': source is null
for getProperty(null, user)
org.apache.tapestry.BindingException
Unable to parse OGNL expression 'role.user': source is null for
getProperty(null, user)

but still: all evidences shows that source shouldn't be null at that
point and the bug could not be reproduced outside production server
(where it always happens...)
I suspect this to be something similar, still investigating.

Has anyone incurred in anything similar?

Tnx

Martino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] How to get the right DOCTYPE ...

2007-11-20 Thread Martino Piccinato
If you are using Shell component in your border (probably you do) you
have to set this parameter for the shell component:

  binding name=doctype value=literal:html PUBLIC quot;-//W3C//DTD
XHTML 1.1 //ENquot;
quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtdquot;/

note the use of quot; as you are writing it inside an xml file.


On Nov 20, 2007 12:16 PM, #Cyrille37# [EMAIL PROTECTED] wrote:
 Hello,
 I could not find how to set the DocType ?

 My Border component's HTML start like this :

 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 title=TestApp
 stylesheet=asset:generalCss
 jwcid=@Shell disableCaching=true consoleEnabled=false
 debugEnabled=false browserLogLevel=DEBUG parseWidgets=true
 
 ...

 But when rendering I got that :

 ?xml version=1.0 encoding=UTF-8 ?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 !-- Application: TestApp --
 !-- Page: Home --
 !-- Generated: Tue Nov 20 12:12:05 CET 2007 --
 html
 head
 ...
 meta http-equiv=Content-Type content=text/html;charset=UTF-8 /
 ...

 Cyrille.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] How to get the right DOCTYPE ...

2007-11-20 Thread Martino Piccinato
In fact there shouldn't be anything before the border component and
this is what the Shell component presuppose as it's used for head
DOCTYPE stuff.
In any case I think you can configure the parameter to an empty string
so that the hardcoded doctype will be used. I would remove the
hardcoded doctypes though.

On Nov 20, 2007 1:31 PM, #Cyrille37# [EMAIL PROTECTED] wrote:
 Martino Piccinato a écrit :
  If you are using Shell component in your border (probably you do) you
  have to set this parameter for the shell component:
 
binding name=doctype value=literal:html PUBLIC quot;-//W3C//DTD
  XHTML 1.1 //ENquot;
  quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtdquot;/
 
  note the use of quot; as you are writing it inside an xml file.
 
 It works like that too :
 component id=theShell type=Shell
 binding name=doctype 
 literal:html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 /binding
 /component

 But I've got 2 doctype in the rendered page because the designer put
 (and have to) a doctype in each template.

 Cyrille.

 
  On Nov 20, 2007 12:16 PM, #Cyrille37# [EMAIL PROTECTED] wrote:
 
  Hello,
  I could not find how to set the DocType ?
 
  My Border component's HTML start like this :
 
  ?xml version=1.0 encoding=UTF-8 ?
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html xmlns=http://www.w3.org/1999/xhtml;
  title=TestApp
  stylesheet=asset:generalCss
  jwcid=@Shell disableCaching=true consoleEnabled=false
  debugEnabled=false browserLogLevel=DEBUG parseWidgets=true
  
  ...
 
  But when rendering I got that :
 
  ?xml version=1.0 encoding=UTF-8 ?
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  http://www.w3.org/TR/html4/loose.dtd;
  !-- Application: TestApp --
  !-- Page: Home --
  !-- Generated: Tue Nov 20 12:12:05 CET 2007 --
  html
  head
  ...
  meta http-equiv=Content-Type content=text/html;charset=UTF-8 /
  ...
 
  Cyrille.
 



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] howto re-use component definition

2007-11-20 Thread Martino Piccinato
component id=homeLink2 copy-of=homeLink/

On Nov 20, 2007 3:17 PM, #Cyrille37# [EMAIL PROTECTED] wrote:
 Hello again,

 I could not find how to re-use component definition.
 How can I do if I want to put a link at several places in the page ?

 For example there is a PageLink definition :
 component id=homeLink type=PageLink 
 binding name=page value=Home /
 /component

 But I can't use it several times in the template :

 a href=# jwcid=homeLinkHome/a
 ...
 a href=# jwcid=homeLinkHome/a

 Because Tapestry is shooting contains multiple references to embedded
 component homeLink.

 What is the mechanism for re-using component definition ??

 Cheers,
 Cyrille.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] Thanks for updates

2007-11-19 Thread Martino Piccinato
Stuck? :-)

We use it, we invested in it and we have important projects to mantain with it.

Not to mention that there is still no ajax support in T5.

So yes, thanks guys for supporting it.

On Nov 19, 2007 3:51 PM, Kevin Menard [EMAIL PROTECTED] wrote:
 With all the recent traffic about T5 on the list, I just wanted to thank the
 folks still working on T4.  Though the lists may not show it, I'm sure
 there's a lot of us that are stuck with T4 for at least some projects and
 it's nice to see activity still happening in this space.  I look forward to
 the 4.1.4 release.

 Thanks again,
 Kevin

 --
 Kevin Menard
 Servprise International, Inc.
 Remote reboot  power control for network equipment
 www.servprise.com  +1 508.892.3823 x308



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Strange OGNL exceptions just on test server

2007-11-08 Thread Martino Piccinato
We have a strange phenomenon where we find in our log lots (really a
lot) of the exceptions reported below.
It seems not to be a memory problem (all cpu/mem/heap/permgen/open
file handles values seems to be just perfect) but this just happens on
our test server while it does not happen on our workstation nor on our
production server (thank god :-) ). Does anybody ever incurred in such
a problem?

2007-11-08 11:49:41,687 ERROR
[org.apache.tapestry.services.impl.HiveMindExpressionCompiler] -
Error generating OGNL getter for expression newCallConsultancy with
 root [EMAIL PROTECTED]/createCustomerCallLink]
and body:
{ return (($AddCustomerCallButton_72)$2).onNewCallConsultancy();}
org.apache.hivemind.ApplicationRuntimeException: Unable to add method
java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
$ASTProperty_1161edad612: [
source error] onNewCallConsultancy() not found in $AddCustomerCallButton_72
at 
org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
at 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
at ognl.Ognl.compileExpression(Ognl.java:141)
at 
org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
at 
org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
at 
$ExpressionCache_1161edad51d.getCompiledExpression($ExpressionCache_1161edad51d.java)
at 
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
at 
org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
at 
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
at 
org.apache.tapestry.enhance.EnhanceUtils.toBoolean(EnhanceUtils.java:173)
at $IfBean_50.getCondition($IfBean_50.java)
at 
org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:128)
at org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
at 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)



2007-11-08 11:52:22,726 WARN [tapestry.error.RequestExceptionReporter]
- Unable to present exception page: Unable to parse OGNL expression
'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
expression 'id': Unable to parse OGNL expression 'id': Unable to parse
OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
parse OGNL expression 'id': Unable to parse OGNL expression 'id':
Unable to parse OGNL expression 'id': Unable to parse OGNL expression
'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
expression 'id': Unable to parse OGNL expression 'id': Unable to parse
OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
parse OGNL expression 'id': Unable to parse OGNL expression 'id':
Unable to parse OGNL expression 'id': Unable to parse OGNL expression
'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
expression 'id': Unable to parse OGNL expression 'id': Unable to parse
OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
parse OGNL expression 'id': Unable to parse OGNL expression 'id':
Unable to parse OGNL expression 'id': Unable to parse OGNL expression
'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
expression 'id': Unable to parse OGNL expression 'id': Unable to parse
OGNL expression 'id': Unable to parse OGNL expression 'id': Una

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Strange OGNL exceptions just on test server

2007-11-08 Thread Martino Piccinato
It seems that this happen just when I have two diffrent deploy/context
on the same host for the same tapestry 4.1.2 application...

On Nov 8, 2007 11:40 AM, Martino Piccinato [EMAIL PROTECTED] wrote:
 We have a strange phenomenon where we find in our log lots (really a
 lot) of the exceptions reported below.
 It seems not to be a memory problem (all cpu/mem/heap/permgen/open
 file handles values seems to be just perfect) but this just happens on
 our test server while it does not happen on our workstation nor on our
 production server (thank god :-) ). Does anybody ever incurred in such
 a problem?

 2007-11-08 11:49:41,687 ERROR
 [org.apache.tapestry.services.impl.HiveMindExpressionCompiler] -
 Error generating OGNL getter for expression newCallConsultancy with
  root [EMAIL PROTECTED]/createCustomerCallLink]
 and body:
 { return (($AddCustomerCallButton_72)$2).onNewCallConsultancy();}
 org.apache.hivemind.ApplicationRuntimeException: Unable to add method
 java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
 $ASTProperty_1161edad612: [
 source error] onNewCallConsultancy() not found in $AddCustomerCallButton_72
 at 
 org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
 at 
 org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
 at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
 at ognl.Ognl.compileExpression(Ognl.java:141)
 at 
 org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
 at 
 org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
 at 
 $ExpressionCache_1161edad51d.getCompiledExpression($ExpressionCache_1161edad51d.java)
 at 
 org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
 at 
 org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
 at 
 org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
 at 
 org.apache.tapestry.enhance.EnhanceUtils.toBoolean(EnhanceUtils.java:173)
 at $IfBean_50.getCondition($IfBean_50.java)
 at 
 org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:128)
 at 
 org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
 at 
 org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)



 2007-11-08 11:52:22,726 WARN [tapestry.error.RequestExceptionReporter]
 - Unable to present exception page: Unable to parse OGNL expression
 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
 expression 'id': Unable to parse OGNL expression 'id': Unable to parse
 OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
 parse OGNL expression 'id': Unable to parse OGNL expression 'id':
 Unable to parse OGNL expression 'id': Unable to parse OGNL expression
 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
 expression 'id': Unable to parse OGNL expression 'id': Unable to parse
 OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
 parse OGNL expression 'id': Unable to parse OGNL expression 'id':
 Unable to parse OGNL expression 'id': Unable to parse OGNL expression
 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
 expression 'id': Unable to parse OGNL expression 'id': Unable to parse
 OGNL expression 'id': Unable to parse OGNL expression 'id': Unable to
 parse OGNL expression 'id': Unable to parse OGNL expression 'id':
 Unable to parse OGNL expression 'id': Unable to parse OGNL expression
 'id': Unable to parse OGNL expression 'id': Unable to parse OGNL
 expression 'id': Unable to parse OGNL expression 'id': Unable to parse
 OGNL expression 'id': Unable to parse OGNL expression 'id': Una


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tapestry and workflow engines, suggestions?

2007-10-30 Thread Martino Piccinato
Hi,

just wanted to know your experiences, is there any integration stuff
already done with any existing workflow engince? I'd prefer a
lightwait webflow engine at the moment jbpm and even spring webflow
could be too much for me but I'm open for suggestions.

We are using tapestry4.1.2.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Strange problem with OGNL (just happening on our production servers)

2007-10-25 Thread Martino Piccinato
You are right Alejandro, it's the bug you report for this problem.
Then I have another problem I've written in another message and
still another one having to do with polimorphism: apparently passing a
concrete class implementing an interface A to a binding accepting A
objects throws a ClassCastException. This also just happens (after
some time?) on production server
and there's an easy workaournd explicitly (and uselessly from java
point of view) casting the
object to A.

I'm going to open a bug for this one as it seems that nobody else reported it.

Tnx for your help.

On 10/23/07, Alejandro Scandroli [EMAIL PROTECTED] wrote:
 Hi Martino

 We are seeing these stack traces too, but the applications doesn't hang.
 http://jira.opensymphony.com/browse/OGNL-115
 The error happens when a getter method doesn't have the matching setter 
 method.
 Does the page still work? or it brakes your app?

 In case you don't need a setter method an option to avoid the stack
 traces is to explicitly call the getter, like this:

component id=mobile type=Insert
binding name=value value=ognl:getMobile()/
/component


 Salutti.
 Alejandro.

 On 10/23/07, Martino Piccinato [EMAIL PROTECTED] wrote:
  Hi,
 
  we are experiencing a very strange problem just on our production
  server, from time to time bindings/ognl starts giving strange
  exceptions it does not give on our dev workstations. The problem is
  also difficult to reproduce on production server so I think it might
  be some race condition problem.
 
 
  We are using tapetry 4.1.2 and latest stable OGNL. It might be worth
  mentioning that the production server is 64bit (and obviously much
  faster) than our poor workstations.
 
  as an example of these exception take this component:
 
  component id=mobile type=Insert
  binding name=valuemobile/binding
  /component
 
  the component is used on a page called ViewPoSPage having a
  String getMobile() method.
 
 
  This is the exception that comes out from time to time:
 
  2007-10-23 09:41:35,947 ERROR
  [org.apache.tapestry.services.impl.HiveMindExpressionCompiler] - Error
  generating OGNL getter for expression mobile with root $ViewPoSPag
  [EMAIL PROTECTED] and body:
  { return (($ViewPoSPage_149)$2).mobile();}
  org.apache.hivemind.ApplicationRuntimeException: Unable to add method
  java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
  $ASTProperty_115c9fd5cb4: [sour
  ce error] mobile() not found in $ViewPoSPage_149
  at 
  org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
  at 
  org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
  at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
  at ognl.Ognl.compileExpression(Ognl.java:141)
  at 
  org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
  at 
  org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
  at 
  $ExpressionCache_115c9fd5801.getCompiledExpression($ExpressionCache_115c9fd5801.java)
  at 
  org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
  at 
  org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
  at 
  org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
  at $Insert_6.getValue($Insert_6.java)
  at 
  org.apache.tapestry.components.Insert.renderComponent(Insert.java:48)
  at 
  org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
  at 
  org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:180)
 
  
 
 
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  at 
  org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  at 
  org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  at 
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Thread.java:595)
  Caused by: javassist.CannotCompileException: [source error] mobile()
  not found in $ViewPoSPage_149
  at javassist.CtBehavior.setBody(CtBehavior.java:347)
  at javassist.CtBehavior.setBody(CtBehavior.java:316)
  at 
  org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
  ... 91 more
  Caused by: compile error: mobile() not found in $ViewPoSPage_149
  at 
  javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:716)
  at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681)
  at 
  javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156)
  at javassist.compiler.ast.CallExpr.accept

Strange problem with OGNL (just happening on our production servers)

2007-10-23 Thread Martino Piccinato
Hi,

we are experiencing a very strange problem just on our production
server, from time to time bindings/ognl starts giving strange
exceptions it does not give on our dev workstations. The problem is
also difficult to reproduce on production server so I think it might
be some race condition problem.


We are using tapetry 4.1.2 and latest stable OGNL. It might be worth
mentioning that the production server is 64bit (and obviously much
faster) than our poor workstations.

as an example of these exception take this component:

component id=mobile type=Insert
binding name=valuemobile/binding
/component

the component is used on a page called ViewPoSPage having a
String getMobile() method.


This is the exception that comes out from time to time:

2007-10-23 09:41:35,947 ERROR
[org.apache.tapestry.services.impl.HiveMindExpressionCompiler] - Error
generating OGNL getter for expression mobile with root $ViewPoSPag
[EMAIL PROTECTED] and body:
{ return (($ViewPoSPage_149)$2).mobile();}
org.apache.hivemind.ApplicationRuntimeException: Unable to add method
java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class
$ASTProperty_115c9fd5cb4: [sour
ce error] mobile() not found in $ViewPoSPage_149
at 
org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
at 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
at ognl.Ognl.compileExpression(Ognl.java:141)
at 
org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
at 
org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
at 
$ExpressionCache_115c9fd5801.getCompiledExpression($ExpressionCache_115c9fd5801.java)
at 
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
at 
org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
at 
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
at $Insert_6.getValue($Insert_6.java)
at org.apache.tapestry.components.Insert.renderComponent(Insert.java:48)
at 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at 
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:180)




at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: javassist.CannotCompileException: [source error] mobile()
not found in $ViewPoSPage_149
at javassist.CtBehavior.setBody(CtBehavior.java:347)
at javassist.CtBehavior.setBody(CtBehavior.java:316)
at 
org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
... 91 more
Caused by: compile error: mobile() not found in $ViewPoSPage_149
at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:716)
at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681)
at 
javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:235)
at javassist.compiler.CodeGen.compileExpr(CodeGen.java:222)
at javassist.compiler.CodeGen.atReturnStmnt2(CodeGen.java:591)
at javassist.compiler.JvstCodeGen.atReturnStmnt(JvstCodeGen.java

the only strange thing I can see on the page is a

String mobile(Person person)

so I thought it might  have been
http://jira.opensymphony.com/browse/OGNL-129 but the signature as you
can see is different and the problem is not happening everytime...

Any suggestion?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.2] stale link on ajax modified form

2007-10-09 Thread Martino Piccinato
Well it ended up to be a firebug strange behaviour (or bug?). The
request/response cycle was perfectly showed in the console as
expected, while in the XHR tab was showed the request/exception
response cycle mentioned before. It appears that by disabling firebug
the network monitoring option (Options - Disable Network Monitoring)
that request/response wasn't happening anymore so I must think that
was something firebug was generating by his own.

Don't know whether I'm missing something about firebug behaviour or if
it's just a bug, in my opinion network monitoring should be just
monitoring and not issuing requests.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NYSERDA

2007-10-08 Thread Martino Piccinato
On 10/7/07, Ted Steen [EMAIL PROTECTED] wrote:
 Doing what?


Removing the context I guess... :-)

 2007/10/7, Celia Mou [EMAIL PROTECTED]:
  Hi Mark,
 
  Sorry, I guess you still don't have my phone number: (718) 204-0626
 
  Cell: (917) 299-1208 (usually held by Frank)
 
  I'm at home and doing it.
 
  Thanks!
 
  celia
 
 
 
  On Oct 7, 2007, at 12:18 PM, Mark Alhadeff wrote:
 
   Move your js up one directory from WEB-INF. See here:
   http://wiki.apache.org/tapestry/Tapestry5WhereToStoreExternalResources
  
   The contents of WEB-INF are protected from browsing.
   Most assets are usually placed above it.
  
   Cheers,
   Nick.
  
  
   Angelo Chen wrote:
   if I remove the context, then I have to put js/query.js under pages
   directory, this will eliminate the error message, however the
   script is
   included in the body/body, anyway to include it in the header
   part?
   Thanks.
   Shing Hing Man wrote:
   Have you tried   @Path(context:js/jquery.js)
  
   (no slash after context:) ?
  
   Shing
  
  
   --- Angelo Chen [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I use following code to include a javascript:
  
 @Inject
   @Path(context:/js/jquery.js)
   private Asset _library;
  
   @Environmental
   private PageRenderSupport _renderSupport;
  
   void beginRender() {
 _renderSupport.addScriptLink(_library); }
  
   but always got :Unable to locate asset
   'context:js/jquery.js' (the file does
   not exist).
  
   the js file is under WEB-INF/js, why? Thanks,
   A.C.
  
   --
   View this message in context:
  
   http://www.nabble.com/T5%3A-why-not-able-to-locate-js--
   tf4583504.html#a13083743
   Sent from the Tapestry - User mailing list archive
   at Nabble.com.
  
  
  
   
   -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
  
  
   Home page : http://www.lombok.demon.co.uk/
  
  
  
 ___
   Want ideas for reducing your carbon footprint? Visit Yahoo! For
   Good http://uk.promotions.yahoo.com/forgood/environment.html
  
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 /ted

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
Hi all,

I'm getting this stale link exception when dynamically modifying a
form (some combos depending one on each other), I've read about this
problem no the list and it seemed to be solved in the new tapestry 4.1
If component, meaning that it should be form safe.

The fact is that I'm not getting the usual exception about missing
field #x named blahblah, rather this:

span class=exception-messageRewind of form
AddCustomerPage2/customerDetailsForm expected only 0 form elements,
but an additional id was requested by component
AddCustomerPage2/roleSelector.showThisComponent

./span

the strange thing is that customerDetailsForm is a completely
different form from roleSelector (even though they appear on the
same page) the form are both correctly closed and showThisComponent
appears just in the reservedids of customerDetailsForm (not
roleSelector form!) but I don't have any component with that id.

Does anyone know what could be happening?

P.S:

expliticly setting submitForm=customerDetailsForm on my
EventListener does not change the situation (as it should be...)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
just to be precise:

customerDetailsForm does contain much more than 0 fields while
roleSelect form contains just 1 field. On the ajax request a couple of
customerDetailsForm are made visible/invisible (actually I tried both:
using If that makes them disappear from the DOM and using a
component that simply wrap them as visible:none; that does not, same
result).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Martino Piccinato
http://tapestry.apache.org/tapestry4.1/components/general/for.html

On 10/8/07, Ken nashua [EMAIL PROTECTED] wrote:

 I would like to do some iteration like a true for loop with front, back and 
 computable boundaries.

 Is there such a component?

 Best regards
 Ken in nashua
 _
 Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
 today.
 http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: does tapestry 4.2 have an iterator component

2007-10-08 Thread Martino Piccinato
In fact it seems to me you should solvee your problem with some easy
page method creating the list to be iterated by the for each time you
reload the page.

So you have your big list in one property and another method
(possibly reading other properties/parameters) will slice the big list
to provide for the actual list iterated by for (finally it's still a
list...). Don't mix the complexity of your controller/model with the
simplicity of tapestry components :-)


On 10/8/07, Ken nashua [EMAIL PROTECTED] wrote:

 Thanks Bob but I need to span the whole list.

 Thanks Andy but I how do I cause a for loop to iterate N iterations 
 independent of any collection?

 I guess I am looking for static iteration independent of any collection. I am 
 inheriting from baseComponent so I am not inclined to do this as a pure java 
 widget. I need to operate off the template.

 Would @Deletagor be an option?

 Best regards
 Ken in nashua

 From: [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Subject: RE: does tapestry 4.2 have an iterator component
 Date: Mon, 8 Oct 2007 11:34:04 -0400








 I can whip off a solution in JSP while I am typing...

 span jwcid=[EMAIL PROTECTED] source=ognl:collection
 value=ognl:currentObject index=ognl:index
 %

 for ( int i = 0; i  3; i++)
 spit out TRTD.../TD/TR
 %
 /span

 Why is it so hard to do such a fundamental thing in tapestry?

 Best regards
 Ken in nashua

 From: [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Subject: RE: does tapestry 4.2 have an iterator component
 Date: Mon, 8 Oct 2007 11:22:50 -0400








 martino I am already using the FOR component on my list.

 I have a select component that sets a tableSize at the top of page for a 
 list==100.

 If tableSize = 10, then I want to render 10 items within a TR/TR
 And continue until the list is exhausted.

 Then I will see 10 rows. Right?

 FOR does not permit this to happen. It is blind.

 Best regards
 Ken in nashua

 From: [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Subject: RE: does tapestry 4.2 have an iterator component
 Date: Mon, 8 Oct 2007 11:19:16 -0400








 Thanks Martino but FOR does not cut it. It blindly iterates a collection from 
 0..N.

 I need a component with which I can manipulate the front end starting index 
 and jump out break at a specified numeric index.

 Example: I have a list of 100 . Now I want to render trtd/td/tr and 
 show 7 elements and iterate again to do the same until the list is exhausted. 
 I cannot do this with FOR.

 ?

 Best regards
 Ken in nashua

 From: [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Subject: does tapestry 4.2 have an iterator component
 Date: Mon, 8 Oct 2007 10:57:42 -0400








 I would like to do some iteration like a true for loop with front, back and 
 computable boundaries.

 Is there such a component?

 Best regards
 Ken in nashua
 Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
 today!

 Peek-a-boo FREE Tricks  Treats for You! Get 'em!

 Climb to the top of the charts!  Play Star Shuffle:  the word scramble 
 challenge with star power. Play Now!

 Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it 
 now!

 _
 Climb to the top of the charts! Play Star Shuffle: the word scramble 
 challenge with star power.
 http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
in fact the only thing it were previously persisted in session were
IPropertySelectionModel but I thought this was just a mistake because
it had no much sense, giong to make some test more..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4.1.3: Why is id suffixed with _0 ?

2007-10-08 Thread Martino Piccinato
Unfortunately for some reason some components cannot be used with
updateComponents:

most notably Insert and If. The solution is to wrap you if with an Any
component that can be updated.

Id of components are suffixed with indexex _0, _1 ecc. usually when
inside a For to ensure each one has a different id (that is usually
the component name + the index).

On 10/8/07, Malin Ljungh [EMAIL PROTECTED] wrote:
 Hi all,

 I have a problem with the async and updateComponents.

 I have an If component with id ifNotLoggedIn with renderTag true.
 Inside this I have som DirectLinks to switch the content of my If using
 async and updateComponents=ifNotLoggedIn.
 I get the following exception:

 org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be null
 must not be null. [context:/WEB-INF/Home.page, line 5, column 54]
 at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java
 :411)
 at
 org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse(
 DojoAjaxResponseBuilder.java:241)
 at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
 (ResponseRendererImpl.java:33)
 at
 $ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java)
 at org.apache.tapestry.engine.DirectService.service(DirectService.java
 :147)


 and this is because the If component gets the id ifNotLoggedIn_0 when
 rendered.
 Why? Where did I go wrong?


 Cheers,
 Malin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.2] stale link on ajax modified form

2007-10-08 Thread Martino Piccinato
Well, after some cleanup and further test now the component is
(apparently) working perfectly. There was in fact some bad old code in
there that was messing up things.

But the strangest thing ever is that  firebug still gives me that
stalelinkexception when I fire my ajax eventlistener!! even though the
component is working. Nor I see any other request/response (XHR/NET)
with the html fragments that I KNOW are being updated (I just see
screen changing...)

So the situation is this:

I change a select, see a single request starting in firebug XHR/Net,
going to the correct listener and marked as dojo-ajax-request: true I
get the response, the second select is correctly updated, I look into
the response content with firebug and I see the above reported stale
link exception!


I'm puzzled.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combined Component Model - Is it supported ?

2007-10-05 Thread Martino Piccinato
Hi Ken, don't know if I get it rigth but it seems you just need a list
with pagination and the content to be reloaded dynamically (with an
ajax request) when changing page ( = clicking on one of the pagination
links).

You could certainly go with JSON but I suggest you for such a thing to
have a component made like this:

== paginated list component ==

pagination_links

= content_list_component =

pagination_links

== end paginated list component ==

The content list component will retrieve its list probably using some
parameter bounded on the main component. (e.g.
getOrderList(getCustomerId()) where getCustomerId() is a parameter
bound on the super component.

When clicking on a pagination link (a DirectLink)   the paging
DirectLink listener will update this property the parameter is bounded
to and issue a

getRequestCycle().getResponseBuilder().updateComponent(content_list_component);
this way the list (and just the list) will be dinamically updated.

Using JSON might be a little bit faster but would definitely require
more javascript code.

Hope this can be of any help.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: form post-redirect

2007-10-04 Thread Martino Piccinato
IExternalPage

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/IExternalPage.html

You'll have to generate an IExternalLink

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/link/ExternalLink.html

using the IExternalService (injected into the page)

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/ExternalService.html

(documentation on how to encode parameters is given mostly on this
last javadoc page).

IExternalCheers!


Martino

On 10/4/07, Patrick Kelly [EMAIL PROTECTED] wrote:
 Hi,

 I am having some trouble with a post-redirect in tapestry 4.  First,
 I have two pages, lets call them pageMain and pageForm.  I have a
 direct link using a listener with parameters from pageMain to
 pageForm.  On pageForm I have a simple form with a submit button that
 calls a listener to update to the DB.  At the end of the pageForm
 submit listener, I want to redirect back to pageMain, and set some
 parameters on pageMain.  I started to explore the tapestry-flash to
 prevent the form submit happening on page refresh, and it works
 perfect if I don't redirect to pageMain, and stay on pageForm.
 However, how do I pass parameters using ILink from pageForm to pageMain?

 Thanks - Patrick






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
don't know if it's what you are looking for but you can always
override renderComponent also in BaseComponent decorating the
component template with some additional html e.g.

/* (non-Javadoc)
 * @see 
org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
 */
public void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{

if (showComponent) {
writer.begin(div);
renderIdAttribute(writer, cycle);
writer.appendAttribute(class, getMyCSSClass());
renderInformalParameters(writer, cycle);
super.renderComponent(writer, cycle);
} else {
writer.begin(span);
renderIdAttribute(writer, cycle);
}

writer.end();
}


in this example, if the component is inheriting from BaseComponent ,
super.renderComponent(writer, cycle) , wil render the template
part of the component within
some other directly java manipulated html.

But it's not 100% clear to me what you mean with manipulation/usage
of templates within JAVA as in tapestry templates are manipulated
within java, meaning that you can change a template output quite a lot
using existing or custom components and ognl parameters binding.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
If inserted in a writer the following html will be split out as it is.
If you want to dynamically render components inside your component
(that is render different components depending on some conditions,
even dynamically with an ajax request) you can use block/renderblock
components.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
Don't know why you need specifically to extend that class, it's not
compulsory to have ajax (er even dojo) features.

You can easily manage XHR/AJax requests using an EventListener
annotation and selecting which components to partially update with
ResponseBuilde.updateComponent(idOfTheComponentToUpdate)

Or have your component  (IComponent, it does not matter whether you
extend or not other classes) implement IJSonRender interface that will
return the JSON data structure to your javascript caller.


On 10/1/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 If inserted in a writer the following html will be split out as it is.
 If you want to dynamically render components inside your component
 (that is render different components depending on some conditions,
 even dynamically with an ajax request) you can use block/renderblock
 components.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato

 Is the @RenderBlock specified from within the template or within the JAVA?



RenderBlock is a component, it's actually a component marking where
a specified Block component (could be chosen dynamically at runtime)
will be rendered.
As any component can be defined in the component definition java file
or with java annotations, neverthless it's position in html must be
specified in the html template.

What the Block/RenderBlock option gives you more with respect to other
solution is the fact that you can can choose completely different
Block to render at runtime (in fact any other component that can be
contained in a Block component), see the tab example in the user
guide: it's a non ajax example but could be easily turned in an ajax
update just using an EventListener and a
ResponseBuilder.updateComponent call.
http://tapestry.apache.org/tapestry4.1/components/general/renderblock.html




 How would I rig up a listener=listener:edit within the JAVA?



Why would you want to do that? Really I can't understand your case.
What you mean with rig up rig up a listener=listener:edit within java?

the writer you use inside a renderComponent just generate final output
for the browser, it's not meant to be parsed again in search of
components. If you want to add a link to your component I suggest you
to use a DIrectLink component in your component and use customer
components (with or without templates) for the rest. You can then
incorporate your components and other components in a super component.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



client validation problem with 4.1.3

2007-09-25 Thread Martino Piccinato
We have recently upgraded to tapestry 4.1.3 and started having a
relatively random problem with client side validation: in some cases,
apparently where we have validators:required bindings it appears an
empty validation box (no message, just the ok button) even though
all required fields are non empty. The problem seems to disappear
quitting the validators:required bindings.


Does anybody else has experienced this problem?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: client validation problem with 4.1.3

2007-09-25 Thread Martino Piccinato
I reply to myself, there's already a bug opened for this:
http://issues.apache.org/jira/browse/TAPESTRY-1753

Hivemind is throwin an exception if I try to override the required
validator contribution, isn't it possible to override it?

On 9/25/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 We have recently upgraded to tapestry 4.1.3 and started having a
 relatively random problem with client side validation: in some cases,
 apparently where we have validators:required bindings it appears an
 empty validation box (no message, just the ok button) even though
 all required fields are non empty. The problem seems to disappear
 quitting the validators:required bindings.


 Does anybody else has experienced this problem?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT?] OGNL source code and license

2007-09-24 Thread Martino Piccinato
Hi,

is OGNL open source? If it is where can I access source code? ognl.org
website mention 2.6.9 as latest release,  and I can't find no link to
any source repository.

I've also discovered there's a page on opensymphony website about ognl
that point to the jira issue tracker managed by Jesse and mentioning
all recent releases but can't find any link to the source code nor in
the issue tracker nor from opensymphony site that points to the 2.6.9
repository.

I'm quite confused :-)

Thanks

Martino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT?] OGNL source code and license

2007-09-24 Thread Martino Piccinato
tnx. The fact is that ognl.org site don't mention new versions at all
and opensymphny site reference a completely different source
repository. Let's say that OGNL is a Catch The Source If You Can
project ;-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Request Parameters

2007-09-22 Thread Martino Piccinato
It's not clear to me what exactly is your goal if it is, as I think,
dinamically generate a tapestry url inside a javascript you should
then look at one of the IEngineService (depending
on the type of service your link will be bound to):

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/IEngineService.html

in particular the getLink method.

In fact I think there is a lack of documentation in tapestry about how
to properly generate url.

The most common case (action/listener links for forms or not) you
should look at DirectService

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/DirectService.html

and the Object passed to the getLink method (even though not
documented) should be of type

DirectServiceParameter
(http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/DirectServiceParameter.html)

You can see the types of parameters that can be passed reading
DirectLink component documentation
(http://tapestry.apache.org/tapestry4.1/components/link/directlink.html)


Hope this can be of some help.

Martino


On 9/21/07, mogulwraith [EMAIL PROTECTED] wrote:

 From Javascript I try to build a link something like:

 var link = ${requestlink} + ?firstparam= + paramA + secondparam= +
 paramB;

 But when this gets back to the server the only parameter available with
 request.getParameter is the first one. How can I accomplish this?

 --
 View this message in context: 
 http://www.nabble.com/Request-Parameters-tf4498661.html#a12830070
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Tacos 4.1.0 release

2007-09-07 Thread Martino Piccinato
It's working perfectly. Thanks again for tacos, I think tapestry isn't
really complete without  it. The new DojoWidget component is great :-)

On 9/6/07, Igor Drobiazko [EMAIL PROTECTED] wrote:
 On 9/6/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
 
  have you tested DojoWidget with menus?


 DojoWidget was tested with examples in the demo application. Please explore
 the demo app.
 Do you mean dojo.widget.Menu2? There is no example for this widget.
 You can try it out and report bugs, if you find some.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Tacos 4.1.0 release

2007-09-06 Thread Martino Piccinato
It's really impressive, especially the DojoWidget component! Thanks
for the great work.

I have a few questions:

why using script.acuous.us and not dojo for Draggable and Droppable?
have you tested DojoWidget with menus?
and, finally, just to be sure: DojoWidget do not require parseWidget
shell parameters to be true, right?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4] is it possible to dinamically update a from a page a component's component with ResponseBuilder?

2007-09-04 Thread Martino Piccinato
This is my situation: I have a page containing component ComponentA,
this component contains another component (B), I want to
dinamically/ajax update ComponentB (and just component B) from the
main page. Is this possible at all?

My idea was to delegate dynamic updating through first component, the
way I sketch below but it seems not to be possible, does anybody has
any idea if this is possible at all?

class Page {

@Component
public abstract ComponentA getComponentA();

@EventListener
public myEventListener(IRequestCycle cycle) {

getComponentA().updateComponentB(cycle);

}

}


class CompomentB {

public updateComponentB(IrequestCycle cycle) {
   cycle.getResponseBuilder().updateComponent(idOfComponentB);
}

}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using bindings with assets paths

2007-09-03 Thread Martino Piccinato
It seems it's not possible to use bindings to specify asset paths, why?
Wouldn't it be a more tapestrish way to resolve assets?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I get a page from a sub-package

2007-08-28 Thread Martino Piccinato
I think you can use configuration parameter

org.apache.tapestry.component-class-packages

(from documentation) A comma-seperated list of package names, used
when  searching for the component class  . These must appear as meta
 tags in the application or library specification containing the
component


For other options you can see

http://tapestry.apache.org/tapestry4.1/usersguide/components.html

at the section Referencing Library Components


On 8/28/07, mraible [EMAIL PROTECTED] wrote:

 I have a UserForm class in a pages package and a UserList class in an
 admin sub-package. In UserForm, how do I get UserList? The following
 doesn't seem to work:

 UserList nextPage = (UserList) cycle.getPage(UserList);

 Results in: java.lang.ClassCastException: $UserList_4

 If I change it to cycle.getPage(admin/UserList), I get:

 java.lang.ClassCastException: $BasePage_4

 The last option (cycle.getPage(admin.UserList)) seems a bit closer, but
 still doesn't work:

 java.lang.NoClassDefFoundError: org/appfuse/webapp/pages/Admin/UserList
 (wrong name: org/appfuse/webapp/pages/admin/UserList)

 Thanks,

 Matt

 --
 View this message in context: 
 http://www.nabble.com/How-do-I-get-a-page-from-a-sub-package-tf4339857.html#a12362460
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Why do setting an unbounded component parameter throws an exception?

2007-08-26 Thread Martino Piccinato
Hi,

I don't understand why ParameterPropertyWorker makes parameter mutator
throw an exception if called over an unbounded parameter. I see this
behaviour as illogic: ParameterPropertyWorker do create a property
field so why not using this field to set the parameter if no binding
is available instead of throwing an exception? As a possible useful
example the field might be changed by a listener and later reused
later on during rendering.

So in my opinion if there's no binding there should be no exception
thrown and obviously  setObject should not be called on the (null)
binding, this would be the correct behaviour.


But maybe it's just my misunderstanding of tapestry logic and there's
a very good reason to throw this exception.

Martino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] dojo 0.9 upgrade, any plan?

2007-08-22 Thread Martino Piccinato
In a month or so I might be able to contribute some code.
But how to deal with backward compatibility? I mean switching to a
tapestry version with dojo 0.9 might oblige people to rewrite custom
widget and, in general, dojo code (unless one wants to also retain
old 0.4.x widgets/support but it would be more complicated).

Is there a aproximative release date for 4.1.3?


On 8/22/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:
 Nope.   No plans on my end at least.   I suspect if it is to come from
 Howard or myself it will make its first appearance in T5.  (not that I
 wouldn't love to move to it in T4)

 On 8/21/07, Martino Piccinato [EMAIL PROTECTED] wrote:
  Is there any plan to upgrade to new dojo 0.9 for tapestry 4.1.3?
 
  This should require some changes to existing widget and dojo support
  as dojo version 0.9 breaks previous API.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Jesse Kuhnert
 Tapestry/Dojo team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T3: How to capture time

2007-08-10 Thread Martino Piccinato
In 4.1.2 there's a nice dojo DropDownTimePicker (even though default
style has got a really small font)

On 8/10/07, Robert Zeigler [EMAIL PROTECTED] wrote:
 The Calendar component on tassel also wraps (a newer version of)
 the same js calendar that DateTimePicker wraps.
 But the component as written in tassel doesn't do the time. Some time
 ago, I took it and revamped it somewhat for my own needs to allow for
 time selection as well as date selection, and also allow for choosing
 which theme to use.  I sent the changes back to the original
 usc_calendar component author (at least, I'm pretty sure I did...
 if he's around and I'm wrong, let me know and I'll send them. This
 was many moons ago. ;) but I don't think they ever got incorporated
 into the version on tassel.
 If you're interested, shoot me an e-mail off list and I'll send you
 what I have.

 Robert

 On Aug 9, 2007, at 8/910:12 PM , Nick Westgate wrote:

  Search the list for old posts (2004) about DateTimePicker.
  The component jar is still here, I believe:
  http://myworkspace.sourceforge.net/component-library.html
 
  Cheers,
  Nick.
 
 
  Nazmul Bhuiyan wrote:
  Hello,
  I'm using DatePicker to capture dates. Is there any component to
  capture
  time?
  Thanks
  naz
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create a custom checkbox component

2007-08-10 Thread Martino Piccinato
Yes, there's a value parameter you can bind some page method to so
that you can easily get/set the !Object in the hidden field from the
page (you'll have to cast the object obviously).

I think you'll have all your checkboxes inside a For component so I
guess you'll iterate over a collection and have something like


component id=userList type=For
binding name=source value=nodes/
binding name=value value=currentNode/
/component

component id=nodeCheckBox type=Checkbox
binding name=value value=currentNode.selected/
/component

component id=nodeParent type=Hidden
binding name=value value=currentNode.parent/
/component

component id=nodeChild type=Hidden
binding name=value value=currentNode.child/
/component



Well I think guessed too much but as you haven't provided much information :-)

Depending on your model and on what you have to achieve things could
be even simpler as maybe you already have parent/child informations in
node itself

On 8/10/07, Mateus Lucio dos Santos [EMAIL PROTECTED] wrote:
 I like the idea!!
 But when the browser render this component will I be able to access
 those attributes?

 Martino Piccinato wrote:
  I think you could just make a component using a normal checkbox PLUS
  two Hidden components (
  http://tapestry.apache.org/tapestry4.1/components/form/hidden.html)
  containing the parent/child references.
 
  Just extend BaseComponent and use one Checkbox plus two Hidden in your
  new component.
 
  Adding strange, non standard, attributes to tags your browsers will
  see is never a good idea :-)
 
  On 8/10/07, Mateus Lucio dos Santos [EMAIL PROTECTED] wrote:
 
  Hi!
  I need to display a checkbox in a webpage. This checkbox work as a node
  in a treeview, so i need to save in the checkbox tag which node is his
  parent and which node are his children.
 
  I tried to simply add two attributes to the checkbox tag like this
  input id=test type=checkbox parent=parent children=children /
  it works just fine in I.E but firefox doesn't recognize the parent and
  children attributes, thats why i'm trying to solve this creating a
  component that has those attributes.
 
  I'm a beginner using tapestry so i'm clueless about how to create a
  component that works the this way.
  Can any one send me some material or explain me how to create this
  component?
 
  Thanks in advance
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create a custom checkbox component

2007-08-10 Thread Martino Piccinato
I think you could just make a component using a normal checkbox PLUS
two Hidden components (
http://tapestry.apache.org/tapestry4.1/components/form/hidden.html)
containing the parent/child references.

Just extend BaseComponent and use one Checkbox plus two Hidden in your
new component.

Adding strange, non standard, attributes to tags your browsers will
see is never a good idea :-)

On 8/10/07, Mateus Lucio dos Santos [EMAIL PROTECTED] wrote:
 Hi!
 I need to display a checkbox in a webpage. This checkbox work as a node
 in a treeview, so i need to save in the checkbox tag which node is his
 parent and which node are his children.

 I tried to simply add two attributes to the checkbox tag like this
 input id=test type=checkbox parent=parent children=children /
 it works just fine in I.E but firefox doesn't recognize the parent and
 children attributes, thats why i'm trying to solve this creating a
 component that has those attributes.

 I'm a beginner using tapestry so i'm clueless about how to create a
 component that works the this way.
 Can any one send me some material or explain me how to create this
 component?

 Thanks in advance


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: createReadOnlyBindingException help!

2007-08-09 Thread Martino Piccinato
Hi Andy,

I do not agree, it's not just a documentation problem I've opened a
bug for the specific Dialog problem:

https://issues.apache.org/jira/browse/TAPESTRY-1699

I think default use just doesn't behave the way you expect it to
behave (that is a bug, even though a minor one).

But I think there's also a generic enhancement to parameters that
could be made that I describe in

https://issues.apache.org/jira/browse/TAPESTRY-1700

I think this could provide a new interesting feature and many
misunderstanding like the one me and Andrea (I guess) had.

If you think it's useful I could provide some code


On 8/9/07, andyhot [EMAIL PROTECTED] wrote:
 Well, it looks like the hidden parameter is an in-out one,
 and it's probably that way by design I guess. The 'value' and 'index'
 parameters of @For
 work similarly but that's more straightforward after reading the docs.

 Anyway, I think we should just document this.

 Martino Piccinato wrote:
  Finally I think we were both wrong and that I opened two useless tickets:
 
  in fact, as stated in the documentation default-value attribute now
  accept any kind of binding and actually CREATES the binding if no
  other binding is present.
 
  In your case:
 
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException(
  AbstractBinding.java:115)) when I call into my rewindFormComponent method
  this code:
 
  setStartRow(sliderValue);
 
  and I set into jwc file:
  parameter name=startRow required=no cache=true
  default-value=ognl:0/
 
  means that at some point, during rewind, some of your code/components
  is calling a setStartRow to update the binding but the binding is
  invariant (ognl:0 is a costant!) so it's a read only binding (you
  can't change the value of a constant) so the
  ReadOnlyBindingException is correctly throwned.
 
  What you should do (if you really need to change the bound value) is
  bind to a containing component method (e.g. value=ognl:currentRow)
  that will contain the logic of when to return the default value and
  when not to.
 
  It's also possible NOT TO BIND the parameter by default, initializing
  the parameter method after the component finishLoad() phase, in your
  case it would be:
 
  In jwc:
  parameter name=startRow/
 
  In component:
 
  public void finishLoad() {
super.finishLoad();
setStartRow(0);
  }
 
 
  The fact is that default-value with invariant values (literal,
  ognl:constant, ecc.) make sense just if it's a read only binding, At
  the same time default-value with ognl expressions referring to
  containing component methods would break component encapsulation
  making assumptions on the exact method signature the containing
  component should implement (also its optional/default status would be
  questionable...).
 
  As for my specific Dialog component problem I think there's still a
  bug because the component IS actually trying to write the invariant
  default-value binding in hide/show methods so after 2 invalid ticket I
  hope I'm goig to open a valid one now.
 
 
 
  On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
  Posted one for the parameter issue
 
  https://issues.apache.org/jira/browse/TAPESTRY-1682
 
  and another one for the Dialog component:
 
  https://issues.apache.org/jira/browse/TAPESTRY-1683
 
  I didn't do it first because I was trying to investigate myself but I
  really have no time to do this now.
 
  Ciao
 
  Martino
 
  On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 
  Well, I try to investigate into this, meanwhile if you could be so kind to
  post a jira...
 
  ciao,
  kiuma
 
  On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
  Well, I'm having a very similar behaviour with Dialog component that
  by default has a true parameter for optional parameter hidden.
 
  parameter name=hidden default-value=true /
 
  It seems that if you set a constant value (ognl:0 or true) to a
  parameter then the parameter itself is regarded as Invariant by
  AbstractBinding that will refuse you to use any setter on it (it does
  not have a reference to a method but to a... constant) and throw the
  exception.
  I don't have the exception if I just override the constant default
  value with an ognl reference to a couple of setters/getters method
  (returning the default value in case the property is not initialized).
 
  In my opinion this is a bug with parameter but I haven't been able
  to investigate more and I'm quite surprised nobody stepped into this
  problem before, see my neglected Dialog mails  of some days ago :-)
 
 
 
  On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 
  this is the stack trace
 
 
 
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
  (
 
  AbstractBinding.java:115)
  org.apache.tapestry.binding.ExpressionBinding.setObject(
  ExpressionBinding.java:196)
  $EditTable_16.setStartRow($EditTable_16.java)
  org.jfly.web.components.edittable.EditTable.rewindFormComponent

Re: [T4.1]Returning a list to a page

2007-08-09 Thread Martino Piccinato
If I got right what's your case you could use the following pattern:


  public interface CalledPageCallback extends ICallback {

   public void setMyObject(MyClass myObject);

  }


   public class CallingPageCallback implements CalledPageCallback {

 private MyClass _myObject;

 public void setMyObject(MyClass myObject) {
 this._myObject = myObject;
 }

@Override
public void performCallback(IRequestCycle cycle) {
Defense.notNull(cycle, cycle);
CallingPage page = 
cycle.getPage(CallingPage.class.simpleName());
page.setNeededObject(_myObject);
activatePage(cycle,page);
}



   }

public class CalledPage extends BasePage {

   @Persist(client)
   public CalledPageCallback getCalledPageCallback()
   public abstract void setCalledPageCallback(CalledPageCallback cb)

   public abstract MyClass getSelectedObject();
   public abstract void setSelectedObject(MyClass selectedObject);



public void onSubmit(IRequestCycle cycle) {
   callback = this.getCalledPageCallBack();
   callback.setMyObject(getSelectedObject());
   callback.performCallBack(cycle);
}

}


Obviously when calling the CalledPage from the Calling page you'll
have to set the callback but at the same time you can have other
implementation of CalledPageCallback used from other different calling
pages.

We have used this pattern with success on our application, hope it can
be of some help.

On 8/9/07, Paolo Scopa [EMAIL PROTECTED] wrote:

 And you are right, actually i cant make it working.
 It seems that IPage is not serializable, so i cant use the
 @Persist(client)

 The problem using a string is that, when i return the string from my onOk
 listener, the calling page A is activated, but after the return statement
 it is too late to set the property we are talking about.
 What am i missing?
 Paolo
 p.s.: thanks for your patience...



 Ulrich Stärk wrote:
 
  Where's the problem to do the same thing with the name of the calling
  page? Store the name in a string property of page B before activating
  it...
 
  Uli
 
  Paolo Scopa schrieb:
  No prob.
  As i said to uli, i might call B from different pages, not only A.
  Maybe i should use a common interface for those pages.
  Ill try and let you know
  Paolo
 
 
  Patrick Klein wrote:
  Hello Paolo,
 
  mea culpa, you are correct abot that :)
  replace IPage with the A's class (implementing IPage) and cast the
  result of cycle.getPage(...) accordingly
 
  Regards,
  Patrick
  Thanks Patrick,
  this helps, except that the IPage does not expose the setList method,
  so
  i
  don't think it would work the
  page.setList(composedList);
  maybe not even compile.
  Paolo
 
 
  Patrick Klein wrote:
 
  Hello Paolo,
 
  page a should hold an (persist) abstract getter and setter for the
  list,
  page b hold a persist abstract getter and setter for the name of the
  calling page which is set when page b is accessed and maybe reset if
  needed in the button's listener.
  When you are done with compiling your list on page be and the button
  is
  pressed, do something like the following in the button's listener:
 
  (page b)
  public void buttonListener(IRequestCycle cycle) {
  [...]
  IPage page = cycle.getPage(getPageNameOfA());
  page.setList(composedList);
  [...]
  cycle.activate(page);
  }
 
  Regards,
  Patrick
 
  Hi all,
  got a bit blocked here: i need to return a value to the invoking
  page.
  Page A calls page B -
  in Page B I select a list of item from a longer list
  when I press OK on page B, the browser returns to page A where the
  list
  is
  set according to the selection made.
  I can set the returning page but cant find a way to set there the
  value
  to
  return.
 
  I tried different ways but cant find a solution.
  Any help ?
 
  Paolo
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12072218
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, 

Re: createReadOnlyBindingException help!

2007-08-09 Thread Martino Piccinato
You mean you could do something like

property name=hidden initial-value=true /
parameter name=hidden/

?? (don't think so).

Or you just refer about playing with properties and paramters?

I know there are other ways to achieve 1700 but I thought an
initial-value might be clearer,  just because it seems to me that
also the creatot of Dialog got confused with that :-)
To me that default-value instead of default-binding was very
confusing and I think it was the same kind of confusion.

Well, let's see if anybody think this is interesting, otherwise it was
just a good occasion for me to have a look at wonderful Tapestry code
:-)



On 8/9/07, andyhot [EMAIL PROTECTED] wrote:
 I'm not against 1699 at all!
 I'm just saying that it's also a documentation problem

 As for 1700, I think the traditional way of doing something like that
 has been to declare and use both a parameter and a property... so
 i'm not sure if what you're suggesting will help or confuse users -
 waiting for
 more comments on this.

 Martino Piccinato wrote:
  Hi Andy,
 
  I do not agree, it's not just a documentation problem I've opened a
  bug for the specific Dialog problem:
 
  https://issues.apache.org/jira/browse/TAPESTRY-1699
 
  I think default use just doesn't behave the way you expect it to
  behave (that is a bug, even though a minor one).
 
  But I think there's also a generic enhancement to parameters that
  could be made that I describe in
 
  https://issues.apache.org/jira/browse/TAPESTRY-1700
 
  I think this could provide a new interesting feature and many
  misunderstanding like the one me and Andrea (I guess) had.
 
  If you think it's useful I could provide some code
 
 
  On 8/9/07, andyhot [EMAIL PROTECTED] wrote:
 
  Well, it looks like the hidden parameter is an in-out one,
  and it's probably that way by design I guess. The 'value' and 'index'
  parameters of @For
  work similarly but that's more straightforward after reading the docs.
 
  Anyway, I think we should just document this.
 
  Martino Piccinato wrote:
 
  Finally I think we were both wrong and that I opened two useless tickets:
 
  in fact, as stated in the documentation default-value attribute now
  accept any kind of binding and actually CREATES the binding if no
  other binding is present.
 
  In your case:
 
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException(
  AbstractBinding.java:115)) when I call into my rewindFormComponent method
  this code:
 
  setStartRow(sliderValue);
 
  and I set into jwc file:
  parameter name=startRow required=no cache=true
  default-value=ognl:0/
 
  means that at some point, during rewind, some of your code/components
  is calling a setStartRow to update the binding but the binding is
  invariant (ognl:0 is a costant!) so it's a read only binding (you
  can't change the value of a constant) so the
  ReadOnlyBindingException is correctly throwned.
 
  What you should do (if you really need to change the bound value) is
  bind to a containing component method (e.g. value=ognl:currentRow)
  that will contain the logic of when to return the default value and
  when not to.
 
  It's also possible NOT TO BIND the parameter by default, initializing
  the parameter method after the component finishLoad() phase, in your
  case it would be:
 
  In jwc:
  parameter name=startRow/
 
  In component:
 
  public void finishLoad() {
super.finishLoad();
setStartRow(0);
  }
 
 
  The fact is that default-value with invariant values (literal,
  ognl:constant, ecc.) make sense just if it's a read only binding, At
  the same time default-value with ognl expressions referring to
  containing component methods would break component encapsulation
  making assumptions on the exact method signature the containing
  component should implement (also its optional/default status would be
  questionable...).
 
  As for my specific Dialog component problem I think there's still a
  bug because the component IS actually trying to write the invariant
  default-value binding in hide/show methods so after 2 invalid ticket I
  hope I'm goig to open a valid one now.
 
 
 
  On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
 
  Posted one for the parameter issue
 
  https://issues.apache.org/jira/browse/TAPESTRY-1682
 
  and another one for the Dialog component:
 
  https://issues.apache.org/jira/browse/TAPESTRY-1683
 
  I didn't do it first because I was trying to investigate myself but I
  really have no time to do this now.
 
  Ciao
 
  Martino
 
  On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 
 
  Well, I try to investigate into this, meanwhile if you could be so kind 
  to
  post a jira...
 
  ciao,
  kiuma
 
  On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
 
  Well, I'm having a very similar behaviour with Dialog component that
  by default has a true parameter for optional parameter hidden.
 
  parameter name=hidden default-value=true /
 
  It seems that if you

Re: createReadOnlyBindingException help!

2007-08-08 Thread Martino Piccinato
Finally I think we were both wrong and that I opened two useless tickets:

in fact, as stated in the documentation default-value attribute now
accept any kind of binding and actually CREATES the binding if no
other binding is present.

In your case:

org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException(
AbstractBinding.java:115)) when I call into my rewindFormComponent method
this code:

setStartRow(sliderValue);

and I set into jwc file:
parameter name=startRow required=no cache=true
default-value=ognl:0/

means that at some point, during rewind, some of your code/components
is calling a setStartRow to update the binding but the binding is
invariant (ognl:0 is a costant!) so it's a read only binding (you
can't change the value of a constant) so the
ReadOnlyBindingException is correctly throwned.

What you should do (if you really need to change the bound value) is
bind to a containing component method (e.g. value=ognl:currentRow)
that will contain the logic of when to return the default value and
when not to.

It's also possible NOT TO BIND the parameter by default, initializing
the parameter method after the component finishLoad() phase, in your
case it would be:

In jwc:
parameter name=startRow/

In component:

public void finishLoad() {
super.finishLoad();
setStartRow(0);
}


The fact is that default-value with invariant values (literal,
ognl:constant, ecc.) make sense just if it's a read only binding, At
the same time default-value with ognl expressions referring to
containing component methods would break component encapsulation
making assumptions on the exact method signature the containing
component should implement (also its optional/default status would be
questionable...).

As for my specific Dialog component problem I think there's still a
bug because the component IS actually trying to write the invariant
default-value binding in hide/show methods so after 2 invalid ticket I
hope I'm goig to open a valid one now.



On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 Posted one for the parameter issue

 https://issues.apache.org/jira/browse/TAPESTRY-1682

 and another one for the Dialog component:

 https://issues.apache.org/jira/browse/TAPESTRY-1683

 I didn't do it first because I was trying to investigate myself but I
 really have no time to do this now.

 Ciao

 Martino

 On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
  Well, I try to investigate into this, meanwhile if you could be so kind to
  post a jira...
 
  ciao,
  kiuma
 
  On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
  
   Well, I'm having a very similar behaviour with Dialog component that
   by default has a true parameter for optional parameter hidden.
  
   parameter name=hidden default-value=true /
  
   It seems that if you set a constant value (ognl:0 or true) to a
   parameter then the parameter itself is regarded as Invariant by
   AbstractBinding that will refuse you to use any setter on it (it does
   not have a reference to a method but to a... constant) and throw the
   exception.
   I don't have the exception if I just override the constant default
   value with an ognl reference to a couple of setters/getters method
   (returning the default value in case the property is not initialized).
  
   In my opinion this is a bug with parameter but I haven't been able
   to investigate more and I'm quite surprised nobody stepped into this
   problem before, see my neglected Dialog mails  of some days ago :-)
  
  
  
   On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
this is the stack trace
   
   
   org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
   (
AbstractBinding.java:115)
org.apache.tapestry.binding.ExpressionBinding.setObject(
ExpressionBinding.java:196)
$EditTable_16.setStartRow($EditTable_16.java)
org.jfly.web.components.edittable.EditTable.rewindFormComponent(
EditTable.java:541)
   
On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:

 Hello!
 I'm having this exception (

   org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
 (AbstractBinding.java:115)) when I call into my rewindFormComponent
   method
 this code:

 setStartRow(sliderValue);

 and I set into jwc file:
 parameter name=startRow required=no cache=true
 default-value=ognl:0/


 Who can help me please ?

 Thx, kiuma

   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Acegi

2007-08-03 Thread Martino Piccinato
you have to configure your FilterSecurityInterceptor with something like this


property name=objectDefinitionSource
value
/login.html**=ROLE_ANONYMOUS,ROLE_AUTHENTICATED
/**=ROLE_AUTHENTICATED
/value
/property


and add an AnonymousFilter to your filterchain, e.g.:

bean id=filterChainProxy
class=org.acegisecurity.util.FilterChainProxy
property name=filterInvocationDefinitionSource
value
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT

/**=httpSessionContextIntegrationFilter,casProcessingFilter,logoutProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
/value
/property
/bean

bean id=anonymousProcessingFilter

class=org.acegisecurity.providers.anonymous.AnonymousProcessingFilter
property name=key
valueanon/value
/property
property name=userAttribute
valueanonymous,ROLE_ANONYMOUS/value
/property
/bean

This way non authenticated request will get a ROLE_ANONYMOUS by
default and will be able to see the login page.

It doesn't have much to do with Tapestry though, acegi is quite orthogonal ;-)

On 8/3/07, Paulo Ramos [EMAIL PROTECTED] wrote:
 Hi,

 I have 3 projects and i decide group commons components and pages in one
 library.
 One of the pages is the Acegi login.
 I have friendly url's and secure pages with Acegi.
 When i try to login, the form is sent by post to direct.svc and fail
 because this url is protected. How i can open the login response sent to
 direct.svc without expose other direct services.

 Thanks for your time




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4]Handling Nulls in OGNL expressions

2007-07-30 Thread Martino Piccinato
Hi,

please take my words with a grain of salt because I've never used this
in production but in my opiinon this should be the way to proceed:

have a look at this tapestry configuration point:

http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/config/tapestry.ognl.PropertyAccessors.html

here you can configure your OGNL PropertyAccessor that returns null on nulls.

This is the interface you have to implement, even though you can just
override the get method of the default implementation for objects.

http://www.ognl.org/2.6.9/Documentation/javadoc/ognl/PropertyAccessor.html



On 7/30/07, Marcos Chicote [EMAIL PROTECTED] wrote:
 I wouldn't mind implementing a hivemind service if I could solve the problem
 this way, but I don't know how to implement the behaviour that I want. I
 want exactly what you discribe happens in WebObjets: if at any point in the
 ognl chain a null object is invoked, the hole expression evaluates to null
 (or ).

 Could anyone help me on doing this?

 I have a hivemind service that captures null using interface NullHandler,
 but now I'm stuck!

 Thanks!

 Marcos

 On 7/29/07, Damien Uern [EMAIL PROTECTED] wrote:
 
  (Sorry for top posting, but everybody else seems to do it on this list)
 
  Anyway, the null pointer exception in a long property access chain was
  one of the issues I had with OGNL a while ago and have basically just
  learned to live with it. It is highly annoying. One of the things I
  preferred with Apple's WebObjects (which used NSKeyValueCoding for
  property access expressions) was that if any object in the chain was
  null, it just returned null. So if you have the expression:
 
  a.b.c.d
 
  where c is null, the entire expression would evaluate to null. Having to
  implement some sort of hivemind null pointer handling service just to
  get this sort of behaviour just screams over designed to me.
 
  (Not that I'm knocking OGNL/Tapestry in general, I still prefer using it
  over WebObjects for a variety of reasons).
 
  Damien
 
  Martino Piccinato wrote:
   In my opinion is all that you want is not having NullPointerException it
   would be better to implement MethodAccessor and/or PropertyAccessor,
  that
   would return null if the target object is null, then you could simply
  check
   expressions returning nulls and returning your message, or maybe have a
   special component doing this.
  
   Tapestry has configuration point also for default Method/Property
  accessors.
  
  
   On 7/26/07, Marcos Chicote [EMAIL PROTECTED] wrote:
   Responding to my own mail...
  
   I found an old Andreas mail to the lis (
  
  http://mail-archives.apache.org/mod_mbox/tapestry-dev/200606.mbox/[EMAIL 
  PROTECTED]
   )
  
   that explained how to do this.
  
   I'll sumarize my ideas so that I can check if they are correct and
  maybe
   it
   will result usefull to the next person that wants to do this.
  
   The idea is to define a class that implements NullHandler (
   http://www.ognl.org/2.6.9/Documentation/javadoc/ognl/NullHandler.html).
   That class job is to handle null's when an specific class access to
   property
   returns null.
   To make tapestry use your NullHandler you define something like this in
   your hivemind configuration file:
  
   contribution configuration-id=tapestry.ognl.NullHandlers
   null-handler class=classThatImplementsNullHandler
   object=instance:classToCaptureNulls/
   /contribution
  
   where classToCaptureNulls represents the name of the class who's nulls
  you
  
   want to handle and classThatImplementsNullHandler represents the class
   that
   knows how to deal with nulls in classToCaptureNulls.
  
   Now that I have this working I would like to know how to use it :D
  
   I mean, if I have a long ognl expression like obj1.obj2.obj3.obj4 and
   access
   to obj2 in obj1 return null, I would like to show an obj2 not
  available
   message on screen.
  
   Can anyone help me on how to use this service?
  
   Thanks!
  
   Marcos
  
   On 7/26/07, Marcos Chicote [EMAIL PROTECTED] wrote:
   Hi Andreas!
   When I emailed to Tapestry's list I was prototyping a project. Now I'm
   actually developing it and I'm very interested in getting this service
   working.
  
   Did you find some code where you used this feature?
  
   Thanks!
  
   Marcos
  
   On 6/29/07, Marcos Chicote [EMAIL PROTECTED] wrote:
   Thanks Andreas.
   I have to do some more reading then.
  
   I you have some code that I can use as an example I would be really
   grateful.
  
   Thanks!
  
   Marcos
  
   On 6/29/07, Andreas Andreou  [EMAIL PROTECTED] wrote:
   O/H Marcos Chicote έγραψε:
   Thanks Andreas.
   Before mailing to this list, I tried looking at the ognl
   documentation
   and I
   found the NullHandler interface but I wasn't sure how it worked
   with
   Tapestry or if it was possible to do it another way without
   altering
   the
   BOs.
  
   Correct me if I'm wrong but what I understand

Re: createReadOnlyBindingException help!

2007-07-30 Thread Martino Piccinato
Well, I'm having a very similar behaviour with Dialog component that
by default has a true parameter for optional parameter hidden.

parameter name=hidden default-value=true /

It seems that if you set a constant value (ognl:0 or true) to a
parameter then the parameter itself is regarded as Invariant by
AbstractBinding that will refuse you to use any setter on it (it does
not have a reference to a method but to a... constant) and throw the
exception.
I don't have the exception if I just override the constant default
value with an ognl reference to a couple of setters/getters method
(returning the default value in case the property is not initialized).

In my opinion this is a bug with parameter but I haven't been able
to investigate more and I'm quite surprised nobody stepped into this
problem before, see my neglected Dialog mails  of some days ago :-)



On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 this is the stack trace

 org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException(
 AbstractBinding.java:115)
 org.apache.tapestry.binding.ExpressionBinding.setObject(
 ExpressionBinding.java:196)
 $EditTable_16.setStartRow($EditTable_16.java)
 org.jfly.web.components.edittable.EditTable.rewindFormComponent(
 EditTable.java:541)

 On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 
  Hello!
  I'm having this exception (
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
  (AbstractBinding.java:115)) when I call into my rewindFormComponent method
  this code:
 
  setStartRow(sliderValue);
 
  and I set into jwc file:
  parameter name=startRow required=no cache=true
  default-value=ognl:0/
 
 
  Who can help me please ?
 
  Thx, kiuma
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: createReadOnlyBindingException help!

2007-07-30 Thread Martino Piccinato
Posted one for the parameter issue

https://issues.apache.org/jira/browse/TAPESTRY-1682

and another one for the Dialog component:

https://issues.apache.org/jira/browse/TAPESTRY-1683

I didn't do it first because I was trying to investigate myself but I
really have no time to do this now.

Ciao

Martino

On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 Well, I try to investigate into this, meanwhile if you could be so kind to
 post a jira...

 ciao,
 kiuma

 On 7/30/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 
  Well, I'm having a very similar behaviour with Dialog component that
  by default has a true parameter for optional parameter hidden.
 
  parameter name=hidden default-value=true /
 
  It seems that if you set a constant value (ognl:0 or true) to a
  parameter then the parameter itself is regarded as Invariant by
  AbstractBinding that will refuse you to use any setter on it (it does
  not have a reference to a method but to a... constant) and throw the
  exception.
  I don't have the exception if I just override the constant default
  value with an ognl reference to a couple of setters/getters method
  (returning the default value in case the property is not initialized).
 
  In my opinion this is a bug with parameter but I haven't been able
  to investigate more and I'm quite surprised nobody stepped into this
  problem before, see my neglected Dialog mails  of some days ago :-)
 
 
 
  On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
   this is the stack trace
  
  
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
  (
   AbstractBinding.java:115)
   org.apache.tapestry.binding.ExpressionBinding.setObject(
   ExpressionBinding.java:196)
   $EditTable_16.setStartRow($EditTable_16.java)
   org.jfly.web.components.edittable.EditTable.rewindFormComponent(
   EditTable.java:541)
  
   On 7/30/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
   
Hello!
I'm having this exception (
   
  org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
(AbstractBinding.java:115)) when I call into my rewindFormComponent
  method
this code:
   
setStartRow(sliderValue);
   
and I set into jwc file:
parameter name=startRow required=no cache=true
default-value=ognl:0/
   
   
Who can help me please ?
   
Thx, kiuma
   
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Controling Dialog Placement

2007-07-27 Thread Martino Piccinato
I think you can do this quiet easily overriding the dojoDialog css
class (assigned by Dialog template to dialog div).

I'm not sure about it though because I?m trying to use Dialog
component without success (see my msg on the list): are you using
Dialog in Tapestry 4.1.2 without problems?

On 7/26/07, Chris Chiappone [EMAIL PROTECTED] wrote:
 I was wondering if there was anyway to control the placement of the
 Dialog component.  I occasionally have more information that a normal
 1024x768 resolution can fit so users have issues seeing everything in
 my dialog box.  Is there a way to force the dialog to stay in place
 while scrolling.

 Thanks,

 --
 ~chris

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4] Problems with Dialog component

2007-07-26 Thread Martino Piccinato

Hi everybody,

I'm experiencing lots of problems with Dialog component with Tapestry
4.1.2, don't know if other or getting the same problems,
I'm just following the Dialog tutorial on online documentation.

First problem is that I get an exception if not setting the optional
hidden parameter with an ognl binding as in tutorial
hidden=ognl:hiddenDialog otherwise I'd get a ReadOnlyBindingException.

But this is not the biggest problem just by following the tutorial I
can set the parameter with an ognl binding and go ahead, what seems
not to be working at all is the hid()/show() mechanism, meaning that
when I click on the link to show the dialog the dialog appears bottom
left and BEHIND the grey layer used to disable the rest of the
screen

I don't have any form whatsoever in my page or in dojo dialog, I
investigated a bit with firebug and this is what appear BEFORE
clicking on showDialog link:

a id=DirectLink onclick=return
tapestry.linkOnClick(this.href,'DirectLink', false)
href=/kironweb/StartPage,$DirectLink.sdirect?updateParts=dialogComponentToggle
dialog/a

script type=text/javascript
!--
dojo.addOnLoad(function(e) {
tapestry.widget.synchronizeWidgetState(dialogComponent, Dialog,
{bgColor:black,bgOpacity:0.400059604645}, false);

dojo.widget.byId(dialogComponent).hide();});
// --
/script


div id=dialogComponent class=dojoDialog dojoattachpoint=wrapper
style=overflow: visible; position: absolute; z-index: 999; display:
none;
span tabindex=0 dojoonblur=clearTrap dojoonfocus=trapTabs
dojoattachpoint=tabStartOuter/
span tabindex=0 dojoonblur=clearTrap dojoonfocus=trapTabs
dojoattachpoint=tabStart/
div style=position: relative; z-index: 2;
dojoattachpoint=containerNode DIALOG CONTENT/div
span tabindex=0 dojoonblur=clearTrap dojoonfocus=trapTabs
dojoattachpoint=tabEnd/
span tabindex=0 dojoonblur=clearTrap dojoonfocus=trapTabs
dojoattachpoint=tabEndOuter/
/div
div class=dialogUnderlay style=position: absolute; top: 0px; left:
0px; z-index: 998; display: none; background-color: rgb(0, 0, 0);
height: 1px; width: 1px;/


This is what is in the DOM Tree AFTER pressing the show dialog button:

div id=dialogComponent class=dojoDialog dojoattachpoint=wrapper
style=visibility: visible; left: 0px; top: 337.5px; DIALOG
CONTENT/div
div class=dialogUnderlay style=position: absolute; top: 190px;
left: 0px; z-index: 998; display: block; background-color: rgb(0, 0,
0); height: 318px; width: 1264px; opacity: 0.4;/


So, I can se the dialog content but not positioned and under the
dialogUnderlay div and the application is just blocked obviously.


It's a very basic example on a very basic page, just following the
tutorial. My cache is disabled. Any suggestion? Does anybody had the
same problem?

Tnx

Martino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: about T4.1.2 sources in SVN

2007-07-26 Thread Martino Piccinato

No, usually tags are done for release and don't change with time.

trunk is usually the currently developed (changing) version.

version 4.1.2 just released recently so you have tag for 4.1.2 that reflect
the source code if this release (and that won't change), as Tapestry 4 is
still under active development you find changes from 4.1.2 (latest version)
in trunk



On 7/26/07, #Cyrille37# [EMAIL PROTECTED] wrote:


Jesse Kuhnert a écrit :
 If you want to look at 4.1.2 source use the tag - if you want to look at
 whatever the current development version is use trunk. (currently
 4.1.3 but
 that will probably change more frequently now)
Thanks.

Is the Tag 4.1.2 changes ? Like bug correction ?
I think the Tag is static and all changes comes to the 4.1.3, isn't it ??

Cheers
Cyrille

 On 7/22/07, #Cyrille37# [EMAIL PROTECTED] wrote:

 Hello

 If I want to have a look at T4.1.2 source code, should I use
 http://svn.apache.org/repos/asf/tapestry/tapestry4/tags/4.1.2
 or
 http://svn.apache.org/repos/asf/tapestry/tapestry4/trunk
 or
 somewhere else ?

 Thanks
 cyrille





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: about JSON-RPC

2007-06-27 Thread Martino Piccinato

Have your component implement the IJSONRencerer interface (
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/IJSONRender.html
)



On 6/27/07, Renat Zubairov [EMAIL PROTECTED] wrote:


Depends on the version of tapestry. If you are talking about 4.1 you
can integrate it seamlessly to your page
About 5.0 I don't know the details, but as far as I've seen it should be
simple.
About earlier versions of tapestry you need to extend a BasePage class
a bit to generate JSON in response.

Renat

On 27/06/07, #Cyrille37# [EMAIL PROTECTED] wrote:
 Hello,

 I'm using JSON-RPC for talking beetwen a Java Applet and the
WebApplication.
 To manage JsonRpc calls I've done a Servlet.

 I come to you to know if there is a Tapestry way for handling those
 JsonRpc calls ?

 thanks for ideas
 cyrille

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Best regards,
Renat Zubairov

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: dynamic component injection

2007-06-21 Thread Martino Piccinato

tnx a lot Alejandro!

this is exactly what I was looking for, block/renderblock components
combined with EventListener  can be really powerful stuff but I didn't
realize it until I read your example.

It's also very interesting the way you use that Editors page as a block
component repository and the ComponentAddress beans.


Re: dynamic component injection

2007-06-20 Thread Martino Piccinato

did you find any cleaner way to do this?

I think this problem is not just related to one page applications but
apply also to any page/component that depending un user actions must show
different enough content (unless one wants to go with EventListener and a
long  ugly list of IF components...)


validating a complex form component

2007-05-29 Thread Martino Piccinato

I just wanted to know about best practices to validate components that are
used as part of a form but that are not IFormComponent (something that
happen pretty often in our code).

e.g. we have a LegalId component made by a select box where you choose the
type of id you are inserting plus an input field with the actual legal id
alphanumeric code (we use tapestry IFormComponent for these two fields). As
we have to validate differently the input field depending on the select
value, validation must happen at LegalId component level so we can't use
validators/translators; the way we go  is this:

1) inject the IValidationDelegate as a bean in the legalid component
2) use the validationdelegate to record validation errors on rewind in
pageEndRenderer, at this point, on a form submit, the rewind process will
have set all form properties and we'll be able to use all these properties
to make component level validation.

It seems it's working but it took us some time to get to this method, it
seems strange to me that there isn't a more standard way to do this nor
that there isn't any documentation about it.

Any suggestion?

Thanks.

Martino


Re: validating a complex form component

2007-05-29 Thread Martino Piccinato

sorry forgot to say that we are using tapestry 4 (4.1.2)


Re: validating a complex form component

2007-05-29 Thread Martino Piccinato

Sorry the previously described approach was actually wrong: pageEndRenderer
is called after the submit listener...

So it seems the only approach we can have is overriding renderComponent and
make use of the IValidationDelegate there.

Still strange there isn't any documentation on this.


Re: Is onActivate a robust place for authentication?

2007-05-18 Thread Martino Piccinato

I think what you are looking for is interface PageValidateListener

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/event/PageValidateListener.html

it's thought just for this kind of things afaik.

On 5/18/07, Eric Chatellier [EMAIL PROTECTED] wrote:


2007/5/18, Bill Holloway [EMAIL PROTECTED]:
 I'm not sure yet how to integrate ACEGI, but I can look at an ASO in
 onActivate for a page.  Is returning a page name from onActivate() a
 robust solution for basic user authentication?

 Bill

I bill

I'm interested by the answer too...

Where can we put redirect to login form (for exmple) if the user has
not logged in ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: T4.1 - Exceptions handling

2007-05-15 Thread Martino Piccinato

I think you can just configure your

contribution configuration-id=tapestry.Infrastructure
   property name=exceptionPageName value=MyCustomExceptionPageName/
/contribution


and let the page decide which other page to use for different sets of
exceptions.

On 5/15/07, Wojtek Ciesielski [EMAIL PROTECTED] wrote:


Andreas Andreou wrote:
 like

http://tapestry.apache.org/tapestry4.1/developmentguide/exceptionpages.html
 ?

Btw - no, not like this. The page you've provided show how to change
handling page for a given set of predefined exceptions (if I understand
it well). I need to handle my own application exceptions (like
CustomerDoesNotExistException or SessionIsTimeoutedException)

Wojtek

--
Jestes kierowca? To poczytaj!  http://link.interia.pl/f199e


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EventListener fails to update PropertySelection in IE

2007-05-07 Thread Martino Piccinato

I'm not completely sure but I think your problem is that the component you
are updating does not refer to the entire select block but just to the
label. As the eventlistener/ajaxdojoresponse basically rely client side on
the innerHTML (or similar) javascript function to replace inner html we had
success in this surrounding the entire html select fragment with a bloc tag
(e.g. div or span).

On 5/6/07, RobertSchreiber [EMAIL PROTECTED] wrote:



Dear Tapestry specialists,

I have 2 corresponding PropertySelections in my page.

In Firefox everything works like expected.

As soon as I select a species in PropertySelection 'speciesSelect' the
corresponding 'breedSelect' gets updated.

In Internet Explorer 6/7 I have to update the whole form 'animalEditForm'
but then the form gets validated and fails because other
input fields have not yet been filled in.

Any ideas?

Best regards, Robert from Munich


HTML:
=
form jwcid=[EMAIL PROTECTED]  success=listener:doSubmit
method=post
clientValidationEnabled=ognl:false delegate=prop:delegate
!-- ... --
label jwcid=@FieldLabel field=component:speciesSelect Species:
/label
select jwcid=speciesSelect
   optionCats/option
   optionDogs/option
/select

label jwcid=@FieldLabel field=component:breedSelect Breed: /label
select id=breedSelect jwcid=breedSelect
   option value=nbsp;/option
   option value=1Dog breed 1/option
   option value=2Dog breed 2/option
/select

input jwcid=@Submit type=submit  value=message:submit/
/form

Java:
=
@EventListener(events = onchange, targets = speciesSelect,
submitForm=animalEditForm)
public void onSpeciesSelected(IRequestCycle cycle) {
   AnimalBreed bfirst = (AnimalBreed)getBreedController().getFirstEntry();
   setSelectedAnimalBreed(bfirst);
   cycle.getResponseBuilder().updateComponent(breedSelect); // works in
Firefox not in IE 6
   //cycle.getResponseBuilder().updateComponent(animalEditForm); //
works
in Firefox and IE 6
}

@Component(id = speciesSelect, bindings = {
   model=speciesModel,
   value=selectedAnimalSpecies,
   displayName=message:speciesSelect})
public abstract PropertySelection getSpeciesSelect();

@Component(id = breedSelect, bindings = {
   model=breedModel,
   value=selectedAnimalBreed,
   displayName=message:breedSelect})
public abstract PropertySelection getBreedSelect();
--
View this message in context:
http://www.nabble.com/EventListener-fails-to-update-PropertySelection-in-IE-tf3700887.html#a10349141
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




using a JSONResponseBuilder (JSON requests/response in tapestry components)

2007-05-06 Thread Martino Piccinato

Hi all,

can anyone give me an example of how to use JSON with tapestry? I can see
there is a JSONResponseBuidler and I can see there is a
tapestry.bindjavascript function that support JSON I can't understand
what's the correct
way to handle this server side as there seems to be no equivalent
EventListener for JSON request/response. Am I supposed to do and map an on
purpose EngineService?

Thanks

Martino


Re: using a JSONResponseBuilder (JSON requests/response in tapestry components)

2007-05-06 Thread Martino Piccinato

thnx Jesse, I'll look better at the AutoCompleter. But what if I want to use
a json request in a client validator? Think about a javascript validator
making a request to see if an item with the same code was already inserted
making a simple json request to the server, I guess in that case I should
implement an EngineService, am I right?

On 5/6/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:


Implement IJSONRender on a component.


http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java?view=markup

On 5/6/07, Martino Piccinato [EMAIL PROTECTED] wrote:

 Hi all,

 can anyone give me an example of how to use JSON with tapestry? I can
see
 there is a JSONResponseBuidler and I can see there is a
 tapestry.bindjavascript function that support JSON I can't understand
 what's the correct
 way to handle this server side as there seems to be no equivalent
 EventListener for JSON request/response. Am I supposed to do and map
an
 on
 purpose EngineService?

 Thanks

 Martino




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com



Re: Help with jsessionid

2007-04-17 Thread Martino Piccinato

Actually the asset url encoding is ultimately delegated to
javax.servlet.HTTPServletResponse.encodeURL which just rewrites url if
session traking is turned off or your browser does not support cookies. As
probably this is not the case it might be a bug in your servlet container.

On 4/17/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:


Hello, it's happening something very strange with my demo app. in T4.1.2.

I've defined the a border component that contains a call to @Shell like:
component id=shell type=Shell
binding name=title value=ognl:title/
binding name=delegate value=new
org.apache.tapestry.components.BlockRenderer(components.remainingHead)/
binding name=renderBaseTag value=ognl:false /
binding name=consoleEnabled value=ognl:true /
binding name=browserLogLevel value=literal:ERROR/
binding name=tapestrySource value=asset:coreJs/
binding name=dojoSource value=asset:dojoSource/
binding name=dojoPath value=asset:dojoPath/
/component
asset name=coreJs path=/js/core.js/
asset name=dojoSource path=/js/dojo/dojo.js/
asset name=dojoPath path=/js/dojo//

the strange thing is that for a page it perfectly work

but for another that seems identical (maybe I'm wrong) thigs are rendered
like here:

script type=text/javascriptdjConfig =

{isDebug:true,debugContainerId:debug,baseRelativePath:/js/dojo/;jsessionid=14BA82F304BF5E5C9C1F84CB52E211A3,preventBackButtonFix:false,parseWidgets:false,locale:en-us}
/script

script type=text/javascript

src=/js/dojo/dojo.js;jsessionid=14BA82F304BF5E5C9C1F84CB52E211A3/script
script type=text/javascript
dojo.registerModulePath(tapestry, /asset.svc?path=%2Ftapestry%2F);
/script
script type=text/javascript
src=/js/core.js;jsessionid=14BA82F304BF5E5C9C1F84CB52E211A3/script


The attach of jsessionid breaks the page, and I even don't know why it is
appended.

I'm staled please help.

Thx,
kiuma



Re: Help with jsessionid

2007-04-17 Thread Martino Piccinato

sorry just wanted to comment one thing more: if this session appending is
happening just the first time you hit the application (so you are without a
cookie) in this case I think the servlet container is doing the right thing
(it does not know you support cookies on first hit). This might cause
problems to some web server  (e.g. apache for mod_jk connector) to resolve
urls.

I think this is all that comes to my mind given the informations you gave
:-)


Re: Help with jsessionid

2007-04-17 Thread Martino Piccinato

I don't think the right solution is turning off url rewriting: do you have a
web server (e.g. apache) in fron of your servlet container? in this case the
cause might be apache not understanding/discarding the part of the path
where the semicolon (;) is used, a couple of url rewrite should do the
work.


Re: Help with jsessionid

2007-04-17 Thread Martino Piccinato

the first time you hit a page url rewriting is enabled because the servlet
container has no way to tell whether you support cookies or not (you don't
send any cookie header as you still don't have a cookie). See my other reply
about what could be the real problem (not url rewriting but a web server
that does not know how to interpret rewritten url).

Which servelet container/web server are you using? how are they configured?


ICallBack, PageRedirectException and IRequestCycle.activate (comment on forwarding in tapestry)

2007-04-14 Thread Martino Piccinato

Hi all,

sorry for the long mail, I just wanted to comment on what I see as a
tapestry 4 weirdness or limitation, or maybe it's just me missing something
:-)

In brief we are trying to use ICallBack objects to manage some more complex
navigational needs in our web application,
everything works fine as long as callback objects are used in listeners, as
it is implicitly intended to be; problems arise when one wants to use the
same callback objects in other contexts (pageBeginRenderer e.g.): when the
IEngineService has already started the response rendering (even though page
rendering has not started yet!) the IRequestCycle.activate method is just
useless . I know I could always use PageRedirectException but I'd like to
throw exception just in case of exceptional cases and use
cycle.activate(page)
for the rest :-)

In general I don't understand why there are two distinct methods to do such
a natural thing as forward to another page. I think the logic is that if a
response has already begun to render than is an Exception to forward to
another page while you can still normally activate the new page while
using a listener with the DirectService. I think this can have some
internal consistency but I'm not sure it expose an easy API to tapestry
users. Even though tapestry is page based pages are still acting as
controllers and forwarding to a different controller should be a natural
thing one should do with a simple cycle.forward(page) method being sure this
will always work instead of having to understand tapestry inner working and
try to understand whether to use PageRedirectException or
IRequestCycle.activate (thing that is impossible to do when you just have an
IRequestCycle as in ICallBack objects, while IRequestCycle should provide
all possible information about response rendering cycle as the documentation
states).

Moreover while it might hold that forwarding when a page has already begun
rendering is an exceptional behaviour, it seems very strange one cannot
forward BEFORE the page is beginning to render, that is in pages
PageBeginRendererListener. I think is not difficult to imagine scenarios
where one check if the page status is what is desired to be before beginning
to render and decide to forward to another page if it's not.

Basically I think one of the two should be provided:

1) To me more natural: a IRequestCycle.forward(page) that would in any case
reset current response rendering and activate the rendering of the passed
page (might catch forward cycle as the
AbstractEngine.handlePageRedirectException does).
2) More conservative: provide a boolean IRequestCycle.isResponseRendering()
method that would allow people to know if response rendering has already
started and so if it's of any use IRequestCycle.activate(IPage) or
PageRedirectException should be used instead.

Actually a third option would be to expose firePageBeginRender method in
IPage interface so that at PageBeginRendererListeners will be called before
the response is beginning to render and so still in time to last minute
forward to another page (but sill forward cycles will have to be detected
here too).

Martino

P.S.

I'm sure this has been discussed before but PageRedirectException (and also
redirect method) cause confusion with true HTTP Redirect


Re: pageBeginRender and submit

2007-04-03 Thread Martino Piccinato

You can look here:

http://tapestry.apache.org/tapestry4.1/faq.html#submit-lifecycle

on form submit pageBeginRender is called before the form submit listener
discarding output in order to set page and page components in the proper
status before your listener is called.
As your next question might be what if I don't want to execute some code in
my pageBeginRenderr during first call?


The answer is check for cycle.isRewinding()

use

if(cycle.isRewinding()) { // This is the first rewind no output
pageBeginRenderer call code
/// Code
} else { // This is the second real output pageBeginRenderer call code
// Code
}


:-)

On 4/3/07, paolo [EMAIL PROTECTED] wrote:



Hi, I'm quiet new of tapestry.
I have a problem in calling a page.
My form in MyPage.html is

form jwcid=[EMAIL PROTECTED] listener=ognl:listeners.submitMainForm
delegate=ognl:beans.delegate input type=submit jwcid=
[EMAIL PROTECTED]
value=Salva selected=ognl:mainSubmitType
 tag=saveDay /
/form

In MyPage.java I have a method submitMainForm(IRequestCycle cycle) and the
pageBeginRender method.
When I press submit button, I see that is called:
pageBeginRender method,
submitMainForm
pageBeginRender again.
When is there a listener on form Is pageBeginRender method called before
listener method?
Which is the problem?

Thanks a lot in advance



--
View this message in context:
http://www.nabble.com/pageBeginRender-and-submit-tf3510853.html#a9806821
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: OGNL PropertyAccessor and null handling best practices

2007-04-02 Thread Martino Piccinato

Yes, you are right this is for sure the most correct approach in theory and
the approach I've tried to have until now but I have to admit a couple of
things:

1) 100% of the wrapper page methods just returns nulls on null (what the
null PropertyAccessor would do)
2) due to my relatively complex model this ends up in a lot of boilerplate
code

At the end I think I'll still try to keep the in page null-checking approach
but it's interesting to know how other people are going with this.


On 4/2/07, Hoogeveen, Erik [EMAIL PROTECTED] wrote:


What I usually do is to use a method in de page that retrieves the right
value if it's there. That method does the null handling I need for the
value I want to display. If there's a null somewhere it can just return
an empty string or something like that.

Furthermore if I use only an ognl expression I try to keep them rather
shallow, so they don't traverse to deep into de object model. This is
not only because of null checking though, it also makes refactoring
easier (you don't get compiler errors on ognl expressions).

--
Water, taken in moderation, cannot hurt anybody.
-- Mark Twain --

-Oorspronkelijk bericht-
Van: Martino Piccinato [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 30 maart 2007 11:53
Aan: Tapestry users
Onderwerp: OGNL PropertyAccessor and null handling best practices

Hi,

I think this issue has been discussed before on the list, I've read some
message somewhere but wanted to ask about more feedback on best practice
on
this.
The problem is handling nulls with OGNL while navigating the object
graph,
that is: getting bad NPE if one of the object of the navigation chain is
null.


Basically there are two solution to the issue:  add (a lots, in my case
as
we have a quite complex object model) null checking methods to my
components/pages
or just configure tapestry to use a forgiving OGNL PropertyAccessor that
would return null for any method to be invoked on a null (I actually
don't
like NullHandlers that create empty model objects and actually I'd
prefer
not to have public no argument constructors or creating empty objects
just
for this).


I was just wondering how you deal with this and if you have particular
suggestions.

Thanks

Martino
*** Waterschap Aa en Maas, met water in de weer! ***
Kijk voor meer informatie op www.aaenmaas.nl



Disclaimer:
Dit e-mail bericht is slechts bestemd voor de (rechts)persoon aan wie het
is gericht en
kan informatie bevatten die persoonlijk of vertrouwelijk is en niet
openbaar mag worden
gemaakt krachtens wet- of regelgeving of overeenkomst. Indien een ander
dan geadresseerde
dit e-mail bericht ontvangt of anderszins in handen krijgt is hij niet
gerechtigd tot
kennisneming, verspreiding, openbaar maken of vermenigvuldigen daarvan.
Hij wordt verzocht
onmiddellijk waterschap Aa en Maas telefonisch (telefoon: +31 (0)73
615) op de hoogte
te stellen en het e-mail bericht te vernietigen. Waterschap Aa en Maas
staat niet in
voor de juiste en volledige overbrenging van de inhoud van een verzonden
e-mail, noch voor
tijdige ontvangst daarvan. Dit e-mail bericht brengt geen enkele
contractuele gebondenheid
voor waterschap Aa en Maas tot stand.

Dit e-mail bericht is gecontroleerd op Virussen.

##

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Syntax for multiple validators

2007-04-02 Thread Martino Piccinato

You have to define your validators beans in the hivemodule tapestry
contribution

  contribution configuration-id=tapestry.form.translator.Translators
   bean name=myValidator class=my.MyValidator /
  /contribution

Then you can use the bean name directly in the binding as you do with other
tapestry default validators.

On 4/2/07, Hugo Palma [EMAIL PROTECTED] wrote:


Hi all,

i would like to use two validators in a TextField where one of the
validator
is defined as a bean in the page. I can't figure out the correct syntax to
use in the page spec for this. I've tried:

binding name=validators value=validators:required[%required-field]
bean:refmbValidator/

and

binding name=validators value=validators:required[%required-field],
bean:refmbValidator/

and lots others with no success...
Any ideas would be great.

Thanks



Re: Persisted Object with session scope is getting lost between the pages.

2007-04-01 Thread Martino Piccinato

Well, maybe you should post some code because it seems you are having some
specific problem in your pages/ASO persistence implementation and it's
impossible to figure out without seeing details

On 4/1/07, tapuser [EMAIL PROTECTED] wrote:



Thanks again.

I am trying to implement Master-Detail pages ( Order List - Item List).
On
oder List, I am trying to implement Edit/Add/View and Item List button. On
clicking item list button, I am displaying Item List. On Item List I am
implementing Add/Delelte/View/Edit Item. On Order Page, I am trying to
edit
only few fields.

Could you please suggest any example?

Thanks.
Srini.


Martino Piccinato wrote:

 Actually the situation you are describing is not completely clear to me
it
 seems you might want to do another
 getOrder() on form rewinding and merge the additional/showed fields with
 the
 previously persisted fields or add hidden input field components for the
 remaining fields but your case is not completely clear to me.

 On 3/31/07, tapuser [EMAIL PROTECTED] wrote:


 Hi Martino,
 Thanks. It works. I am having another issue with an
 entity
 values. I have 10+ fields in Order Object. I am displaying only 5
fields
 in
 Order.html. I have Order.page file with 5 fields. In editOrder(
 IRequestCycle cycle) method, I am setting
 nextPage.setOrder(serviceManager.getOrder(id)).  Order Object values
are
 getting lost after I do form sumbit ( save method). In Save method, I
am
 calling serviceManager.Save(getOrder());
 Could you please give me some hints? Do I need to specify all the
fileds
 in
 the page spec?

 Thanks.
 Sri.



 Martino Piccinato wrote:
 
  Yes is exactly the same, I quoted 4.1 documentation just because I'm
  investigating 4.1 now
 
  This is 4.0 docs for it:
 
  http://tapestry.apache.org/tapestry4/UsersGuide/state.html#state.aso
 
  On 3/30/07, tapuser [EMAIL PROTECTED] wrote:
 
 
  Hi Martino,
   Thanks for the reply.  I am using Tapestry 4.0.2.
Is
 ASO
  exist in 4.1+?
 
  Thanks.
  Sri
 
 
  Martino Piccinato wrote:
  
   properties persisted on a page (being client or session persisted)
 are
   persisted just for that page (it's called persistent PAGE
  properties).
   Just to give you an idea the key of the session attribute named
used
 to
   store the property contains the page name . It's intended to be
so.
  
   Usually if you want to implement a shopping cart you'd have to use
   Application Stato Objects, ASO, see documentation about ASO at
   http://tapestry.apache.org/tapestry4.1/usersguide/state.html
  
   basically you just create whatever object you want to persist (e.g
.
  your
   shopping cart) , configure it as an ASO using
  
   tapestry.state.ApplicationObjects and then you can easily inject
it
   with an annotation in whatever page you need it.
  
  
  
   On 3/30/07, tapuser [EMAIL PROTECTED] wrote:
  
  
   Hi,
  I am new to Tapestry. I am facing a problem with
 Mater-Detail
   Pages
   [
   Orders List - Item List  - Item Edit/Add/Delete.]
  
   OrderList Page displays:
  
   OrderId - OrderNumber - ItemDetails
   123-ABC123 -Link to ItemDetails (OrderId is passed as
   parameter)
  
  
   ItemList Page Displays:
  
   Order Number: ABC123
   -
   Add new item button
  
   ItemId - ItemName - Qty
   1   -Book1 -  2 (link to item details for edit/delete)
   2   -   Book2   - 3 (link to item details)
  
  
   In OrderListPage.java:
  
   In viewItems() method:
  
   ItemListPage nextPage = (ItemListPage ) cycle
   .getPage(ItemListPage);
   nextPage.setOrder(order);
   cycle.activate(nextPage);
  
  
   In ItemListPage.java: I am persisting the order object.
  
   @Persist(session)
   public abstract void setOrder(Order order);
   public abstract Order getOrder();
  
   In ItemForm.java: I am persisting the order object. ( Don't how
to
  access
   the persisted object in the previous page).
  
   @Persist(session)
   public abstract void setOrder(Order order);
   public abstract Order getOrder();
  
  
   When I am saving Item, getOrder() is returning null. This value
 exists
   when
   I navigate to new Item Page. But it is getting lost while
accessing
  save
   method in ItemForm.java.
  
   Please help...
  
   Thanks in advance...
  
   -Sri
  
  
  
  
   --
   View this message in context:
  
 

http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9747985
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
  --
  View this message in context:
 

http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9749874
  Sent from the Tapestry - User mailing list archive at Nabble.com

Re: Persisted Object with session scope is getting lost between the pages.

2007-03-31 Thread Martino Piccinato

Actually the situation you are describing is not completely clear to me it
seems you might want to do another
getOrder() on form rewinding and merge the additional/showed fields with the
previously persisted fields or add hidden input field components for the
remaining fields but your case is not completely clear to me.

On 3/31/07, tapuser [EMAIL PROTECTED] wrote:



Hi Martino,
Thanks. It works. I am having another issue with an entity
values. I have 10+ fields in Order Object. I am displaying only 5 fields
in
Order.html. I have Order.page file with 5 fields. In editOrder(
IRequestCycle cycle) method, I am setting
nextPage.setOrder(serviceManager.getOrder(id)).  Order Object values are
getting lost after I do form sumbit ( save method). In Save method, I am
calling serviceManager.Save(getOrder());
Could you please give me some hints? Do I need to specify all the fileds
in
the page spec?

Thanks.
Sri.



Martino Piccinato wrote:

 Yes is exactly the same, I quoted 4.1 documentation just because I'm
 investigating 4.1 now

 This is 4.0 docs for it:

 http://tapestry.apache.org/tapestry4/UsersGuide/state.html#state.aso

 On 3/30/07, tapuser [EMAIL PROTECTED] wrote:


 Hi Martino,
  Thanks for the reply.  I am using Tapestry 4.0.2. Is
ASO
 exist in 4.1+?

 Thanks.
 Sri


 Martino Piccinato wrote:
 
  properties persisted on a page (being client or session persisted)
are
  persisted just for that page (it's called persistent PAGE
 properties).
  Just to give you an idea the key of the session attribute named used
to
  store the property contains the page name . It's intended to be so.
 
  Usually if you want to implement a shopping cart you'd have to use
  Application Stato Objects, ASO, see documentation about ASO at
  http://tapestry.apache.org/tapestry4.1/usersguide/state.html
 
  basically you just create whatever object you want to persist (e.g.
 your
  shopping cart) , configure it as an ASO using
 
  tapestry.state.ApplicationObjects and then you can easily inject it
  with an annotation in whatever page you need it.
 
 
 
  On 3/30/07, tapuser [EMAIL PROTECTED] wrote:
 
 
  Hi,
 I am new to Tapestry. I am facing a problem with Mater-Detail
  Pages
  [
  Orders List - Item List  - Item Edit/Add/Delete.]
 
  OrderList Page displays:
 
  OrderId - OrderNumber - ItemDetails
  123-ABC123 -Link to ItemDetails (OrderId is passed as
  parameter)
 
 
  ItemList Page Displays:
 
  Order Number: ABC123
  -
  Add new item button
 
  ItemId - ItemName - Qty
  1   -Book1 -  2 (link to item details for edit/delete)
  2   -   Book2   - 3 (link to item details)
 
 
  In OrderListPage.java:
 
  In viewItems() method:
 
  ItemListPage nextPage = (ItemListPage ) cycle
  .getPage(ItemListPage);
  nextPage.setOrder(order);
  cycle.activate(nextPage);
 
 
  In ItemListPage.java: I am persisting the order object.
 
  @Persist(session)
  public abstract void setOrder(Order order);
  public abstract Order getOrder();
 
  In ItemForm.java: I am persisting the order object. ( Don't how to
 access
  the persisted object in the previous page).
 
  @Persist(session)
  public abstract void setOrder(Order order);
  public abstract Order getOrder();
 
 
  When I am saving Item, getOrder() is returning null. This value
exists
  when
  I navigate to new Item Page. But it is getting lost while accessing
 save
  method in ItemForm.java.
 
  Please help...
 
  Thanks in advance...
 
  -Sri
 
 
 
 
  --
  View this message in context:
 

http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9747985
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:

http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9749874
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context:
http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9763239
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Persisted Object with session scope is getting lost between the pages.

2007-03-30 Thread Martino Piccinato

properties persisted on a page (being client or session persisted) are
persisted just for that page (it's called persistent PAGE properties).
Just to give you an idea the key of the session attribute named used to
store the property contains the page name . It's intended to be so.

Usually if you want to implement a shopping cart you'd have to use
Application Stato Objects, ASO, see documentation about ASO at
http://tapestry.apache.org/tapestry4.1/usersguide/state.html

basically you just create whatever object you want to persist (e.g. your
shopping cart) , configure it as an ASO using

tapestry.state.ApplicationObjects and then you can easily inject it
with an annotation in whatever page you need it.



On 3/30/07, tapuser [EMAIL PROTECTED] wrote:



Hi,
   I am new to Tapestry. I am facing a problem with Mater-Detail Pages
[
Orders List - Item List  - Item Edit/Add/Delete.]

OrderList Page displays:

OrderId - OrderNumber - ItemDetails
123-ABC123 -Link to ItemDetails (OrderId is passed as
parameter)


ItemList Page Displays:

Order Number: ABC123
-
Add new item button

ItemId - ItemName - Qty
1   -Book1 -  2 (link to item details for edit/delete)
2   -   Book2   - 3 (link to item details)


In OrderListPage.java:

In viewItems() method:

ItemListPage nextPage = (ItemListPage ) cycle
.getPage(ItemListPage);
nextPage.setOrder(order);
cycle.activate(nextPage);


In ItemListPage.java: I am persisting the order object.

@Persist(session)
public abstract void setOrder(Order order);
public abstract Order getOrder();

In ItemForm.java: I am persisting the order object. ( Don't how to access
the persisted object in the previous page).

@Persist(session)
public abstract void setOrder(Order order);
public abstract Order getOrder();


When I am saving Item, getOrder() is returning null. This value exists
when
I navigate to new Item Page. But it is getting lost while accessing save
method in ItemForm.java.

Please help...

Thanks in advance...

-Sri




--
View this message in context:
http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9747985
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Persisted Object with session scope is getting lost between the pages.

2007-03-30 Thread Martino Piccinato

Yes is exactly the same, I quoted 4.1 documentation just because I'm
investigating 4.1 now

This is 4.0 docs for it:

http://tapestry.apache.org/tapestry4/UsersGuide/state.html#state.aso

On 3/30/07, tapuser [EMAIL PROTECTED] wrote:



Hi Martino,
 Thanks for the reply.  I am using Tapestry 4.0.2. Is ASO
exist in 4.1+?

Thanks.
Sri


Martino Piccinato wrote:

 properties persisted on a page (being client or session persisted) are
 persisted just for that page (it's called persistent PAGE properties).
 Just to give you an idea the key of the session attribute named used to
 store the property contains the page name . It's intended to be so.

 Usually if you want to implement a shopping cart you'd have to use
 Application Stato Objects, ASO, see documentation about ASO at
 http://tapestry.apache.org/tapestry4.1/usersguide/state.html

 basically you just create whatever object you want to persist (e.g. your
 shopping cart) , configure it as an ASO using

 tapestry.state.ApplicationObjects and then you can easily inject it
 with an annotation in whatever page you need it.



 On 3/30/07, tapuser [EMAIL PROTECTED] wrote:


 Hi,
I am new to Tapestry. I am facing a problem with Mater-Detail
 Pages
 [
 Orders List - Item List  - Item Edit/Add/Delete.]

 OrderList Page displays:

 OrderId - OrderNumber - ItemDetails
 123-ABC123 -Link to ItemDetails (OrderId is passed as
 parameter)


 ItemList Page Displays:

 Order Number: ABC123
 -
 Add new item button

 ItemId - ItemName - Qty
 1   -Book1 -  2 (link to item details for edit/delete)
 2   -   Book2   - 3 (link to item details)


 In OrderListPage.java:

 In viewItems() method:

 ItemListPage nextPage = (ItemListPage ) cycle
 .getPage(ItemListPage);
 nextPage.setOrder(order);
 cycle.activate(nextPage);


 In ItemListPage.java: I am persisting the order object.

 @Persist(session)
 public abstract void setOrder(Order order);
 public abstract Order getOrder();

 In ItemForm.java: I am persisting the order object. ( Don't how to
access
 the persisted object in the previous page).

 @Persist(session)
 public abstract void setOrder(Order order);
 public abstract Order getOrder();


 When I am saving Item, getOrder() is returning null. This value exists
 when
 I navigate to new Item Page. But it is getting lost while accessing
save
 method in ItemForm.java.

 Please help...

 Thanks in advance...

 -Sri




 --
 View this message in context:

http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9747985
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context:
http://www.nabble.com/Persisted-Object-with-session-scope-is-getting-lost-between-the-pages.-tf3490484.html#a9749874
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




OGNL PropertyAccessor and null handling best practices

2007-03-30 Thread Martino Piccinato

Hi,

I think this issue has been discussed before on the list, I've read some
message somewhere but wanted to ask about more feedback on best practice on
this.
The problem is handling nulls with OGNL while navigating the object graph,
that is: getting bad NPE if one of the object of the navigation chain is
null.


Basically there are two solution to the issue:  add (a lots, in my case as
we have a quite complex object model) null checking methods to my
components/pages
or just configure tapestry to use a forgiving OGNL PropertyAccessor that
would return null for any method to be invoked on a null (I actually don't
like NullHandlers that create empty model objects and actually I'd prefer
not to have public no argument constructors or creating empty objects  just
for this).


I was just wondering how you deal with this and if you have particular
suggestions.

Thanks

Martino


Re: Latest OGNL 2.7-SNAPSHOT and Tapestry

2007-03-30 Thread Martino Piccinato

I've found a bug or at least a notable difference  with previous behaviour
regarding this.
I send it as a mail, if you find it interesting I can open a ticket for
this. It took me some to understand what was going on.

And yes: I'd like too to have the possibility to stick to ognl 2.6.7 with
latest trunk if possible ;-)

This is the situation:


public interface I1 {

   public String getXyz();

   public void setXyz(String x);

   public void doSomething();

}

abstract class A implements interface I1 {

   public void doSomething() {

// blah blah blah

   }

}


public class B extends A {

private String xyz;

public String getXyz() {
return xyz;
}

   public void setXyz(String x);
   this.xyz = x;
   }

}


Now I have a page:

public abstract MyPage extends BasePage {

   public A getObjectA()

   @Component(bindings=value=objecta.xyz)
   public abstract TextField getObjectATextField();

}


The page has a getter for object of type A but obviously I'm feeding it with
non abstract classes extending A that actually implement the
interface XYZ getters and setters.
now this WAS NOT failing with previous OGNL, it's failing with OGNL
2.7complaining for inconsistent method signatures.

After some experimenting I've discovered that in order for this to work I
need to implement, at least as an abstract method, in the A class the XYZ
getters ans setters that is turning A into:


abstract class A implements interface I1 {

   public void doSomething() {

// blah blah blah

   }


   public abstract String getXyz();

   public abstract void setXyz(String x);



}


After this modification it works like charms. So I think is missing proper
interface checking for accessing property: that is to say you might have to
do with an abstract class not directly implementing an interface method and
the expression evaluator should check for it. I think this should be
checked.


missing js resources from latest snapshot?

2007-03-30 Thread Martino Piccinato

I'm using latest snapshot 20070327 and the dojo/ajax subsystem can't find
the following important resources is trying to load:

html.js
tapestry.html
events.js

in fact the resources aren't in the jar.


Re: T5 vs T4 vs Community

2007-03-29 Thread Martino Piccinato

I think another bad perception might origin from the fact of having the T4
Ajax ready 4.1 release still not released as stable after quite a long
time and a completely new not retrocompatible T5 appear (the same to me: not
critiques, just observations).


Re: T5 vs T4 vs Community

2007-03-29 Thread Martino Piccinato

Well, I know it's not T4 = T5, I was just adding a possible source of bad
perception due to this misconception (and to misnaming...?)

I think that the fact of not having a stable T4 ajax ready release add
confusion to this. A customer thinking that T4 = T5 might think well they
are not pushing that much on T4 with ajax because they are already working
on T5, so as I want to work with Ajax why should I work with T4 that will be
soon outdated and not retrocompatible with T5?. And so on...




And actually having

On 3/29/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:


Martino,
your comment is because you consider T4=T5 as the major part of people
does.

On 3/29/07, Martino Piccinato [EMAIL PROTECTED] wrote:

 I think another bad perception might origin from the fact of having the
T4
 Ajax ready 4.1 release still not released as stable after quite a long
 time and a completely new not retrocompatible T5 appear (the same to me:
 not
 critiques, just observations).




Re: How to persist a variable to the user session programatically?

2007-03-28 Thread Martino Piccinato

Just look at this page:

http://tapestry.apache.org/tapestry4.1/usersguide/state.html

you are probably looking for Application State Object (ASO).

it's just what you want to do but hiding the retrieve/store complexities
that will be handled automatically by tapestry.
You just decide what's your ASO, declare it as an ASO, inject in the pages
you want to use it and forget about session details.

Hope it was of some help.

On 3/28/07, mxc [EMAIL PROTECTED] wrote:



Hi there,

Is there a way to do @Persist programatically?

i.e this.addToSession(var);

Also is there a way to go this.getFromSession(var)
thanks
--
View this message in context:
http://www.nabble.com/How-to-persist-a-variable-to-the-user-session-programatically--tf3481329.html#a9717068
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to persist a variable to the user session programatically?

2007-03-28 Thread Martino Piccinato

You can also get the WebSession object thourgh teh IRequestCycle

On 3/28/07, Martino Piccinato [EMAIL PROTECTED] wrote:


Just look at this page:

http://tapestry.apache.org/tapestry4.1/usersguide/state.html

you are probably looking for Application State Object (ASO).

it's just what you want to do but hiding the retrieve/store complexities
that will be handled automatically by tapestry.
You just decide what's your ASO, declare it as an ASO, inject in the pages
you want to use it and forget about session details.

Hope it was of some help.

On 3/28/07, mxc  [EMAIL PROTECTED] wrote:


 Hi there,

 Is there a way to do @Persist programatically?

 i.e this.addToSession(var);

 Also is there a way to go this.getFromSession(var)
 thanks
 --
 View this message in context: 
http://www.nabble.com/How-to-persist-a-variable-to-the-user-session-programatically--tf3481329.html#a9717068

 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





IFormComponent questions

2007-03-27 Thread Martino Piccinato

Is IFormComponent interface intended to be used also for form chunks
meaning for components representing certain input fields aggregation?
Imagine we have a ContactForm component used in different pages to gather
phone numbers, emails etc (just simple a simple TextField components
aggregate) using a simple xml component definition and an html template. I
thought the advantage of having it implement IFormComponent would be to
possibly have at the end common validation and access to including form (the
ValidationDelegate etc. etc.) am I right or is IFormComponent just thought

Another thing I don't understand is which method one MUST implement by
extending AbstractFormComponent (which might not be a good idea in my case
because we actually render the component with a template): e.g. there are
many abstract methods that are not implemented by TExtField (getForm()) but
still used. I guess AbstractFormComponent are then enhanced at runtime (by
whom?) but sometime is quite difficult to understand what MUST be enhanced
and what not.

All in all: would you consider a general good idea to implement the
IFormComponent interface for all components that are in fact part of a Form?


required fields formatting BEFORE validation

2007-03-23 Thread Martino Piccinato

Hi,

is there a standard way to define common formatting for required fields
BEFORE client/server side validation happens?
It's always a good thing for users to know compulsory fields before starting
data insertion.

I know the issue is easy to solve just by adding few things but it would be
good to have this in componentes that accept required validator.

Martino


Re: required fields formatting BEFORE validation

2007-03-23 Thread Martino Piccinato

Ok,

I reply to myself hoping this would be of any help for somebody else.
Is as simple as to make your own IValidationDelegate and override (exemple)
this method:

public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
   IFormComponent component, IValidator validator) {
   // If the form component represents a required field
   // it adds the required field class
   super.writeAttributes(writer, cycle,component,  validator);
   if (component.isRequired()) {
   writer.appendAttribute(class, requiredField);
   }
   }

obviously then you have to use your IValidationDelegate in your
pages/components.



On 3/23/07, Martino Piccinato [EMAIL PROTECTED] wrote:


Hi,

is there a standard way to define common formatting for required fields
BEFORE client/server side validation happens?
It's always a good thing for users to know compulsory fields before
starting data insertion.

I know the issue is easy to solve just by adding few things but it would
be good to have this in componentes that accept required validator.

Martino