Re: T5: Pretty URL

2008-01-17 Thread Angelo Chen

Hi,

How about adding a dispatcher which will inspect the path first, if it's
http://localhost:8080/pjx/project/999/backlog/panel then change it to:
http://localhost:8080/pjx/project/backlog/panel/999,

possible?


Howard Lewis Ship wrote:
> 
> Sorry, no this isn't directly possible.  Tapestry is pretty rigid
> about the format of the URLs:  It's always the logical page name
> ("project/backlog/panel" for class (root).pages.project.backlog.Panel
> then the activation context (the 999 id in this example).
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Pretty-URL-tp14946540p14947987.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]



Re: T5: How to use the Zone component?

2008-01-17 Thread Joshua Jackson
Thanks Geoff,

It worked :)

Best Regards,

On 1/18/08, Geoff Callender <[EMAIL PROTECTED]> wrote:
> Off  the top of my head, try this (untested):
>
>$
> {message:comment.add}
>
>
> And some java:
>
>private boolean _myZoneVisible = false;
>
>@Component
>private Zone _myZone;
>
>Object onActionFromComment() {
>_myZoneVisible = !_myZoneVisible;
>return _myZone;
>}
>
>public boolean getMyZoneVisible() {
>return _myZoneVisible;
>}
-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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



Re: T5: Pretty URL

2008-01-17 Thread Joshua Jackson
Thanks for the confirmation Howard,

I'm going to find a workaround for this :)

Best Regards,

On 1/18/08, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> Sorry, no this isn't directly possible.  Tapestry is pretty rigid
> about the format of the URLs:  It's always the logical page name
> ("project/backlog/panel" for class (root).pages.project.backlog.Panel
> then the activation context (the 999 id in this example).
>
> It's basically like this: more flexibility requires more (and more,
> and more) configuration which is entirely backwards from where
> Tapestry is coming from.

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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



Re: T5: How to use the Zone component?

2008-01-17 Thread Geoff Callender

Off  the top of my head, try this (untested):

	$ 
{message:comment.add}



And some java:

private boolean _myZoneVisible = false;

@Component
private Zone _myZone;

Object onActionFromComment() {
_myZoneVisible = !_myZoneVisible;
return _myZone;
}

public boolean getMyZoneVisible() {
return _myZoneVisible;
}

Cheers,

Geoff

On 18/01/2008, at 5:33 PM, Joshua Jackson wrote:


Dear all,

I'm trying to show a div element when an ActionLink component is  
hitted.


This is the code:

$ 
{message:comment.add}


   
   
   
   
   ${message:comment}
   td>

   
   
   
   
   
   
   
   
   
   

---

but instead of showing the div with id="zone" it returned an undefined
text instead.

Is there anything that I've missed?

Thanks in advance

--
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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





Re: T5: 5.0.8 snapshot java.lang.ClassNotFoundException for array

2008-01-17 Thread Howard Lewis Ship
Please add an issue and I'll figure out the fix.

On Jan 17, 2008 12:33 AM, Foror <[EMAIL PROTECTED]> wrote:
> In 5.0.7 snapshot properties with type "String[]" normally worked, after
> update last revision problems have begun:
>
> java.lang.ClassNotFoundException
> java/lang/String[]
>
> Stack trace
> * java.lang.Class.forName0(Native Method)
> * java.lang.Class.forName(Class.java:247)
> * 
> org.apache.tapestry.internal.services.ComponentClassCacheImpl.forName(ComponentClassCacheImpl.java:50)
> * 
> org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:235)
> * 
> ru.getdone.view.components.OrdersList._$read_parameter_urlParams(OrdersList.java)
>
> I have made small testing:
>
> public static void main(String[] args) throws ClassNotFoundException {
> String[] test = new String[] {};
> List test2 = new ArrayList();
>
> Class.forName(test.getClass().getCanonicalName()); 
> //java.lang.ClassNotFoundException
> Class.forName(test2.getClass().getCanonicalName()); //ok
>
> Class.forName(test.getClass().getName()); //ok
> }
>
> Probably in the tapestry it is necessary to use "getClass().getName()"
> for Array for the decision of a problem.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Pretty URL

2008-01-17 Thread Howard Lewis Ship
Sorry, no this isn't directly possible.  Tapestry is pretty rigid
about the format of the URLs:  It's always the logical page name
("project/backlog/panel" for class (root).pages.project.backlog.Panel
then the activation context (the 999 id in this example).

It's basically like this: more flexibility requires more (and more,
and more) configuration which is entirely backwards from where
Tapestry is coming from.

On Jan 17, 2008 8:32 PM, Joshua Jackson <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> If I have pages under my pages package with this structures:
> + project
> + -- Detail.java
> + project.backlog
> + -- Panel.java
>
> Is it possible to have these URL :
> http://localhost:8080/pjx/project/999/backlog/panel
>
> ?
>
> So the id is in between instead of at the end of the URL to refer that the
> id belongs to the project
>
> Thanks in advance.
>
> --
> I'm a coder not a drag-n-dropper
>
> Blog: http://joshuajava.wordpress.com/
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



T5: How to use the Zone component?

2008-01-17 Thread Joshua Jackson
Dear all,

I'm trying to show a div element when an ActionLink component is hitted.

This is the code:

${message:comment.add}





${message:comment}












---

but instead of showing the div with id="zone" it returned an undefined
text instead.

Is there anything that I've missed?

Thanks in advance

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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



T5: Pretty URL

2008-01-17 Thread Joshua Jackson
Dear all,

If I have pages under my pages package with this structures:
+ project
+ -- Detail.java
+ project.backlog
+ -- Panel.java

Is it possible to have these URL :
http://localhost:8080/pjx/project/999/backlog/panel

?

So the id is in between instead of at the end of the URL to refer that the
id belongs to the project

Thanks in advance.

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/


Re: T5: using TapestryTestCase

2008-01-17 Thread Howard Lewis Ship
Just invoke mailer.sendIt() while training your mocks, without an expect() call.

Copious examples of this in the Tapestry code base.

On Jan 17, 2008 6:06 PM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Thanks, that works. one related question:
>
> I have this:
>
> public interface Mailer {
> public void send();
> public String sendIt();
> }
>
> then somewhere in the test, i'd like to make sure send is called, but it can
> not passed to expect as the latter expects a object, any way to 'expect' a
> void method? thanks.
>
> Mailer mailer = this.newMock(Mailer.class);
> expect(mailer.sendIt()).andReturn("done");  // this works
> expect(mailer.send()).andReturn(null); // this does not work
>
>
>
> Igor Drobiazko wrote:
> >
> > Mock the session and pass through to the constructor:
> >
> > Session session = newMock(Session.class);
> > Service service = new Service(session);
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14944102.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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Autocomplete not working in form in block in zone

2008-01-17 Thread Howard Lewis Ship
Yep, I haven't tackled the forms + ajax + zones work yet.

On Jan 17, 2008 8:07 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
> Ah!  Thanks.  I knew Howard wouldn't let that slide!
>
> Bill
>
>
> On Jan 17, 2008 10:31 AM, Daniel Jue <[EMAIL PROTECTED]> wrote:
> > I am just starting with Zones, but is Zone support for forms working
> > at all?  I seem to recall on the nightly docs that form support is not
> > working yet.
> >
> >
> > On Jan 17, 2008 1:13 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
> > > Before entering a JIRA, wanted to hit the list.  Didn't see this in 
> > > search.
> > >
> > > I put an autocomplete textfield in a form and put that in a block
> > > which I then inject into a zone component with an actionlink.  The
> > > autocomplete so configured does not complete.  Doesn't even issue the
> > > XHR call.
> > >
> > > Thoughts?
> > >
> > > Bill
> > >
> > > -
> > > 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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Autocomplete not working in form in block in zone

2008-01-17 Thread Bill Holloway
Ah!  Thanks.  I knew Howard wouldn't let that slide!

Bill

On Jan 17, 2008 10:31 AM, Daniel Jue <[EMAIL PROTECTED]> wrote:
> I am just starting with Zones, but is Zone support for forms working
> at all?  I seem to recall on the nightly docs that form support is not
> working yet.
>
>
> On Jan 17, 2008 1:13 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
> > Before entering a JIRA, wanted to hit the list.  Didn't see this in search.
> >
> > I put an autocomplete textfield in a form and put that in a block
> > which I then inject into a zone component with an actionlink.  The
> > autocomplete so configured does not complete.  Doesn't even issue the
> > XHR call.
> >
> > Thoughts?
> >
> > Bill
> >
> > -
> > 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: T5: using TapestryTestCase

2008-01-17 Thread Andreas Andreou
Actually, take a look at some EasyMock tutorials (that's what's behind)
i think their site has a few...

Also, use:

   Mailer mailer = this.newMock(Mailer.class);
   expect(mailer.sendIt()).andReturn("done");
   mailer.send();



On Jan 18, 2008 4:06 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Thanks, that works. one related question:
>
> I have this:
>
> public interface Mailer {
> public void send();
> public String sendIt();
> }
>
> then somewhere in the test, i'd like to make sure send is called, but it can
> not passed to expect as the latter expects a object, any way to 'expect' a
> void method? thanks.
>
> Mailer mailer = this.newMock(Mailer.class);
> expect(mailer.sendIt()).andReturn("done");  // this works
> expect(mailer.send()).andReturn(null); // this does not work
>
>
>
> Igor Drobiazko wrote:
> >
> > Mock the session and pass through to the constructor:
> >
> > Session session = newMock(Session.class);
> > Service service = new Service(session);
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14944102.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]
>
>



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



Re: tapestry-spring

2008-01-17 Thread Howard Lewis Ship
FYI: I've been able to get in to my hosting provider and re-enable
directory listings.

On Jan 17, 2008 3:28 PM, Ulrich Stärk <[EMAIL PROTECTED]> wrote:
> I'm sorry, tapestry-javaforge is indeed needed as this is the parent pom
> for tapestry-spring. But it's working nonetheless. I just double checked
> this, just to make sure.
>
> http://www.howardlewisship.com/repository/com/javaforge/tapestry/tapestry-javaforge/1.0.0-SNAPSHOT/maven-metadata.xml
> lists the latest timestamp to be 20061122.201931 and the build number to
> be 1 and
> http://www.howardlewisship.com/repository/com/javaforge/tapestry/tapestry-javaforge/1.0.0-SNAPSHOT/tapestry-javaforge-1.0.0-20061122.201931-1.pom
> is accessible.
>
> Hong, please double check that you did everything as I suggested.
>
> Uli
>
> Ulrich Stärk schrieb:
>
> > http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.pom
> > works OK. As does
> > http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.jar
> >
> > It's just the directory listings that aren't but that shouldn't be a
> > problem.
> >
> > Hong: Please read the maven output carefully: The artifact is not
> > tapestry-javaforge but tapestry-spring. Of course it can't find an
> > artifact with the name tapestry-javaforge because it doesn't exist and
> > it is not what you want.
> >
> > You should also READ what I already posted:
> >
> > I gave you a link to
> > http://www.nabble.com/forum/ViewPost.jtp?post=11974805&framed=y
> > If you had read this posting you would have found the following
> > dependency there:
> >
> > 
> >com.javaforge.tapestry
> >tapestry-spring
> >1.0.0
> >
> >  
> >tapestry
> >tapestry
> >  
> >  
> >tapestry
> >tapestry-annotations
> >  
> >
> > 
> >
> > Copy that into your pom.xml. I just used it yesterday to create a new
> > project.
> >
> >
> > Howard Lewis Ship schrieb:
> >> I'll be looking at this today, in a few hours.
> >>
> >> On Jan 17, 2008 1:37 PM, HongDa Tang <[EMAIL PROTECTED]> wrote:
> >>> After strictly following the instructions provided
> >>> http://howardlewisship.com/tapestry-javaforge/ , the maven gave the
> >>> same error.  This error first appeared as
> >>> http://howardlewisship.com/repository/ website stop generating
> >>> directory listings.  You can reproduce this error by remove your
> >>> .m2/repository directory.  Below is the exact error msg:
> >>>
> >>>
> >>> 
> >>> [ERROR]BUILD ERROR
> >>> 
> >>> Failed to resolve artifact.
> >>>
> >>>
> >>> GroupId: com.javaforge.tapestry
> >>> ArtifactId: tapestry-javaforge
> >>> Version: 1.0.0-SNAPSHOT
> >>>
> >>>
> >>> Reason: Unable to download the artifact from any repository
> >>>
> >>>
> >>>   com.javaforge.tapestry:tapestry-javaforge:pom:1.0.0-SNAPSHOT
> >>>
> >>>
> >>> from the specified remote repositories:
> >>>   central (http://repo1.maven.org/maven2),
> >>>   howardlewisship.com (http://howardlewisship.com/repository/)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> - Original Message 
> >>> From: Ulrich Stärk <[EMAIL PROTECTED]>
> >>> To: Tapestry users 
> >>> Sent: Wednesday, January 16, 2008 8:34:11 AM
> >>> Subject: Re: tapestry-spring
> >>>
> >>>
> >>> It's not broken it's just not generating directory listings.
> >>>
> >>> Uli
> >>>
> >>> HongDa Tang schrieb:
>  http://howardlewisship.com/repository/ seems to be broken.  Does
> >>>  anyone know of a mirror site for http://howardlewisship.com/repository/
> >>>  where I can use maven to retrieve tapestry-spring library version
> >>> 1.0.0?
> >>>   Your help is appreciated.
> 
>  -Hong
> 
> 
>  -
>  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]
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> > -
> > 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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mai

Re: T5: using TapestryTestCase

2008-01-17 Thread Angelo Chen

Thanks, that works. one related question:

I have this:

public interface Mailer {
public void send();
public String sendIt();
}

then somewhere in the test, i'd like to make sure send is called, but it can
not passed to expect as the latter expects a object, any way to 'expect' a
void method? thanks.

Mailer mailer = this.newMock(Mailer.class);
expect(mailer.sendIt()).andReturn("done");  // this works
expect(mailer.send()).andReturn(null); // this does not work



Igor Drobiazko wrote:
> 
> Mock the session and pass through to the constructor:
> 
> Session session = newMock(Session.class);
> Service service = new Service(session);
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14944102.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]



Re: T5: Encoder and Loop

2008-01-17 Thread Howard Lewis Ship
That's the intent of the PrimaryKeyEncoder: to provide client/server
synchronization so that TextFields inside Loops inside a Form can
connect, when the client-side form is submitted, to equivalent
server-side objects.

The TextField components (and other form control element components)
understand how to operate inside a loop correctly.  On each pass
through the loop, they render again, with a unique @name and @id
attribute.

There are some examples for this inside the Tapestry integration
suite.  I'm afraid real documentation isn't ready yet.


On Jan 16, 2008 1:29 PM, Michael Courcy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Reading the doc on the loop component
> http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentsloop
>
> I can see that one of the parameter is encoder (PrymaryKeyEncoder) and
> this one should be used for a loop inside a form.
>
> I don't really grasp it, but does it mean that with an encoder it's
> possible to generate loop of textFields with validation for instance, or
> make me able to edit a whole collection inside a form ?
>
> If yes, someone could point examples or give hints ?
>
> Thanks a lot.
>
> --
> Michael Courcy
> http://courcy.blogspot.com
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Reading context before persistent fields are read

2008-01-17 Thread Howard Lewis Ship
The pipelines and chains of command make it easy to "slip in" specific logic.

OH, an alternative to defining a service to contain the data is to
just write it as a Request attribute.  I've used that approach for
handling a few awkward cases.

On Jan 17, 2008 5:56 PM, Ted Steen <[EMAIL PROTECTED]> wrote:
> Yep, that did it.
> Thanks!
>
> 2008/1/18, Howard Lewis Ship <[EMAIL PROTECTED]>:
>
> > If you mean the event context (as opposed to the page activation
> > context), then ...
> >
> > The path of least resistance is:
> >
> > 1) Define a service with a simple read/write property to store the
> > context.  Make sure this is perthread scope.
> > 2) Contribute a filter to the ComponentActionRequestHandler pipeline.
> > The filter can capture the event context and store it in your service.
> > 3) In your PersistentFieldStrategy, inject the context-storing service
> > and read the context.
> >
> > You might simplify #1 to just store the piece of data you need from the 
> > context.
> >
> > The approach is similar if you need page activation context,  but
> > you'll need to contribute a similar filter into the
> > PageRenderRequestHandler pipeline as well.
> >
> > On Jan 17, 2008 12:13 PM, Ted Steen <[EMAIL PROTECTED]> wrote:
> > > I need to hook in somewhere between where the context is available and
> > > the persistent fields are read.
> > > I need to read a context variable just before my
> > > PersistentFieldStrategy tries to read from the session, as I need a
> > > value from the context when reading from the session.
> > >
> > > What should I inject into my PersistentFieldStrategy in order to be
> > > able to read the context?
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > -
> > 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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: dynamically set disabled attribute

2008-01-17 Thread Howard Lewis Ship
Beginner's level Tapestry:

Bind the disabled parameter of each field to a property that returns
true when the field should be disabled and false otherwise.

Journeyman level Tapestry:

An alternative would be to define a special kind of binding for this
purpose.  I'd need more details, but a BindingFactory has access to
the component resources of the containing component and the resources
of the component whose property is being bound.  Between the two, you
should be able to define a Binding instance that returns true or false
under the correct circumstances.

On Jan 17, 2008 7:05 AM, Eric BIANCHI <[EMAIL PROTECTED]> wrote:
> Hello List,
>
> Using Tapestry 5, I'd like to dynamically set the disabled attribute
> of a Field depending of its id. So, on the same form, I could say :
> component1 has the disabled attribute set to true, component2 has the
> disabled attribute set to false and so on.
>
> I tried the following on the page containing the form :
>
> method 1 :
>
> @Inject
> private ComponentResources _componentSources;
>
> _componentSources
> .getEmbdedComponent(myId).getComponentResources().set... nothing
> because there is only the isDisabled method available.
>
> So I tried
>
> method  2 :
>
> 
>
> where disabledMethod is :
>
> if
> (_componentSources
> .getEmbdedComponent(myId).getComponentResources().isRendering())
> return true;
>
> return false;
>
> It works well until I submit the form, at this point, the component is
> not rendering, disabledMethod returns false (from what I have
> understood) and my field is set to null.
>
> Any hints would be highly appreciated.
>
> Thanks and best regards,
>
> Eric
>
> --
> Eric BIANCHI
> http://www.rodanotech.ch
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Reading context before persistent fields are read

2008-01-17 Thread Ted Steen
Yep, that did it.
Thanks!

2008/1/18, Howard Lewis Ship <[EMAIL PROTECTED]>:
> If you mean the event context (as opposed to the page activation
> context), then ...
>
> The path of least resistance is:
>
> 1) Define a service with a simple read/write property to store the
> context.  Make sure this is perthread scope.
> 2) Contribute a filter to the ComponentActionRequestHandler pipeline.
> The filter can capture the event context and store it in your service.
> 3) In your PersistentFieldStrategy, inject the context-storing service
> and read the context.
>
> You might simplify #1 to just store the piece of data you need from the 
> context.
>
> The approach is similar if you need page activation context,  but
> you'll need to contribute a similar filter into the
> PageRenderRequestHandler pipeline as well.
>
> On Jan 17, 2008 12:13 PM, Ted Steen <[EMAIL PROTECTED]> wrote:
> > I need to hook in somewhere between where the context is available and
> > the persistent fields are read.
> > I need to read a context variable just before my
> > PersistentFieldStrategy tries to read from the session, as I need a
> > value from the context when reading from the session.
> >
> > What should I inject into my PersistentFieldStrategy in order to be
> > able to read the context?
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> 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]



Re: TAP-5: Tapestry Release Semantics and legacy thereof

2008-01-17 Thread Howard Lewis Ship
On Jan 16, 2008 10:38 AM, Ken in nashua <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have been watching tapestry release semantics for many years now, as they 
> happen, as they impact the commercial field and related hurdles.
>
> Given the maturity of the framework and it's concepts... is it reasonable to 
> ask for the following:
>  o  Tapestry 5 be 100% commercially validated and qualified

What exactly does this mean?

The major difference with the T5 release cycle is that we will not
claim that a release is the final, stable GA release until it has been
available for some period of time.  So we will release something, say
5.0.10, and (after a vote) call it a release candidate.  If, after an
experience period of a month or so, no show-stopper bugs are added, we
can then vote it to be the stable release.

If bugs do occur, then they will be fixed in the release branch and in
the trunk, and a new release will be cut from the release branch and
the clock restarted.

This is (give or take) the methodology used elsewhere at Apache and
just makes more sense.  A release is good when no more bugs show up
for it.


>  o  Tapestry 5 provide tooling to migrate ALL
>  tapestry-4.* framework based application sources
>  (yes my tap 4 applications) to be tapestry 5 compliant
>  automatically

Are you willing to fund the development of such a tool?
>
> Any tapestry 4 webapp migration semantic is finite and concrete. It just 
> needs to be automated... (components, pages, services, etc...)
>
> Not trying to start a firestorm and thanks to the layman who have put their 
> heart into it so far... The framework is fun and likeable and I use it for 
> obvious real and good reason. June 2007 target was missed for tap5. Would 
> like to try and refrain from getting caught into the same release cycle 
> semantics that have occurred in the past. Are sincere efforts being 
> considered to prevent repitition? If so are the above requests reasonable?
> Feedback on feasibility and possibility is appreciated.
>
> Personally I would like to see this happen.
> Best regards Ken in nashua
> _
> Watch "Cause Effect," a show about real people making a real difference.
> http://im.live.com/Messenger/IM/MTV/?source=text_watchcause



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: t5: getting parameter from request

2008-01-17 Thread Howard Lewis Ship
That's odd, it doesn't do that for me.

What is your web.xml and what servlet container are you using?

On Jan 17, 2008 2:37 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Hi,
> in a dispatcher,
>
>  public boolean dispatch(Request request, Response response)
>
> if I pass url :http://localhost:8080/myapp/profile/262 in the browser,
> request.getPath() returns '/profile', I'd like to get 262 as well, anyway to
> retrieve this?
>
> Thanks,
>
> A.C.
>
> --
> View this message in context: 
> http://www.nabble.com/t5%3A-getting-parameter-from-request-tp14916048p14916048.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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Reading context before persistent fields are read

2008-01-17 Thread Howard Lewis Ship
If you mean the event context (as opposed to the page activation
context), then ...

The path of least resistance is:

1) Define a service with a simple read/write property to store the
context.  Make sure this is perthread scope.
2) Contribute a filter to the ComponentActionRequestHandler pipeline.
The filter can capture the event context and store it in your service.
3) In your PersistentFieldStrategy, inject the context-storing service
and read the context.

You might simplify #1 to just store the piece of data you need from the context.

The approach is similar if you need page activation context,  but
you'll need to contribute a similar filter into the
PageRenderRequestHandler pipeline as well.

On Jan 17, 2008 12:13 PM, Ted Steen <[EMAIL PROTECTED]> wrote:
> I need to hook in somewhere between where the context is available and
> the persistent fields are read.
> I need to read a context variable just before my
> PersistentFieldStrategy tries to read from the session, as I need a
> value from the context when reading from the session.
>
> What should I inject into my PersistentFieldStrategy in order to be
> able to read the context?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: tapestry-spring

2008-01-17 Thread Ulrich Stärk
I'm sorry, tapestry-javaforge is indeed needed as this is the parent pom 
for tapestry-spring. But it's working nonetheless. I just double checked 
this, just to make sure.


http://www.howardlewisship.com/repository/com/javaforge/tapestry/tapestry-javaforge/1.0.0-SNAPSHOT/maven-metadata.xml 
lists the latest timestamp to be 20061122.201931 and the build number to 
be 1 and 
http://www.howardlewisship.com/repository/com/javaforge/tapestry/tapestry-javaforge/1.0.0-SNAPSHOT/tapestry-javaforge-1.0.0-20061122.201931-1.pom 
is accessible.


Hong, please double check that you did everything as I suggested.

Uli

Ulrich Stärk schrieb:
http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.pom 
works OK. As does 
http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.jar 

It's just the directory listings that aren't but that shouldn't be a 
problem.


Hong: Please read the maven output carefully: The artifact is not 
tapestry-javaforge but tapestry-spring. Of course it can't find an 
artifact with the name tapestry-javaforge because it doesn't exist and 
it is not what you want.


You should also READ what I already posted:

I gave you a link to 
http://www.nabble.com/forum/ViewPost.jtp?post=11974805&framed=y
If you had read this posting you would have found the following 
dependency there:



   com.javaforge.tapestry
   tapestry-spring
   1.0.0
   
 
   tapestry
   tapestry
 
 
   tapestry
   tapestry-annotations
 
   


Copy that into your pom.xml. I just used it yesterday to create a new 
project.



Howard Lewis Ship schrieb:

I'll be looking at this today, in a few hours.

On Jan 17, 2008 1:37 PM, HongDa Tang <[EMAIL PROTECTED]> wrote:
After strictly following the instructions provided 
http://howardlewisship.com/tapestry-javaforge/ , the maven gave the 
same error.  This error first appeared as 
http://howardlewisship.com/repository/ website stop generating 
directory listings.  You can reproduce this error by remove your 
.m2/repository directory.  Below is the exact error msg:




[ERROR]BUILD ERROR

Failed to resolve artifact.


GroupId: com.javaforge.tapestry
ArtifactId: tapestry-javaforge
Version: 1.0.0-SNAPSHOT


Reason: Unable to download the artifact from any repository


  com.javaforge.tapestry:tapestry-javaforge:pom:1.0.0-SNAPSHOT


from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  howardlewisship.com (http://howardlewisship.com/repository/)








- Original Message 
From: Ulrich Stärk <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Wednesday, January 16, 2008 8:34:11 AM
Subject: Re: tapestry-spring


It's not broken it's just not generating directory listings.

Uli

HongDa Tang schrieb:

http://howardlewisship.com/repository/ seems to be broken.  Does

 anyone know of a mirror site for http://howardlewisship.com/repository/
 where I can use maven to retrieve tapestry-spring library version 
1.0.0?

  Your help is appreciated.


-Hong


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









-
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: tapestry-spring

2008-01-17 Thread Ulrich Stärk
http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.pom 
works OK. As does 
http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-spring/1.0.0/tapestry-spring-1.0.0.jar
It's just the directory listings that aren't but that shouldn't be a 
problem.


Hong: Please read the maven output carefully: The artifact is not 
tapestry-javaforge but tapestry-spring. Of course it can't find an 
artifact with the name tapestry-javaforge because it doesn't exist and 
it is not what you want.


You should also READ what I already posted:

I gave you a link to 
http://www.nabble.com/forum/ViewPost.jtp?post=11974805&framed=y
If you had read this posting you would have found the following 
dependency there:



   com.javaforge.tapestry
   tapestry-spring
   1.0.0
   
 
   tapestry
   tapestry
 
 
   tapestry
   tapestry-annotations
 
   


Copy that into your pom.xml. I just used it yesterday to create a new 
project.



Howard Lewis Ship schrieb:

I'll be looking at this today, in a few hours.

On Jan 17, 2008 1:37 PM, HongDa Tang <[EMAIL PROTECTED]> wrote:

After strictly following the instructions provided 
http://howardlewisship.com/tapestry-javaforge/ , the maven gave the same error. 
 This error first appeared as http://howardlewisship.com/repository/ website 
stop generating directory listings.  You can reproduce this error by remove 
your .m2/repository directory.  Below is the exact error msg:



[ERROR]BUILD ERROR

Failed to resolve artifact.


GroupId: com.javaforge.tapestry
ArtifactId: tapestry-javaforge
Version: 1.0.0-SNAPSHOT


Reason: Unable to download the artifact from any repository


  com.javaforge.tapestry:tapestry-javaforge:pom:1.0.0-SNAPSHOT


from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  howardlewisship.com (http://howardlewisship.com/repository/)








- Original Message 
From: Ulrich Stärk <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Wednesday, January 16, 2008 8:34:11 AM
Subject: Re: tapestry-spring


It's not broken it's just not generating directory listings.

Uli

HongDa Tang schrieb:

http://howardlewisship.com/repository/ seems to be broken.  Does

 anyone know of a mirror site for http://howardlewisship.com/repository/
 where I can use maven to retrieve tapestry-spring library version 1.0.0?
  Your help is appreciated.


-Hong


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









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



Re: tapestry-spring

2008-01-17 Thread Howard Lewis Ship
I'll be looking at this today, in a few hours.

On Jan 17, 2008 1:37 PM, HongDa Tang <[EMAIL PROTECTED]> wrote:
> After strictly following the instructions provided 
> http://howardlewisship.com/tapestry-javaforge/ , the maven gave the same 
> error.  This error first appeared as http://howardlewisship.com/repository/ 
> website stop generating directory listings.  You can reproduce this error by 
> remove your .m2/repository directory.  Below is the exact error msg:
>
>
> 
> [ERROR]BUILD ERROR
> 
> Failed to resolve artifact.
>
>
> GroupId: com.javaforge.tapestry
> ArtifactId: tapestry-javaforge
> Version: 1.0.0-SNAPSHOT
>
>
> Reason: Unable to download the artifact from any repository
>
>
>   com.javaforge.tapestry:tapestry-javaforge:pom:1.0.0-SNAPSHOT
>
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   howardlewisship.com (http://howardlewisship.com/repository/)
>
>
>
>
>
>
>
>
> - Original Message 
> From: Ulrich Stärk <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Wednesday, January 16, 2008 8:34:11 AM
> Subject: Re: tapestry-spring
>
>
> It's not broken it's just not generating directory listings.
>
> Uli
>
> HongDa Tang schrieb:
> > http://howardlewisship.com/repository/ seems to be broken.  Does
>  anyone know of a mirror site for http://howardlewisship.com/repository/
>  where I can use maven to retrieve tapestry-spring library version 1.0.0?
>   Your help is appreciated.
> >
> >
> > -Hong
> >
> >
> > -
> > 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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: [T5] Choosing components at runtime

2008-01-17 Thread Michael Courcy

Taken from
http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html


   Rendering Components

Instead of returning true or false, a render phase method may return a 
component. The component may have been injected via the Component 
 
annotation, or may have been passed to the as a parameter.


In any case, returning a component will queue that component to be 
rendered *before* the active component continues rendering.


The component to render may even be from a completely different page of 
the application.


Recursive rendering of components is not allowed.

This technique allows the rendering of Tapestry pages to be /highly/ 
dynamic.


Returning a component instance does *not* short circuit method 
invocation, the way returning a boolean would. It is possible that 
multiple methods may return components (this is not advised -- insanity 
may ensue).




johnowenatala a écrit :

Hi, i have a place in a page where i wanna put a component, but which
component is desided in runtime (can be from configuration or from request
parameters).
I tried to do this by putting a delegate component, but i couldn't inject in
runtime an unknowed component in compilation time.
What do you think i can do? Is this possible?
  



--
Michael Courcy
http://courcy.blogspot.com


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



Re: bidirectional dom interface

2008-01-17 Thread Thiago HP
On Jan 17, 2008 12:12 PM, DR_GLoPeL_BouCa <[EMAIL PROTECTED]> wrote:

>
> Hello people, I've the similar problem, the browser not display the
> response
> of ajax submit, I've form with submit async="true" and
> updateComponents="ognl:customerTable", when the ajax response come browser
> don't display any change, but in the fireBug bar, inspect de response and
> is
> in there, what's wrong..


Try updateComponents="customerTable", without the ognl: prefix.

Thiago


Re: [T5] Choosing components at runtime

2008-01-17 Thread johnowenatala

Thanks, but that has the same problem that using delegate: in the page class
I can't make this:

@Component
private OnePosibleComponentToPut comp1;
@Component
private OtherPosibleComponentToPut comp2;

because apparently you can only inject components that are already present
in the template, and i will have many posible components but only one
declaration for all that in the template.
If i try the last code, T5 will search for a component on the template with
id comp1 and another one with id comp2, but there will be only one
component.

Anyway, it looks like you can't use expantions there...



Chris Lewis-5 wrote:
> 
> Perhaps you could try this. In your template, have a component that 
> grabs it's id from the page like so:
> 
> 
> 
> I'm not sure if T5 allows expansions here, but you can try this and 
> maybe a prop: binding. Assuming you're able, add this in your page class:
> 
> public String getComponentId() {
> return componentId;
> }
> 
> So you have a page property componentId whose value is decided by 
> whatever logic you'll need. Lastly you'll need to declare your 
> components within your page class, using @Component annotations - of 
> course your componentId property would have to match one of these.
> 
> This all hinges on whether or not T5 will allow prop: or expansions in 
> the t:id parameter, so give it a try.
> 
> sincerely,
> chris
> 
> johnowenatala wrote:
>> Hi, i have a place in a page where i wanna put a component, but which
>> component is desided in runtime (can be from configuration or from
>> request
>> parameters).
>> I tried to do this by putting a delegate component, but i couldn't inject
>> in
>> runtime an unknowed component in compilation time.
>> What do you think i can do? Is this possible?
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Choosing-components-at-runtime-tp14933806p14934893.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]



Re: tapestry-spring

2008-01-17 Thread HongDa Tang
After strictly following the instructions provided 
http://howardlewisship.com/tapestry-javaforge/ , the maven gave the same error. 
 This error first appeared as http://howardlewisship.com/repository/ website 
stop generating directory listings.  You can reproduce this error by remove 
your .m2/repository directory.  Below is the exact error msg:



[ERROR]BUILD ERROR

Failed to resolve artifact.


GroupId: com.javaforge.tapestry
ArtifactId: tapestry-javaforge
Version: 1.0.0-SNAPSHOT


Reason: Unable to download the artifact from any repository


  com.javaforge.tapestry:tapestry-javaforge:pom:1.0.0-SNAPSHOT


from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  howardlewisship.com (http://howardlewisship.com/repository/)







- Original Message 
From: Ulrich Stärk <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Wednesday, January 16, 2008 8:34:11 AM
Subject: Re: tapestry-spring


It's not broken it's just not generating directory listings.

Uli

HongDa Tang schrieb:
> http://howardlewisship.com/repository/ seems to be broken.  Does
 anyone know of a mirror site for http://howardlewisship.com/repository/
 where I can use maven to retrieve tapestry-spring library version 1.0.0?
  Your help is appreciated.
> 
> 
> -Hong
> 
> 
> -
> 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: [T5] Choosing components at runtime

2008-01-17 Thread Chris Lewis
Perhaps you could try this. In your template, have a component that 
grabs it's id from the page like so:




I'm not sure if T5 allows expansions here, but you can try this and 
maybe a prop: binding. Assuming you're able, add this in your page class:


public String getComponentId() {
   return componentId;
}

So you have a page property componentId whose value is decided by 
whatever logic you'll need. Lastly you'll need to declare your 
components within your page class, using @Component annotations - of 
course your componentId property would have to match one of these.


This all hinges on whether or not T5 will allow prop: or expansions in 
the t:id parameter, so give it a try.


sincerely,
chris

johnowenatala wrote:

Hi, i have a place in a page where i wanna put a component, but which
component is desided in runtime (can be from configuration or from request
parameters).
I tried to do this by putting a delegate component, but i couldn't inject in
runtime an unknowed component in compilation time.
What do you think i can do? Is this possible?
  



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



[T5] Choosing components at runtime

2008-01-17 Thread johnowenatala

Hi, i have a place in a page where i wanna put a component, but which
component is desided in runtime (can be from configuration or from request
parameters).
I tried to do this by putting a delegate component, but i couldn't inject in
runtime an unknowed component in compilation time.
What do you think i can do? Is this possible?
-- 
View this message in context: 
http://www.nabble.com/-T5--Choosing-components-at-runtime-tp14933806p14933806.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]



Re: pass response

2008-01-17 Thread Ted Steen
many services only lives during the request/response cycle, so doing
things in threads is not a good idea as the objects behind the proxies
may be invalid when/while you use them.

so the solution would be not to use threads.
what are you trying to do?

2008/1/17, comett <[EMAIL PROTECTED]>:
> in my service,  public void service(IRequestCycle cycle), i pass
> "HttpServletResponse" to new Thread, in the new thread, i execute
> response.getwriter().print("xxx").. , i get the bottom error. if i not using 
> new
> thread, response print can display properly, but with thread, i cannot do 
> that.
> any idea where i did wrong?
>
>
>
> Exception in thread "Thread-34" java.lang.NullPointerException: Property
> 'response' of  tapestry.globals.RequestGlobals(org.apache.tapestry.services.RequestGlobals)> 
> is
> null.
>
>
>
> -
> 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]



T5: Reading context before persistent fields are read

2008-01-17 Thread Ted Steen
I need to hook in somewhere between where the context is available and
the persistent fields are read.
I need to read a context variable just before my
PersistentFieldStrategy tries to read from the session, as I need a
value from the context when reading from the session.

What should I inject into my PersistentFieldStrategy in order to be
able to read the context?

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



Re: @ApplicationState fields keyed by class, not instance

2008-01-17 Thread Howard Lewis Ship
Long experience has shown that these objects tend to be singletons.
It's generally things like the user's identity or account information
or shopping basket.

Earlier versions of Tapestry uses a mechanism similar to what you
have.  It was always a lot of unwanted configuration.  This
streamlined approach means no configuration: just slap
@ApplicationState on a field and you are done.

On Jan 17, 2008 9:02 AM, kwaclaw <[EMAIL PROTECTED]> wrote:
>
> I am new to Tapestry 5 (never looked at previous versions).
> Forgive my possibly naive question:
>
> It seems ApplicationState annotated fields are keyed by class, so this
> really supports
> only one instance (singleton) per class (and per scope, usually session).
>
> Would it not be useful to be able to pass a name parameter to the
> annotation,
> so that different instances of the same class/type could be stored? Like:
>
> @ApplicationState("state1")
> private MyState state1;
>
> @ApplicationState("state2")
> private MyState state2;
>
>
> Karl
> --
> View this message in context: 
> http://www.nabble.com/%40ApplicationState-fields-keyed-by-class%2C-not-instance-tp14924062p14924062.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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: Tapestry & IDEA

2008-01-17 Thread Howard Lewis Ship
On Jan 16, 2008 11:33 AM, Kevin Menard <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> It's time for me to ask about IDEA and Tapestry again.  I seem to go in
> cycles with the whole thing.
>
> Recent traffic indicates that there's now a decent number of people using
> IDEA with Tapestry.  My question is simply, how?
>
> I've been using the third party Jetty integration plugin and set my webapp
> to rebuild upon frame deactivation (a setting I seem to have to make every
> time I start up IDEA because I'm using a Maven project).  This works, but
> does a full redeploy on any change and that redeploy doesn't occur until I
> switch back to the browser window.  So, a simple template change will
> rebuild my app, all its dependencies, and redeploy to Jetty.  I'm running
> some decent metal here with a trivial sized app and it takes at least 10s
> before the app is back up.

There's a compiler option (cmd-comma, 2) to turn off redeployment,
which is what you want.

The Maven situation (losing the details of the redeploy) is a known
IDEA bug that they are working on.

>
> Moreover, I can only do this about 10 times before I either blow out the
> heap (T5) or permgen space (T4).  At that point, I have to unceremoniously
> kill the Jetty process.

Running out of heap?  That shouldn't be happen, there must be some
kind of leak I'm unaware of. I don't want to pass the buck to Jetty
yet; see if you can get things working with redeployment off.

>
> The net of it is that disabling caching in T4 gains me nothing and live
> class reloading in T5 gains me nothing.  In contrast, I still have a T4 app
> in Eclipse using JettyLauncher and I can run that without caching all day
> long.
>
> Without a doubt, I'm doing something wrong.  Would anyone else mind sharing
> their setup so I can fix mine?
>
> Thanks,
> Kevin
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: Tapestry & IDEA

2008-01-17 Thread Howard Lewis Ship
On Jan 16, 2008 12:04 PM, Michael Lake <[EMAIL PROTECTED]> wrote:
>
> For T5, in lieu of jettyLauncher you might try looking into extending
> the following class somewhere in your test sources:
>
> org.apache.tapestry.test.JettyRunner
>
> make a wrapper  around it with a class that has a static main function.
>
> there's an example of it in "tapestry-core" sources
>
> org.apache.tapestry.integration.RunJetty

I only created that so I could run the integration test suite
manually, since I could not (at the time) find a way to do so using
the Jetty Integration plugin.

>
>
> At least this is how I run T5 in IDEA..
>
> -mike
>
>
> Jesse Kuhnert wrote:
> > For tap 4:
> >
> > -) Use the latest eap  release if you use maven - they make tiny
> > improvements to that minefield with each release.
> > -) Under project settings make sure you un-check the option to build a
> > "war" file for your web facet.  (also don't create an exploded
> > directory to run it in)
> > -) Make sure your compiler settings compile ~everything~ you need to
> > the classpath.
> > -) You can configure your web facet to include all the necessary
> > resources as you need them.
> >
> > The overall thing I do is try and always run the web app from the
> > source directory structure "as is".   Almost always invoke jetty
> > directly with IDEA using a normal application run configuration.  (you
> > can have maven/ant compile tasks associated with this run as well - if
> > you need any special processing to happen)
> >
> > You should in theory be able to run the app using the same classpath
> > that the IDE uses and have Tapestry 5 (or 4 but with no fun re-load of
> > classes =( ) without ever having to rebuild the whole thing.   Makes
> > things a ~lot~ easier when you work off the same directory structure
> > that the app is hosted (in version control) from.
> >
> > On Jan 16, 2008 2:33 PM, Kevin Menard <[EMAIL PROTECTED]> wrote:
> >
> >> Hi all,
> >>
> >> It's time for me to ask about IDEA and Tapestry again.  I seem to go in
> >> cycles with the whole thing.
> >>
> >> Recent traffic indicates that there's now a decent number of people using
> >> IDEA with Tapestry.  My question is simply, how?
> >>
> >> I've been using the third party Jetty integration plugin and set my webapp
> >> to rebuild upon frame deactivation (a setting I seem to have to make every
> >> time I start up IDEA because I'm using a Maven project).  This works, but
> >> does a full redeploy on any change and that redeploy doesn't occur until I
> >> switch back to the browser window.  So, a simple template change will
> >> rebuild my app, all its dependencies, and redeploy to Jetty.  I'm running
> >> some decent metal here with a trivial sized app and it takes at least 10s
> >> before the app is back up.
> >>
> >> Moreover, I can only do this about 10 times before I either blow out the
> >> heap (T5) or permgen space (T4).  At that point, I have to unceremoniously
> >> kill the Jetty process.
> >>
> >> The net of it is that disabling caching in T4 gains me nothing and live
> >> class reloading in T5 gains me nothing.  In contrast, I still have a T4 app
> >> in Eclipse using JettyLauncher and I can run that without caching all day
> >> long.
> >>
> >> Without a doubt, I'm doing something wrong.  Would anyone else mind sharing
> >> their setup so I can fix mine?
> >>
> >> Thanks,
> >> 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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: Using a component in a subpackage

2008-01-17 Thread Michael Courcy

I found the answer myself it's explain here

http://lombok.demon.co.uk/tapestry5Demo/test/components/colorpickerdemosource

sorry

Michael Courcy a écrit :

Hi

I made a component call Personne in ${tapetry-root-package}/components 
package and it works fine


But I'd like to move my component in a subpackage of the components 
package say personne but I don't see how to call it now in my pages


 lead to this error
Unable to resolve component type 'personne/Personne' to a component 
class name


and
 ead to this error
Unable to resolve component type 'Personne'

That's maybe not possible ?
--
Michael Courcy
http://courcy.blogspot.com



--
Michael Courcy
http://courcy.blogspot.com



Re: T5: Autocomplete not working in form in block in zone

2008-01-17 Thread Daniel Jue
I am just starting with Zones, but is Zone support for forms working
at all?  I seem to recall on the nightly docs that form support is not
working yet.

On Jan 17, 2008 1:13 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
> Before entering a JIRA, wanted to hit the list.  Didn't see this in search.
>
> I put an autocomplete textfield in a form and put that in a block
> which I then inject into a zone component with an actionlink.  The
> autocomplete so configured does not complete.  Doesn't even issue the
> XHR call.
>
> Thoughts?
>
> Bill
>
> -
> 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]



T5: Autocomplete not working in form in block in zone

2008-01-17 Thread Bill Holloway
Before entering a JIRA, wanted to hit the list.  Didn't see this in search.

I put an autocomplete textfield in a form and put that in a block
which I then inject into a zone component with an actionlink.  The
autocomplete so configured does not complete.  Doesn't even issue the
XHR call.

Thoughts?

Bill

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



Re: [T4] escaping text for Javascript

2008-01-17 Thread Kalle Korhonen
On 1/17/08, Matt Brock <[EMAIL PROTECTED]> wrote:
>
> Kalle Korhonen-2 wrote:
> > I needed to escape some strings pulled from database for Javascript, and
> > it
> > turned out to be surprisingly difficult. AFAIK, none of the
> Tapestry/Tacos
> > markup writers/character translators escapes a single quote '
> Well, that's because you don't necessarily have to escape the single
> quote.
> In javascript, these two are equivalent:
> alert('something'); // single quote
> alert("something else"); // double quote


Yes, and it's often very useful to take advantage of this -
e.gonclick="clickme('something')" - but it doesn't solve the problem.
If
"something" was an arbitrary string containing quotes or other special
characters, it'd still need to be escaped / safely encoded.

Also note, it's rather dangerous to assume a simple backslash will escape
> the string--it depends on the assumption that every JS field is using a
> particular quote (single or double).  Much safer would be to use HTML
> entitites.  This has been working for me...


If you read my sample, you'd see I was using an HTML entity reference.

Kalle


@ApplicationState fields keyed by class, not instance

2008-01-17 Thread kwaclaw

I am new to Tapestry 5 (never looked at previous versions).
Forgive my possibly naive question:

It seems ApplicationState annotated fields are keyed by class, so this
really supports
only one instance (singleton) per class (and per scope, usually session).

Would it not be useful to be able to pass a name parameter to the
annotation,
so that different instances of the same class/type could be stored? Like:

@ApplicationState("state1")
private MyState state1;

@ApplicationState("state2")
private MyState state2;


Karl
-- 
View this message in context: 
http://www.nabble.com/%40ApplicationState-fields-keyed-by-class%2C-not-instance-tp14924062p14924062.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]



Re: [T4] AJAX: reender whole page or just send back the markup of the div

2008-01-17 Thread Kaspar Fischer


On 11.01.2008, at 05:02, Pai911 wrote:



Hi!
I don't think that Tapestry will render the whole page when a  
listener is in

invoked Asynchronously.


Hm, I think not: When I open the link in a new window, the whole page  
shows.
So I think the whole page is actually rendered, returned to the  
client where

the div(s) to update are extracted.

Could this be true?

Thanks,
Kaspar


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



Re: Programmatically generating DirectLinks with updateComponents

2008-01-17 Thread Kaspar Fischer

For others running into a similar problem. I've solved it as follows.

My markup contains:

 
   updateComponents="result" async="true" parameters="ognl: 
{page.parameter}">

 

At the place where I need to programmatically generate the link, I
call my page's setLinkText() method (which I added as an abstract
method) and similarly, setParameter(). Then I do

Block block = (Block)this.getContainer().getComponent("block");
block.renderForComponent(writer, cycle, this);

That worked for me.

On 24.12.2007, at 10:39, Kaspar Fischer wrote:



On 22.12.2007, at 23:30, Andreas Andreou wrote:


Hi,
what's the html template for
ResultElement ?
Can't you add the link there?


ResultElement does not have a HTML but is an AbstractComponent  
rendering
its content using the renderComponent(). The name "ResultElement"  
is a little
missleading; in reality, ResultElement's renderComponent() method  
renders
a tree-like structure and needs to emit lots of DirectLinks with  
update-

Components:


... and from the code (ResultElement's renderComponent()) I try to
render the link as follows:

 DirectLink link = (DirectLink)this.getContainer().getComponent
("link");
 String url = link.getLink(cycle).getURL();
 writer.begin("a");
 writer.appendAttribute("href", url);
 writer.print(title);
 writer.end();


In the meantime I've taken a look at DefaultLinkRenderer.java and  
see how

they output the onClick element. But this does not seem to anwser my
original question:

How can I programatically generate a DirectLink? Is the above way of
doing it (using getComponent("link"), referring to an existing  
DirectLink

component, that is) the "right" way? If so, how would I add a body to
the component?

I'd prefer to generate the link like this:

  DirectLink mylink = new DirectLink(...);
  // how to add the body of the link?

How can I do this?

Kaspar

-
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: bidirectional dom interface

2008-01-17 Thread DR_GLoPeL_BouCa

Hello people, I've the similar problem, the browser not display the response
of ajax submit, I've form with submit async="true" and
updateComponents="ognl:customerTable", when the ajax response come browser
don't display any change, but in the fireBug bar, inspect de response and is
in there, what's wrong..
Sorry mi english, Thaws. 
-- 
View this message in context: 
http://www.nabble.com/bidirectional-dom-interface-tp14881716p14921167.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]



T5: dynamically set disabled attribute

2008-01-17 Thread Eric BIANCHI

Hello List,

Using Tapestry 5, I'd like to dynamically set the disabled attribute  
of a Field depending of its id. So, on the same form, I could say :  
component1 has the disabled attribute set to true, component2 has the  
disabled attribute set to false and so on.


I tried the following on the page containing the form :

method 1 :

@Inject
private ComponentResources _componentSources;

_componentSources 
.getEmbdedComponent(myId).getComponentResources().set... nothing  
because there is only the isDisabled method available.


So I tried

method  2 :



where disabledMethod is :

if  
(_componentSources 
.getEmbdedComponent(myId).getComponentResources().isRendering())  
return true;


return false;

It works well until I submit the form, at this point, the component is  
not rendering, disabledMethod returns false (from what I have  
understood) and my field is set to null.


Any hints would be highly appreciated.

Thanks and best regards,

Eric

--
Eric BIANCHI
http://www.rodanotech.ch



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



Re: [T4] escaping text for Javascript

2008-01-17 Thread Matt Brock


Kalle Korhonen-2 wrote:
> 
> I needed to escape some strings pulled from database for Javascript, and
> it
> turned out to be surprisingly difficult. AFAIK, none of the Tapestry/Tacos
> markup writers/character translators escapes a single quote '
Well, that's because you don't necessarily have to escape the single quote. 
In javascript, these two are equivalent:

alert('something'); // single quote
alert("something else"); // double quote
Also note, it's rather dangerous to assume a simple backslash will escape
the string--it depends on the assumption that every JS field is using a
particular quote (single or double).  Much safer would be to use HTML
entitites.  This has been working for me...

public String safeJsStr(String unsafejs) {
   return unsafejs == null ? "" : unsafejs.replace("\\",
"\\\").replace("'", "\\'").replace("\"",
""").replace("\n", "\\n").replace("\r","");
}

-- 
View this message in context: 
http://www.nabble.com/-T4--escaping-text-for-Javascript-tp14826733p14919079.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


Re: Tapestry & IDEA

2008-01-17 Thread Matt Brock


Alejandro Scandroli wrote:
> 
> Idea needs you to explicitly hit CRTL-SHIFT-F9 (to compile just one
> class) or CTRL-F9 (make project)

You can also use the ANT BUILD dialog window pane.  You can even assign
shortcuts to particular build definitions.  I usually have at least three in
any build: a "clean" execution to clear out any cached classes and tomcat
work directories, a "copy-content" that just copies non-recompileables
(component definitions, html files, etc.) and a "build".  Each one is a
different hotkey.  You can also select multiple execution points and click
the PLAY button, and it will execute each in order.

If you can't already tell, I'm rabid about IntelliJ.
-- 
View this message in context: 
http://www.nabble.com/Tapestry---IDEA-tp14892102p14918685.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]



t5: getting parameter from request

2008-01-17 Thread Angelo Chen

Hi,
in a dispatcher,

 public boolean dispatch(Request request, Response response) 

if I pass url :http://localhost:8080/myapp/profile/262 in the browser,
request.getPath() returns '/profile', I'd like to get 262 as well, anyway to
retrieve this?

Thanks,

A.C.

-- 
View this message in context: 
http://www.nabble.com/t5%3A-getting-parameter-from-request-tp14916048p14916048.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]



Re: T5: Some problem with prob binding

2008-01-17 Thread Foror
I have solved a problem. In Team changed setId(String id) to
setId(Object id) when ok.

F> In the project there is a following:

F> public interface ISimpDesc {
F>public  getId();
F> }

F> public class Team implements ISimpDesc {

F> // hibernate annotations
F> @DocumentId
F> @Id
F> @MinLength(min=2)
F> @MaxLength(max=50)
F> @Pattern(regex="[\\w-]+")
F>private String id;

F>public String getId() {
F>   return id;
F>}
F>public String setId(String id) {
F>   if (id == null) {
F>  return;
F>   }

F>   this.id = id;
F>}
F> }

F> In tml:

F> :  class="comment">(${message:default.lat-comment})
F>  translate="translate:string" disabled="disabledId"
F> label="message:content.id"/>

F> In Windows XP on Tomcat 5.5 and Jety 6 and JDK 1.5.0_08 there were problems 
with
F> transformation of type of the "id" to String (from Object to String),
F> I have added this "translate="translate:string"" for fix problem.

F> In Debian 4.0 on Tomcat 5.5 and JDK 1.5.0_10 there were problems
F> "Expression team.id for class
F> ru.getdone.view.pages.team.form.FormFor
F> is read-only." after submit form.


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



Re: T5: using TapestryTestCase

2008-01-17 Thread Igor Drobiazko
Mock the session and pass through to the constructor:

Session session = newMock(Session.class);
Service service = new Service(session);

On Jan 17, 2008 8:14 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Is there any tutorial on using TapestryTestCase ? say, I'd like to test a
> service which has Hibernate's Session injected thru constructor, any idea?
>
> Thanks,
> A.C.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-using-TapestryTestCase-tp14913469p14913469.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]
>
>


-- 
Best regards,

Igor Drobiazko


pass response

2008-01-17 Thread comett
in my service,  public void service(IRequestCycle cycle), i pass
"HttpServletResponse" to new Thread, in the new thread, i execute 
response.getwriter().print("xxx").. , i get the bottom error. if i not using new
thread, response print can display properly, but with thread, i cannot do that.
any idea where i did wrong?
 


Exception in thread "Thread-34" java.lang.NullPointerException: Property
'response' of  is
null.



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



Re: [T4.1.3] Problems with async DireckLink

2008-01-17 Thread Ulrich Stärk
This looks correct to me. I even tried your code with Tapestry 4.1.3 and
it works correctly both in Firefox and IE 6.0. Are you really sure, that
the whole page is reloading? How do you know?

Uli

Am Do, 17.01.2008, 08:13, schrieb Pai911:
>
> So, you read this in mail box
> Then I think I should repost this
>
> Here is the code
>
> 
>
>   
>   
>  parameters="trip" async="true"  updateComponents="tabs">Trip
>   
>
>   
>  listener="listener:switchTab"
> parameters="photo" async="true" updateComponents="tabs">Photo
>   
>
>   
>  parameters="favorite" async="true" updateComponents="tabs">Favorite
>   
> 
>
> 
>
> 
>
>   
>   trip
>   
>
>   
>  photo
>   
>
>   
>  favorite
>   
>
> 
>
>
> Ulrich Stärk wrote:
>>
>> I'm giving up, I still can't see it. Use a proper mail client.
>>
>> Pai911 schrieb:
>>> Sorry! The forum filter the definition
>>>
>>> Now I escape the tag myself, and it appears.
>>>
>>> Please see the original post!
>>>
>>> I have to tell you that in my IE, this happens even when async="true"
>>> is
>>> set
>>>
>>> Thank you!
>>>
>>>
>>> Ulrich Stärk wrote:
 I still can't see the DirectLink declaration you are using... Where is
 it?

 Uli
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/-T4.1.3--Problems-with-async-DireckLink-tp14880659p14913463.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]



T5: 5.0.8 snapshot java.lang.ClassNotFoundException for array

2008-01-17 Thread Foror
In 5.0.7 snapshot properties with type "String[]" normally worked, after
update last revision problems have begun:

java.lang.ClassNotFoundException
java/lang/String[]

Stack trace
* java.lang.Class.forName0(Native Method)
* java.lang.Class.forName(Class.java:247)
* 
org.apache.tapestry.internal.services.ComponentClassCacheImpl.forName(ComponentClassCacheImpl.java:50)
* 
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:235)
* 
ru.getdone.view.components.OrdersList._$read_parameter_urlParams(OrdersList.java)

I have made small testing:

public static void main(String[] args) throws ClassNotFoundException {
String[] test = new String[] {};
List test2 = new ArrayList();

Class.forName(test.getClass().getCanonicalName()); 
//java.lang.ClassNotFoundException
Class.forName(test2.getClass().getCanonicalName()); //ok

Class.forName(test.getClass().getName()); //ok
}

Probably in the tapestry it is necessary to use "getClass().getName()"
for Array for the decision of a problem.


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