Re: newbie: beaneditForm with drop down list fed by a List

2014-11-06 Thread Thiago H de Paula Figueiredo
On Thu, 06 Nov 2014 09:03:38 -0200, Ivano Luberti   
wrote:



Thanks Thiago, you answer quickly as usually and always providing the
fishing rod not the fish :-)


:)


Yes I saw that page, of course but to me, for a newbie it lacks
indications on how to get together the select model with the bean model.


Actually, you don't associate a SelectModel with BeanModel. You do this in  
your edition block. There, you'll have a Select component. Pass it the  
SelectModel you want.



In real world scenarios populating a drop down list from an enum is far
more rare than populating from a Map or a List dynamically generated
from a data source (DB or web service as in my case).
So for a newbie to have a BeanEditForm ready to use with this respect
could be quite important. BeanEditForm in fact is documented in the
Getting Started guide since is correctly deemed as a Basic funcionality.


Tapestry can figure out the SelectModel for an enum by itself, but, in  
other cases, it doesn't what data it should provide. You are the one who  
does. That's why this isn't built-in in BeanEditor (which is used by  
BeanEditForm). That's why you need to provide your own edition block: so  
you tell Tapestry how to edit the field, including any data needed for  
that. Again, Tapestry is magic, but not psychic.



Another thing is not mentioned in the BeanEditForm guide is the coercion
of Map to SelectModel: I guess  this means that if my data provider give
me Maps I can override the property editor and I'm done.


This should be in Select's documentation, not BeanEditForm's, because  
BeanEditForm doesn't have any notion of SelectModel. As we say here in  
Brazil, one thing is one thing, another thing is another thing. :)



One more observation on the guide:  BeanModelSource.create is deprecated
:-) : the guide is outdated.


Just this part is outdated. Good catch.


However even turning to BeanModelSource.createEditModel doesn't work for
me because my bean to be created needs the IP address of the client.  I
will give a try later when I will implement other forms...


What does one thing (BeanModelSource) have with the other (instatiating  
the bean)? Use onPrepare() to set up the object you need to be edited so  
BeanEditForm/BeanEditor doesn't need to instatiate your object. This  
method will be called *before* BeanEditForm/BeanEditor does anything.


public void onPrepare() {
yourEditedObject = ...;
// do whatever you need
}


I fear I will have to use a "normal" Form component.


No, you don't. You said you're a newbie. You just need to learn a bit  
more. ;)


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

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



Re: newbie: beaneditForm with drop down list fed by a List

2014-11-06 Thread Ivano Luberti
Thanks Thiago, you answer quickly as usually and always providing the
fishing rod not the fish :-)

Il 05/11/2014 18:21, Thiago H de Paula Figueiredo ha scritto:
> On Wed, 05 Nov 2014 07:23:03 -0200, Ivano Luberti
>  wrote:
>
>> Hi, I'm trying to figure out how to add a PropertyEditBlock to have drop
>> down lists fed by a List type.
>
> What do you mean by "a List type"? java.util.List?
>

Yes I hoped it was clear from the subect

>> I have found this example:
>>
>> http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock
>>
>> but I see links to code are not working anymore: can someone tell me if
>> that is the right approach before I try it out?
>
> Thank heavens the link to GenericSelectModel is broken, as it was a
> really bad idea.
>
> I prefer http://tapestry.apache.org/beaneditform-guide.html, which is
> a better description than the page you mentioned above.
>

Yes I saw that page, of course but to me, for a newbie it lacks
indications on how to get together the select model with the bean model.
In real world scenarios populating a drop down list from an enum is far
more rare than populating from a Map or a List dynamically generated
from a data source (DB or web service as in my case).

So for a newbie to have a BeanEditForm ready to use with this respect
could be quite important. BeanEditForm in fact is documented in the
Getting Started guide since is correctly deemed as a Basic funcionality.

Another thing is not mentioned in the BeanEditForm guide is the coercion
of Map to SelectModel: I guess  this means that if my data provider give
me Maps I can override the property editor and I'm done.

One more observation on the guide:  BeanModelSource.create is deprecated
:-) : the guide is outdated.

However even turning to BeanModelSource.createEditModel doesn't work for
me because my bean to be created needs the IP address of the client.  I
will give a try later when I will implement other forms...

I fear I will have to use a "normal" Form component.



> http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock
> has something I don't like at all: creating a class (DropDownList)
> just for being used in BeanModel-based components (BeanEditForm,
> BeanEditor, Grid, BeanDisplay), not being the type of the field in
> your domain or entity class, which would be String, int, an enum, some
> other custom class, etc. Instead, I prefer to keep the field in its
> right type, which is the type of the options you want to provide.
>
> The implementation varies a bit depending on what the type of the
> selection is. If it's an enum or some custom class, you can follow the
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock
> example replacing DropDownList by your class and writing an
> appropriate ValueEncoder for it. You don't need to subclass
> AbstractModel yourself: just use the SelectModelFactory service
> methods instead.


I see your point but I'm not sure I'm totally with you on this.
Of course you are more experienced than me in what the reasons are
beyond tpaestry choices, so I feel quite uncomfortable arguing your
arguments but I try it anyway. I hope you will keep on being patient
answering even if I totally miss the point.

In real world application we will get object from the DB to populate the
drop down list and when an item is selected we will have always an id in
our page class to make it aware what item has been selected .
So there will be always the need to extract from the object a mnemonic
identifier to be showed in the selection for uman reading and an
identifier to indicate the selection to the page.
I believe this is why you need a ValueEncoder, right?



>
>
> If it's something like, for example, an int field with values from 0
> to 10, the only difference would be creating an annotation (@Rating,
> for example), then implementing a DataTypeAnalyzer which retuns "rate"
> when the field has @Rating and contribute your newly-written
> RatingDataTypeAnalyzer to the DataTypeAnalyzer service. The rest stays
> the same.
>
>> It seems to me that using List for drop down list is quite mandatory to
>> manage forms in real world applications.
>
> Yeah, but the way you describe this is too vague to have a single good
> implementation for all cases.
>
>> BTW: if it is the right approach why not moving that example to official
>> documentation?
>
> Because the right approach for adding BeanModel edition and viewing
> blocks is already at
> http://tapestry.apache.org/beaneditform-guide.html, Adding New
> Property Editors section. ;)
>

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' coo

Re: newbie: beaneditForm with drop down list fed by a List

2014-11-05 Thread Thiago H de Paula Figueiredo
On Wed, 05 Nov 2014 07:23:03 -0200, Ivano Luberti   
wrote:



Hi, I'm trying to figure out how to add a PropertyEditBlock to have drop
down lists fed by a List type.


What do you mean by "a List type"? java.util.List?


I have found this example:

http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock

but I see links to code are not working anymore: can someone tell me if
that is the right approach before I try it out?


Thank heavens the link to GenericSelectModel is broken, as it was a really  
bad idea.


I prefer http://tapestry.apache.org/beaneditform-guide.html, which is a  
better description than the page you mentioned above.


http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock has  
something I don't like at all: creating a class (DropDownList) just for  
being used in BeanModel-based components (BeanEditForm, BeanEditor, Grid,  
BeanDisplay), not being the type of the field in your domain or entity  
class, which would be String, int, an enum, some other custom class, etc.  
Instead, I prefer to keep the field in its right type, which is the type  
of the options you want to provide.


The implementation varies a bit depending on what the type of the  
selection is. If it's an enum or some custom class, you can follow the  
http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock  
example replacing DropDownList by your class and writing an appropriate  
ValueEncoder for it. You don't need to subclass AbstractModel yourself:  
just use the SelectModelFactory service methods instead.


If it's something like, for example, an int field with values from 0 to  
10, the only difference would be creating an annotation (@Rating, for  
example), then implementing a DataTypeAnalyzer which retuns "rate" when  
the field has @Rating and contribute your newly-written  
RatingDataTypeAnalyzer to the DataTypeAnalyzer service. The rest stays the  
same.



It seems to me that using List for drop down list is quite mandatory to
manage forms in real world applications.


Yeah, but the way you describe this is too vague to have a single good  
implementation for all cases.



BTW: if it is the right approach why not moving that example to official
documentation?


Because the right approach for adding BeanModel edition and viewing blocks  
is already at http://tapestry.apache.org/beaneditform-guide.html, Adding  
New Property Editors section. ;)


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

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



newbie: beaneditForm with drop down list fed by a List

2014-11-05 Thread Ivano Luberti
Hi, I'm trying to figure out how to add a PropertyEditBlock to have drop
down lists fed by a List type.
I have found this example:

http://wiki.apache.org/tapestry/Tapestry5HowToCreateAPropertyEditBlock

but I see links to code are not working anymore: can someone tell me if
that is the right approach before I try it out?

BTW: if it is the right approach why not moving that example to official
documentation?
It seems to me that using List for drop down list is quite mandatory to
manage forms in real world applications.

If it is NOT the right approach can someone link me to a proper one?

Thanks in advance for your help


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



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



Re: newbie question on tapestry-hiberate

2012-11-30 Thread dreamer1212
Thanks Taha and Thiago, sounds like I should embrace tapestry-hibernate for
handy projects.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/newbie-question-on-tapestry-hiberate-tp5718412p5718436.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: newbie question on tapestry-hiberate

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 09:59:47 -0200, Taha Siddiqi  
 wrote:



In my view

PROS :
1. Simple:- add dependencies, write a hibernate.cfg.xml and put it in  
your resources directory and you are done.
2. Done tapestry style, you can inject Session into pages, components(I  
know bad practise) or services.

3. Minimum configuration

CONS:
1. Tapestry can handle only one SessionFactory.
2. Declarative transaction support is minimal, just @CommitAfter. But  
you can always extend it :)


Do you really need more complex transaction handling? @CommitAfter is the  
same as the 'required' option in Spring's @Transactional. If you don't, go  
with tapestry-hibernate, as it's already integrated and easier to use (not  
to mention that the IoC part of Tapestry is better than Spring's).  
Otherwise, go for spring-tx.


--
Thiago H. de Paula Figueiredo

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



Re: newbie question on tapestry-hiberate

2012-11-30 Thread Taha Siddiqi
In my view 

PROS :
1. Simple:- add dependencies, write a hibernate.cfg.xml and put it in your 
resources directory and you are done. 
2. Done tapestry style, you can inject Session into pages, components(I know 
bad practise) or services.
3. Minimum configuration

CONS:
1. Tapestry can handle only one SessionFactory.
2. Declarative transaction support is minimal, just @CommitAfter. But you can 
always extend it :)

 regards
Taha


On Nov 30, 2012, at 4:07 PM, dreamer1212 wrote:

> Hi lists, Sorry if this question has been asked or self-explain for tapestry
> veterans.
> What're the pros and cons of using tapestry-hibernate, I mean what will I
> miss if I let spring handle all presistence for me, I don't want to lose the
> ability to make my transaction declarative...
> 
> Thanks 
> Douglas
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/newbie-question-on-tapestry-hiberate-tp5718412.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



newbie question on tapestry-hiberate

2012-11-30 Thread dreamer1212
Hi lists, Sorry if this question has been asked or self-explain for tapestry
veterans.
What're the pros and cons of using tapestry-hibernate, I mean what will I
miss if I let spring handle all presistence for me, I don't want to lose the
ability to make my transaction declarative...

Thanks 
Douglas



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/newbie-question-on-tapestry-hiberate-tp5718412.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Robert Zeigler
So it looks like the value is being put into the url, as expected for the 
context of an action link.

Is your onAction method receiving that context?

onActionFromSelect(CayenneDataObject object) {...}
   

If you have your original method:

onActionFromSelect() {...}

then it's not going to do what you expect; either way, the @Parameter object is 
going to be null (unless you explicitly set it in your onAction method). But 
the "right way", you will recover the appropriate object from the method 
parameter.

Robert

On Dec 9, 2011, at 12/99:01 AM , Hugi Thordarson wrote:

>>> (just ignore the commented out code, it's what I'm using to work around the 
>>> problem until I find a solution)
>> 
>> What's the rendered HTML?
> 
> Well, if I disable the ValueEncoder I made for CayenneDataObjects, it will 
> look like this:
> 
> http://localhost:8080/tap/userlist.objectlink2.select/$007b$003cObjectId:User$002c$0020id$003d2$003e$003b$0020committed$003b$0020$005bid$003d$003e2$003b$0020creationDate$003d$003eFri$0020Dec$002002$002015:37:45$0020GMT$00202011$003b$0020registrationOffers$003d$003e$003f$003b$0020address$003d$003eGla$00f0heimar$002010$003b$0020contactName$003d$003eGummi$003b$0020userDocuments$003d$003e$003f$003b$0020registrations$003d$003e$003f$003b$0020visitorID$003d$003e1$003b$0020visitor$003d$003e$003f$003b$0020city$003d$003eReykjav$00edk$003b$0020ipAddress$003d$003e$005d$007d
> 
> But if the ValueEncoder is enabled, it looks like this:
> 
> http://localhost:8080/tap/userlist.objectlink2.select/1503831936-User-2
> 
> 
>> I think the commented-out code is better because it avoids one request (the 
>> redirection).
> 
> Ah, I see. I like the other style better since it allows me to work with the 
> actual page class (passing in variables etc).
> It seems that when I use the LinkSource-method of generating page URLs, 
> variables I set in a page one time "leak" over to the next time the page is 
> opened (for inspecting a different object). I'm still not entirely sure what 
> how the lifecycle of page instances works, so I guess I'm going back to the 
> documentation on that one.
> 
> Thanks you for all your help.
> 
> Cheers,
> - hugi
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Thiago H. de Paula Figueiredo
On Fri, 09 Dec 2011 13:01:10 -0200, Hugi Thordarson   
wrote:



What's the rendered HTML?


Well, if I disable the ValueEncoder I made for CayenneDataObjects, it  
will look like this:


http://localhost:8080/tap/userlist.objectlink2.select/$007b$003cObjectId:User$002c$0020id$003d2$003e$003b$0020committed$003b$0020$005bid$003d$003e2$003b$0020creationDate$003d$003eFri$0020Dec$002002$002015:37:45$0020GMT$00202011$003b$0020registrationOffers$003d$003e$003f$003b$0020address$003d$003eGla$00f0heimar$002010$003b$0020contactName$003d$003eGummi$003b$0020userDocuments$003d$003e$003f$003b$0020registrations$003d$003e$003f$003b$0020visitorID$003d$003e1$003b$0020visitor$003d$003e$003f$003b$0020city$003d$003eReykjav$00edk$003b$0020ipAddress$003d$003e$005d$007d

But if the ValueEncoder is enabled, it looks like this:

http://localhost:8080/tap/userlist.objectlink2.select/1503831936-User-2


The CayenneDataObject => String mapping seems to work. Have you checked if  
the String => CayenneDataObject works?


Ah, I see. I like the other style better since it allows me to work with  
the actual page class (passing in variables etc).


Yep, this has this advantage. :) But, if you're just passing data, I still  
prefer the page activation context. Of course, it depends on each specific  
case.


It seems that when I use the LinkSource-method of generating page URLs,  
variables I set in a page one time "leak" over to the next time the page  
is opened (for inspecting a different object).


This looks like a bug in your code. Please post the source of the page  
that displays or edits the object. The links generated by  
PageRenderLinkSource (which is used by PageLink) don't do anything related  
to page lifecycle.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Hugi Thordarson
>> (just ignore the commented out code, it's what I'm using to work around the 
>> problem until I find a solution)
> 
> What's the rendered HTML?

Well, if I disable the ValueEncoder I made for CayenneDataObjects, it will look 
like this:

http://localhost:8080/tap/userlist.objectlink2.select/$007b$003cObjectId:User$002c$0020id$003d2$003e$003b$0020committed$003b$0020$005bid$003d$003e2$003b$0020creationDate$003d$003eFri$0020Dec$002002$002015:37:45$0020GMT$00202011$003b$0020registrationOffers$003d$003e$003f$003b$0020address$003d$003eGla$00f0heimar$002010$003b$0020contactName$003d$003eGummi$003b$0020userDocuments$003d$003e$003f$003b$0020registrations$003d$003e$003f$003b$0020visitorID$003d$003e1$003b$0020visitor$003d$003e$003f$003b$0020city$003d$003eReykjav$00edk$003b$0020ipAddress$003d$003e$005d$007d

But if the ValueEncoder is enabled, it looks like this:

http://localhost:8080/tap/userlist.objectlink2.select/1503831936-User-2


> I think the commented-out code is better because it avoids one request (the 
> redirection).

Ah, I see. I like the other style better since it allows me to work with the 
actual page class (passing in variables etc).
It seems that when I use the LinkSource-method of generating page URLs, 
variables I set in a page one time "leak" over to the next time the page is 
opened (for inspecting a different object). I'm still not entirely sure what 
how the lifecycle of page instances works, so I guess I'm going back to the 
documentation on that one.

Thanks you for all your help.

Cheers,
- hugi


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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Hugi Thordarson
Hmm, interesting. Doesn't seem to work even if I send the object as a context 
parameter, the object is still null in the action method :-/

- hugi




On 9.12.2011, at 12:50, Thiago H. de Paula Figueiredo wrote:

> On Fri, 09 Dec 2011 10:38:07 -0200, Hugi Thordarson  wrote:
> 
>> In the component "ObjectLink", I can print the value of currentObject.name. 
>> However, if I use the "object" binding in an action method 
>> (onActionFromSelect) the "object" parameter is always null?
> 
> Because onActionFromSelect() is invoked in another request, so the value of 
> currentObject is lost unless you persist it in some way. In Tapestry 4 your 
> code would work, but T4 had something called the rewind phase that caused 
> worse problems, so T5 doesn't have rewind (yeah!). The recommended solution 
> here is to add context="currentObject" to the ActionLink inside your 
> component and make onActionFromSelect() to receive the context. Something 
> like this:
> 
> 
> 
> Object onActionFromSelect(CayenneDataObject object) {
>   Class pageClass = CRUDUtil.detailPageClass( object.getClass() );
>   DetailPage t = 
> (DetailPage)componentSource.getPage( pageClass );
>   t.setSelectedObject( object );
>   return t;
> }
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br


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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Hugi Thordarson
OK, now it _almost_ works Still, interestingly enough though, it doesn't seem 
to work in a loop. Consider the following code:


${currentObject.name}


In the component "ObjectLink", I can print the value of currentObject.name. 
However, if I use the "object" binding in an action method (onActionFromSelect) 
the "object" parameter is always null?

Code for ObjectLink here:

https://gist.github.com/1451368

Any ideas?

Cheers,
- hugi



On 9.12.2011, at 12:02, Hugi Thordarson wrote:

> Oh dear… After reading the sentence "Tapestry parameters can be of any type 
> without any conversion" I performed a little sanity check on my code—turns 
> out the example code I copied form somewhere had "defaultPrefix = 
> BindingConstants.LITERAL" specified on the binding. Silly, silly…
> 
> Thanks!
> - hugi
> 
> 
> 
> On 9.12.2011, at 11:54, Thiago H. de Paula Figueiredo wrote:
> 
>> On Fri, 09 Dec 2011 09:08:13 -0200, Hugi Thordarson  wrote:
>> 
>>> Hi again.
>> 
>> Hi!
>> 
>>> Another noob question: I've been trying to google this one for quite some 
>>> time, but I still can't figure out how I can pass a CayenneDataObject to a 
>>> component using a binding.
>> 
>> Just do it. :)
>> 
>>> I have registered a Type Coercer from String to CayenneDataObject, and it's 
>>> getting invoked when I read the binding, but if I do this…
>>> 
>>> …the coerce( String ) method of the Type Coercer recieves the string 
>>> "someCayenneDataObject" as parameter?
>> 
>> Tapestry parameters can be of any type without any conversion to String 
>> needed. What's the type of the input filed in your custom component? What's 
>> its binding? Could you post the component source (or at least the component 
>> declaration)?
>> 
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
>> instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Hugi Thordarson
Oh dear… After reading the sentence "Tapestry parameters can be of any type 
without any conversion" I performed a little sanity check on my code—turns out 
the example code I copied form somewhere had "defaultPrefix = 
BindingConstants.LITERAL" specified on the binding. Silly, silly…

Thanks!
- hugi



On 9.12.2011, at 11:54, Thiago H. de Paula Figueiredo wrote:

> On Fri, 09 Dec 2011 09:08:13 -0200, Hugi Thordarson  wrote:
> 
>> Hi again.
> 
> Hi!
> 
>> Another noob question: I've been trying to google this one for quite some 
>> time, but I still can't figure out how I can pass a CayenneDataObject to a 
>> component using a binding.
> 
> Just do it. :)
> 
>> I have registered a Type Coercer from String to CayenneDataObject, and it's 
>> getting invoked when I read the binding, but if I do this…
>> 
>> …the coerce( String ) method of the Type Coercer recieves the string 
>> "someCayenneDataObject" as parameter?
> 
> Tapestry parameters can be of any type without any conversion to String 
> needed. What's the type of the input filed in your custom component? What's 
> its binding? Could you post the component source (or at least the component 
> declaration)?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br


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



Re: Another newbie question: Type coercions not working for me

2011-12-09 Thread Thiago H. de Paula Figueiredo
On Fri, 09 Dec 2011 09:08:13 -0200, Hugi Thordarson   
wrote:



Hi again.


Hi!

Another noob question: I've been trying to google this one for quite  
some time, but I still can't figure out how I can pass a  
CayenneDataObject to a component using a binding.


Just do it. :)

I have registered a Type Coercer from String to CayenneDataObject, and  
it's getting invoked when I read the binding, but if I do this…


…the coerce( String ) method of the Type Coercer recieves the string  
"someCayenneDataObject" as parameter?


Tapestry parameters can be of any type without any conversion to String  
needed. What's the type of the input filed in your custom component?  
What's its binding? Could you post the component source (or at least the  
component declaration)?


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Another newbie question: Type coercions not working for me

2011-12-09 Thread Hugi Thordarson
Hi again.

Another noob question: I've been trying to google this one for quite some time, 
but I still can't figure out how I can pass a CayenneDataObject to a component 
using a binding.

I have registered a Type Coercer from String to CayenneDataObject, and it's 
getting invoked when I read the binding, but if I do this…



…the coerce( String ) method of the Type Coercer recieves the string 
"someCayenneDataObject" as parameter?

Help!

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



Re: [newbie] I cannot export my tapestry app

2011-03-21 Thread Nikola Milikic
Hi,

Thank Nikola, it works .. I use "mvn package" command on my suse terminal
> n it makes war file on target project :D


That's great!

because on my eclipse it just looks ->Run As->Run On Server | Java Applet |
> bla bla ..
> there's no Maven package menu.. indeed I ever install maven plugin for
> eclipse but I have failed installation.
> For information I use eclipse Helios 3.6.1..and until now I cannt install
> it
> :) where is the match repo for  maven plugin to my eclipse ?


This should be a matter of some other mailing list, so sorry to others.

Nevertheless, I'll be glad to help you. Obviously, you don't have maven
plugin. I use m2eclipse <http://m2eclipse.sonatype.org/> and you can get it
from its update site http://m2eclipse.sonatype.org/sites/m2e

Best,
Nikola


On Sun, Mar 20, 2011 at 1:44 AM, ronizedsynch  wrote:

> Thank Nikola, it works .. I use "mvn package" command on my suse terminal n
> it makes war file on target project :D
>
> but I dont can do this
>
> Nikola Milikic wrote:
> >
> > Just right click on the project -> Run As -> Maven package.
> >
>
> because on my eclipse it just looks ->Run As->Run On Server | Java Applet |
> bla bla ..
> there's no Maven package menu.. indeed I ever install maven plugin for
> eclipse but I have failed installation.
> For information I use eclipse Helios 3.6.1..and until now I cannt install
> it
> :) where is the match repo for  maven plugin to my eclipse ?
>
> Ok.. thank all for your attentions :D
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4095695.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [newbie] I cannot export my tapestry app

2011-03-19 Thread ronizedsynch
Thank Nikola, it works .. I use "mvn package" command on my suse terminal n
it makes war file on target project :D

but I dont can do this

Nikola Milikic wrote:
> 
> Just right click on the project -> Run As -> Maven package.
> 

because on my eclipse it just looks ->Run As->Run On Server | Java Applet |
bla bla ..
there's no Maven package menu.. indeed I ever install maven plugin for
eclipse but I have failed installation.
For information I use eclipse Helios 3.6.1..and until now I cannt install it
:) where is the match repo for  maven plugin to my eclipse ?

Ok.. thank all for your attentions :D



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4095695.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: [newbie] I cannot export my tapestry app

2011-03-19 Thread Nikola Milikic
Hi,

As Vangel already mentioned, you can initiate maven packaging from within
Eclipse. Just right click on the project -> Run As -> Maven package. After
that, your war file will be located in the 'target' folder, just under the
app root.

If you have Maven set up to be used from within the terminal (from Linux
this is trivial, from Win couple of steps to
follow<http://maven.apache.org/download.html>),
once navigated to the project's root, initiate 'mvn package' command. It is
essentially what the Eclipse plugin does, it internally calls this command.

Best,
Nikola

On Sat, Mar 19, 2011 at 1:12 PM, ronizedsynch  wrote:

> thank very muach for u all, Taha & Vangel..
>
> @Taha : I can do it to my eclipse.. I dont know its cause. :D
> @Vangel : yes I am using maven n pom.xml for dependencies my project..
> Sorry
> I very newbie using eclipse n maven can u explaine step by step how to get
> war using maven.. I found tutorial to export war but it using tomcat on
> eclipse however I using jetty plugin for eclipse..I afraid both make a
> trouble :D ..
>
> Thank :D
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4060573.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [newbie] I cannot export my tapestry app

2011-03-19 Thread ronizedsynch
thank very muach for u all, Taha & Vangel..

@Taha : I can do it to my eclipse.. I dont know its cause. :D
@Vangel : yes I am using maven n pom.xml for dependencies my project.. Sorry
I very newbie using eclipse n maven can u explaine step by step how to get
war using maven.. I found tutorial to export war but it using tomcat on
eclipse however I using jetty plugin for eclipse..I afraid both make a
trouble :D ..

Thank :D

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4060573.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: [newbie] I cannot export my tapestry app

2011-03-19 Thread Vangel V. Ajanovski

On 03/19/2011 07:06 AM, ronizedsynch wrote:

How to export tapestry application to war using eclipse ?
If you have setup Maven inside Eclipse you can do "package" (the same 
way you do "jetty:run") and you will get a WAR inside the "target" folder.
Maven has lot of options how to do this and that, most are left at 
default, so if you need something more specific you will have to set it 
up in the "pom.xml".




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [newbie] I cannot export my tapestry app

2011-03-19 Thread Taha Hafeez
Hi

File -> Export -> Web -> war

regards
Taha


On Sat, Mar 19, 2011 at 11:36 AM, ronizedsynch wrote:

> good afternoon all :D
>
> How to export tapestry application to war using eclipse ?
>
> I tried to learn com.example.tutorial1 n make some page to it but I
> understand how to export this project to war :D
>
> I use jetty plugin for eclipse to run it.
>
> thank to u all that response this newbie question :D
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4022063.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


[newbie] I cannot export my tapestry app

2011-03-18 Thread ronizedsynch
good afternoon all :D

How to export tapestry application to war using eclipse ?

I tried to learn com.example.tutorial1 n make some page to it but I
understand how to export this project to war :D

I use jetty plugin for eclipse to run it.

thank to u all that response this newbie question :D

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/newbie-I-cannot-export-my-tapestry-app-tp4022063p4022063.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5.2.0-SNAPHOT: newbie exceptions submitting form with BeanEditor

2010-03-19 Thread Joe Klecko

Thanks for all the responses.  Switching to T5.1.5 fixed the problem.

thanks,
Joe



buckofive wrote:
> 
> Hi Joe/Howard,
> 
> I have ran into this same problem a while back and oddly enough (just the
> other day) I finally got around to filing a JIRA
> (https://issues.apache.org/jira/browse/TAP5-1051).  The only help/clue I
> can give to the T5 team is that the BeanEditor was working at one time in
> T5.2.0-SNAPSHOT and I'm not sure when the problem began but it was several
> weeks ago (Howard, I'm pretty sure it started before the new
> ComponentClassTransformWorker code(which is a great improvement BTW) ).   
> My resolution unfortunately, was to switch the version of T5 I was using
> to T5.1.x.  I Hope this helps.
> 
> Cheers,
> B
> 
> 
> 
> Howard Lewis Ship wrote:
>> 
>> It looks like what you have should work. This may represent a
>> regression, based on the retooling of the
>> ComponentClassTransformWorker code; it looks like the BeanEditForm (or
>> BeanEditor) is possibly holding onto its instance of BeanModel from
>> one request to the next, rather than starting from scratch on each
>> request.  I haven't seen this myself, and it seems like something that
>> would be tested by the Tapestry integration test suite ... but still,
>> this seems odd.
>> 
>> On Thu, Mar 18, 2010 at 9:23 AM, Joe Klecko 
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to use the BeanEditor in a t:form which seems to work fine
>>> until
>>> I use the "add" parameter.  I've read through the documentation and I'm
>>> just
>>> not sure what i'm doing wrong.  The form renders fine but no matter what
>>> I
>>> do when I submit the form it always throws this exception: "Bean editor
>>> model for User already contains a property model for property
>>> 'confirmPassword'."
>>>
>>> Thank you for any help or suggestions in advance!
>>>
>>>
>>> Here is my simple test case:
>>>
>>> Test.tml:
>>> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>> 
>>>        
>>>                
>>>                        
>>>                                
>>>                                >> />
>>>                        
>>>                
>>>                
>>>        
>>> 
>>> 
>>>
>>> Test.java:
>>> public class Test {
>>>       �...@property private User user;
>>>       �...@property private String confirmPassword;
>>> }
>>>
>>> User.java:
>>> public class User {
>>>
>>>        private String email;
>>>        private String password;
>>>
>>>        public User() {}
>>>
>>>        public String getEmail() {return email;}
>>>        public void setEmail(String email) {this.email = email;}
>>>
>>>        public String getPassword() {return password;}
>>>        public void setPassword(String password) {this.password =
>>> password;}
>>> }
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27947909.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> -----
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Howard M. Lewis Ship
>> 
>> Creator of Apache Tapestry
>> 
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>> 
>> (971) 678-5210
>> http://howardlewisship.com
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27951016.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5.2.0-SNAPHOT: newbie exceptions submitting form with BeanEditor

2010-03-19 Thread buckofive

Hi Joe/Howard,

I have ran into this same problem a while back and oddly enough (just the
other day) I finally got around to filing a JIRA
(https://issues.apache.org/jira/browse/TAP5-1051).  The only help/clue I can
give to the T5 team is that the BeanEditor was working at one time in
T5.2.0-SNAPSHOT and I'm not sure when the problem began but it was several
weeks ago (Howard, I'm pretty sure it started before the new
ComponentClassTransformWorker code(which is a great improvement BTW) ).   
My resolution unfortunately, was to switch the version of T5 I was using to
T5.1.x.  I Hope this helps.

Cheers,
B



Howard Lewis Ship wrote:
> 
> It looks like what you have should work. This may represent a
> regression, based on the retooling of the
> ComponentClassTransformWorker code; it looks like the BeanEditForm (or
> BeanEditor) is possibly holding onto its instance of BeanModel from
> one request to the next, rather than starting from scratch on each
> request.  I haven't seen this myself, and it seems like something that
> would be tested by the Tapestry integration test suite ... but still,
> this seems odd.
> 
> On Thu, Mar 18, 2010 at 9:23 AM, Joe Klecko 
> wrote:
>>
>> Hi,
>>
>> I'm trying to use the BeanEditor in a t:form which seems to work fine
>> until
>> I use the "add" parameter.  I've read through the documentation and I'm
>> just
>> not sure what i'm doing wrong.  The form renders fine but no matter what
>> I
>> do when I submit the form it always throws this exception: "Bean editor
>> model for User already contains a property model for property
>> 'confirmPassword'."
>>
>> Thank you for any help or suggestions in advance!
>>
>>
>> Here is my simple test case:
>>
>> Test.tml:
>> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>> 
>>        
>>                
>>                        
>>                                
>>                                
>>                        
>>                
>>                
>>        
>> 
>> 
>>
>> Test.java:
>> public class Test {
>>       �...@property private User user;
>>       �...@property private String confirmPassword;
>> }
>>
>> User.java:
>> public class User {
>>
>>        private String email;
>>        private String password;
>>
>>        public User() {}
>>
>>        public String getEmail() {return email;}
>>        public void setEmail(String email) {this.email = email;}
>>
>>        public String getPassword() {return password;}
>>        public void setPassword(String password) {this.password =
>> password;}
>> }
>>
>> --
>> View this message in context:
>> http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27947909.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27950914.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5.2.0-SNAPHOT: newbie exceptions submitting form with BeanEditor

2010-03-18 Thread Howard Lewis Ship
It looks like what you have should work. This may represent a
regression, based on the retooling of the
ComponentClassTransformWorker code; it looks like the BeanEditForm (or
BeanEditor) is possibly holding onto its instance of BeanModel from
one request to the next, rather than starting from scratch on each
request.  I haven't seen this myself, and it seems like something that
would be tested by the Tapestry integration test suite ... but still,
this seems odd.

On Thu, Mar 18, 2010 at 9:23 AM, Joe Klecko  wrote:
>
> Hi,
>
> I'm trying to use the BeanEditor in a t:form which seems to work fine until
> I use the "add" parameter.  I've read through the documentation and I'm just
> not sure what i'm doing wrong.  The form renders fine but no matter what I
> do when I submit the form it always throws this exception: "Bean editor
> model for User already contains a property model for property
> 'confirmPassword'."
>
> Thank you for any help or suggestions in advance!
>
>
> Here is my simple test case:
>
> Test.tml:
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
> 
>        
>                
>                        
>                                
>                                
>                        
>                
>                
>        
> 
> 
>
> Test.java:
> public class Test {
>       �...@property private User user;
>       �...@property private String confirmPassword;
> }
>
> User.java:
> public class User {
>
>        private String email;
>        private String password;
>
>        public User() {}
>
>        public String getEmail() {return email;}
>        public void setEmail(String email) {this.email = email;}
>
>        public String getPassword() {return password;}
>        public void setPassword(String password) {this.password = password;}
> }
>
> --
> View this message in context: 
> http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27947909.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



T5.2.0-SNAPHOT: newbie exceptions submitting form with BeanEditor

2010-03-18 Thread Joe Klecko

Hi,

I'm trying to use the BeanEditor in a t:form which seems to work fine until
I use the "add" parameter.  I've read through the documentation and I'm just
not sure what i'm doing wrong.  The form renders fine but no matter what I
do when I submit the form it always throws this exception: "Bean editor
model for User already contains a property model for property
'confirmPassword'."

Thank you for any help or suggestions in advance!


Here is my simple test case:

Test.tml:
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>




 
  




   



Test.java:
public class Test {
@Property private User user;
@Property private String confirmPassword;
}

User.java:
public class User {

private String email;   
private String password;

public User() {}

public String getEmail() {return email;}
public void setEmail(String email) {this.email = email;}

public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}

}   

-- 
View this message in context: 
http://old.nabble.com/T5.2.0-SNAPHOT%3A-newbie-exceptions-submitting-form-with-BeanEditor-tp27947909p27947909.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [newbie] Intercepting client-side form validation/submission

2009-12-23 Thread Ashwanth Kumar
Use Event.observe for the form and use the validation with custom JS of
urs...

HTH
 - Ashwanth Kumar

On Wed, Dec 23, 2009 at 3:48 PM, Kenneth CH, LEE  wrote:

> There is a submit button within the form. I could not attach the code
> in onclick handler because I want it to run only if the form is valid.
>
> 2009/12/22 Ashwanth Kumar :
> > On Tue, Dec 22, 2009 at 6:14 PM, Kenneth CH, LEE 
> wrote:
> >
> >> Hi there,
> >>
> >
> > Hello,
> >
> >
> >>
> >> Is there any existing facilities to trigger some custom Javascript
> >> code _after_ validating the form?
> >>
> >> I'm now doing it with some Javascript tricks:
> >> ===
> >> 
> >> ...
> >> 
> >> Event.observe(window, "load", function() {
> >>var f = $("myform").onsubmit;
> >>$("myform").onsubmit = function(e) {
> >>return f(e) && customFunction();
> >>};
> >> });
> >> 
> >> 
> >> ...
> >> 
> >> function customFunction() {
> >>  //return true to submit
> >> }
> >> 
> >> ===
> >>
> >
> > When exactly do u submit ur form??
> >
> >
> >> Notice that the custom function is only called _after_ validation
> >> _and_ only if it was successful.
> >>
> >
> > Well, if  you want to do a custom JS, u can do a Zone Update of the Form,
> > then observe Tapestry.ZONE_UPDATED_EVENT, for doing some some custom JS!
> > But, that happens only after form submission and not before that!
> >
> > HTH
> >  - Ashwanth Kumar
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [newbie] Intercepting client-side form validation/submission

2009-12-23 Thread Kenneth CH, LEE
There is a submit button within the form. I could not attach the code
in onclick handler because I want it to run only if the form is valid.

2009/12/22 Ashwanth Kumar :
> On Tue, Dec 22, 2009 at 6:14 PM, Kenneth CH, LEE  wrote:
>
>> Hi there,
>>
>
> Hello,
>
>
>>
>> Is there any existing facilities to trigger some custom Javascript
>> code _after_ validating the form?
>>
>> I'm now doing it with some Javascript tricks:
>> ===
>> 
>> ...
>> 
>> Event.observe(window, "load", function() {
>>    var f = $("myform").onsubmit;
>>    $("myform").onsubmit = function(e) {
>>        return f(e) && customFunction();
>>    };
>> });
>> 
>> 
>> ...
>> 
>> function customFunction() {
>>  //return true to submit
>> }
>> 
>> ===
>>
>
> When exactly do u submit ur form??
>
>
>> Notice that the custom function is only called _after_ validation
>> _and_ only if it was successful.
>>
>
> Well, if  you want to do a custom JS, u can do a Zone Update of the Form,
> then observe Tapestry.ZONE_UPDATED_EVENT, for doing some some custom JS!
> But, that happens only after form submission and not before that!
>
> HTH
>  - Ashwanth Kumar
>

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



Re: [newbie] Intercepting client-side form validation/submission

2009-12-22 Thread Ashwanth Kumar
On Tue, Dec 22, 2009 at 6:14 PM, Kenneth CH, LEE  wrote:

> Hi there,
>

Hello,


>
> Is there any existing facilities to trigger some custom Javascript
> code _after_ validating the form?
>
> I'm now doing it with some Javascript tricks:
> ===
> 
> ...
> 
> Event.observe(window, "load", function() {
>var f = $("myform").onsubmit;
>$("myform").onsubmit = function(e) {
>return f(e) && customFunction();
>};
> });
> 
> 
> ...
> 
> function customFunction() {
>  //return true to submit
> }
> 
> ===
>

When exactly do u submit ur form??


> Notice that the custom function is only called _after_ validation
> _and_ only if it was successful.
>

Well, if  you want to do a custom JS, u can do a Zone Update of the Form,
then observe Tapestry.ZONE_UPDATED_EVENT, for doing some some custom JS!
But, that happens only after form submission and not before that!

HTH
 - Ashwanth Kumar


[newbie] Intercepting client-side form validation/submission

2009-12-22 Thread Kenneth CH, LEE
Hi there,

Is there any existing facilities to trigger some custom Javascript
code _after_ validating the form?

I'm now doing it with some Javascript tricks:
===

...

Event.observe(window, "load", function() {
var f = $("myform").onsubmit;
$("myform").onsubmit = function(e) {
return f(e) && customFunction();
};
});


...

function customFunction() {
  //return true to submit
}

===

Notice that the custom function is only called _after_ validation
_and_ only if it was successful.

Since this is all boiler-plate I'm going to make it a component that
can be nested within , but before that I want to make sure
I'm not reinventing something that already exist. Or just tell me if
I'm going the wrong way and the _proper_ way to do it.

Your input is much appreciated.

Kenneth

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



Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread Thiago H. de Paula Figueiredo
Em Mon, 14 Dec 2009 23:02:41 -0200, Ashwanth Kumar  
 escreveu:


Well, if you want Mouse and Text field (key press events), use Java  
Script on the client side, its very useful and efficient. If you're very
particular, use DWR to map JS events to a Java Class @ server side, but  
with in-built ajax support, Tapestry doesn't require it though.


I don't see the need for DWR for implementing something that Tapestry  
doesn't implement out-of-the-box. I have one example, but its written in  
Portuguese.


Solution outline:

1) Define an event name.

2) In your page, component or mixin class, @Inject ComponentResources and  
use its createEventLink() to create a link that will trigger that event.


3) Still in the same class, create a method with @OnEvent("yourEventName")  
that handles the event and returns a JSONObject or JSONArray.


4) @Inject RenderSupport and use its addScript() method to generate any  
needed initialization for your JavaScript code, including the event URL.


5) If you use Prototype, use Event.observe('elementId', 'eventName',  
function() { implement your handling here ; }) to listen to the event and  
invoke the event method usint its URL. You'll probably use Ajax.Request.  
transport.responseJSON is exactly the JSONObject or JSONArray you returned  
in your event handler method.


A simple template you can use, based in real code, follows. It reacts to a  
change in a select tag, posts its value, gets the response as a JSON  
object and the changes the value of some s with the object  
properties.


/* This URL is the one created by ComponentResources.createEventLink().
This is the function which is invoked by the JavaScript line added via  
RenderSupport.addScript().

*/
function initialize(url) {

Event.observe('selectId', 'change', function() {

new Ajax.Request(url, {
method : 'post',
parameters: { value: $F('selectId') },
onSuccess: function(transport) {
var result = transport.responseJSON;
$('span1').innerHTML = result.property1;
$('span2').innerHTML = result.property2;
$('span3').innerHTML = result.property3;
}
});

});

}

I hope it helps.

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

http://www.arsmachina.com.br

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



Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread Ashwanth Kumar
Well, if you want Mouse and Text field (key press events), use Java Script
on the client side, its very useful and efficient. If you're very
particular, use DWR to map JS events to a Java Class @ server side, but with
in-built ajax support, Tapestry doesn't require it though.

Protoype can help u with JS: http://www.prototypejs.org/api/event

<http://www.prototypejs.org/api/event> - Ashwanth Kumar

On Mon, Dec 14, 2009 at 7:25 PM, marioosh.net wrote:

>
>
>
> Olle Hallin-2 wrote:
> >
> > I forgot to paste in the JavaDocs link:
> >
> http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/OnEvent.html
> >
>
> Yes, I know this annotation but...
> i think it doesn't work for events like: mouseover, mouseout, change
> (textfield)...
>
> http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/EventConstants.html
>
>
> --
> View this message in context:
> http://n2.nabble.com/newbie-EventListener-in-Tapestry-5-tp4163378p4164188.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread marioosh.net



Olle Hallin-2 wrote:
> 
> I forgot to paste in the JavaDocs link:
> http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/OnEvent.html
> 

Yes, I know this annotation but...
i think it doesn't work for events like: mouseover, mouseout, change
(textfield)...
http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/EventConstants.html


-- 
View this message in context: 
http://n2.nabble.com/newbie-EventListener-in-Tapestry-5-tp4163378p4164188.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread Olle Hallin
I forgot to paste in the JavaDocs link:

http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/OnEvent.html

Olle Hallin
Senior Java Developer and Architect
olle.hal...@crisp.se
www.crisp.se
http://www.linkedin.com/in/ollehallin



2009/12/14 Olle Hallin 

> It is.
>
> Add this to your page/component class:
>
>   @OnEvent @Log public void onEvent() {}
>
> and watch the log file for the stream of events that are fired against this
> (catch-all) event handler.
>
> Olle Hallin
> Senior Java Developer and Architect
> olle.hal...@crisp.se
> www.crisp.se
> http://www.linkedin.com/in/ollehallin
>
>
>
> 2009/12/14 marioosh.net 
>
>
>>
>> Inge Solvoll wrote:
>> >
>> > Check out this one!
>> >
>> >
>> http://chenillekit.codehaus.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/mixins/OnEvent.html
>> >
>>
>> Thanks:)
>> But... I see, that is a addition to tapestry. Why is not in native
>> Tapestry
>> 5 ? :(
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/newbie-EventListener-in-Tapestry-5-tp4163378p4163622.html
>> Sent from the Tapestry Users mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread Olle Hallin
It is.

Add this to your page/component class:

  @OnEvent @Log public void onEvent() {}

and watch the log file for the stream of events that are fired against this
(catch-all) event handler.

Olle Hallin
Senior Java Developer and Architect
olle.hal...@crisp.se
www.crisp.se
http://www.linkedin.com/in/ollehallin



2009/12/14 marioosh.net 

>
>
> Inge Solvoll wrote:
> >
> > Check out this one!
> >
> >
> http://chenillekit.codehaus.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/mixins/OnEvent.html
> >
>
> Thanks:)
> But... I see, that is a addition to tapestry. Why is not in native Tapestry
> 5 ? :(
>
> --
> View this message in context:
> http://n2.nabble.com/newbie-EventListener-in-Tapestry-5-tp4163378p4163622.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread marioosh.net


Inge Solvoll wrote:
> 
> Check out this one!
> 
> http://chenillekit.codehaus.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/mixins/OnEvent.html
> 

Thanks:)
But... I see, that is a addition to tapestry. Why is not in native Tapestry
5 ? :( 

-- 
View this message in context: 
http://n2.nabble.com/newbie-EventListener-in-Tapestry-5-tp4163378p4163622.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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



Re: [newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread Inge Solvoll
Check out this one!

http://chenillekit.codehaus.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/mixins/OnEvent.html

On Mon, Dec 14, 2009 at 11:34 AM, marioosh.net wrote:

> Is something like that:
> http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
> in Tapestry 5 ?
>
> I can't see @EventListener annotation in Tapesty5.
>
> --
> Pozdrawiam,
> Mariusz
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


[newbie] EventListener in Tapestry 5 ?

2009-12-14 Thread marioosh.net
Is something like that:
http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
in Tapestry 5 ?

I can't see @EventListener annotation in Tapesty5.

-- 
Pozdrawiam,
Mariusz

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



t5: Testify newbie

2009-10-22 Thread Angelo Chen

Hi,

I tried to set up a testify test, but keep getting, I'm sure I have a page
called 'TestPage', any idea why? thanks

ava.lang.RuntimeException: Request was not handled: 'testpage' may not be a
valid page name.
at org.apache.tapestry5.test.PageTester.renderPage(PageTester.java:177)


public class AbstractPageTest extends TapestryTest {

private static final TapestryTester SHARED_TESTER = new
TapestryTester("app", TestAppModule.class);

public AbstractPageTest() {
super(SHARED_TESTER);
}

}


public class TestPageTest extends AbstractPageTest {


@Test
public void testElementIsOnPage() {
Document page = tester.renderPage("testpage"));
}
}

-- 
View this message in context: 
http://www.nabble.com/t5%3A-Testify-newbie-tp26010388p26010388.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: PageLink / context / newbie question ...

2009-10-02 Thread Howard Lewis Ship
Which version of T5 are you using?  5.1 should handle this properly.
5.0 does not even have the [ ... ] array syntax.

On Fri, Oct 2, 2009 at 1:37 AM, Gunnar Eketrapp
 wrote:
> Can't find the documentaion on how to pass multiple values in the context.
>
> I have seen it somewhere
>
> I need to pass two strings where one of them may be null.
>
> E.g.
>  Pass two
> strings 
>
> http://howardlewisship.com

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



Re: PageLink / context / newbie question ...

2009-10-02 Thread Thiago H. de Paula Figueiredo
Em Fri, 02 Oct 2009 05:37:00 -0300, Gunnar Eketrapp  
 escreveu:


Can't find the documentaion on how to pass multiple values in the  
context.


Just pass an Object[] or a List as the context.


But I does not work for me. I.e. the activate method that takes two
strings does not get kicked.


Use one onActivate(EventContext e) instead of two. This method will be  
invoked with any number of parameters. EventContext has a method that  
gives you the number of parameters (int getCount()) e another that returns  
the values in the type you want ( T get(Class desiredType, int  
index)). That's the recommended way of doing it.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: PageLink / context / newbie question ...

2009-10-02 Thread Gunnar Eketrapp
Hi!

I will try that but dont have the time right now.

I solved it by adding a dash instead of null when a context param
should be null.

E.g.  Klick text


/Gunnar

2009/10/2 Olle Hallin :
> What happens if you introduce *public Object[] getPagelinkContext() { ... }*
> and change the template to
> ... ?
>
> Olle Hallin
>
>
> 2009/10/2 Gunnar Eketrapp 
>
>> Can't find the documentaion on how to pass multiple values in the context.
>>
>> I have seen it somewhere
>>
>> I need to pass two strings where one of them may be null.
>>
>> E.g.
>>  Pass two
>> strings 
>>
>> 

Re: PageLink / context / newbie question ...

2009-10-02 Thread Olle Hallin
What happens if you introduce *public Object[] getPagelinkContext() { ... }*
and change the template to
... ?

Olle Hallin


2009/10/2 Gunnar Eketrapp 

> Can't find the documentaion on how to pass multiple values in the context.
>
> I have seen it somewhere
>
> I need to pass two strings where one of them may be null.
>
> E.g.
>  Pass two
> strings 
>
> 

PageLink / context / newbie question ...

2009-10-02 Thread Gunnar Eketrapp
Can't find the documentaion on how to pass multiple values in the context.

I have seen it somewhere

I need to pass two strings where one of them may be null.

E.g.
 Pass two
strings 


Re: T5: Newbie

2009-09-29 Thread Alan Chaney
Thanks Thiago - thanks for the pointers and the clues. I now seem to be 
on the right track...


Regards

Alan Chaney

Thiago H. de Paula Figueiredo wrote:
Em Tue, 29 Sep 2009 13:46:29 -0300, Alan Chaney 
 escreveu:


I'm a complete newbie to T5. I need to develop my own component to go 
into a page. Could someone please direct me to an example on the web.


The component is very simple - it will just inject HTML from an external
source.


Writing components in T5 is very simple. A good source of examples is 
http://jumpstart.doublenegative.com.au:8080/jumpstart/.


In your case, you need to pull HTML from an external source. For this, I 
recommend Apache HttpClient. Once you have the needed HTML in a String, 
you'll need to write it to the output. This is done using a 
MarkupWriter. This is a component I use in my projects. Look at it to 
see how you can use a MarkupWriter. You'll need to use 
MarkupWriter.writeRaw() instead of write(), as the latter encodes the 
strings (< into <, etc).


public class Message {

/**
 * Message to be shown.
 */
@Parameter(required = true)
private String message;
@BeforeRenderTemplate
public boolean render(MarkupWriter writer) {
   
if (message != null && message.trim().length() > 0) {
   
writer.element("div", "class", "t-crud-message");
   
writer.element("p");

writer.write(message);
writer.end(); // p
   
writer.end(); // div
   
}
   
return false;
   
}


}



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



Re: T5: Newbie

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 13:46:29 -0300, Alan Chaney  
 escreveu:


I'm a complete newbie to T5. I need to develop my own component to go  
into a page. Could someone please direct me to an example on the web.


The component is very simple - it will just inject HTML from an external
source.


Writing components in T5 is very simple. A good source of examples is  
http://jumpstart.doublenegative.com.au:8080/jumpstart/.


In your case, you need to pull HTML from an external source. For this, I  
recommend Apache HttpClient. Once you have the needed HTML in a String,  
you'll need to write it to the output. This is done using a MarkupWriter.  
This is a component I use in my projects. Look at it to see how you can  
use a MarkupWriter. You'll need to use MarkupWriter.writeRaw() instead of  
write(), as the latter encodes the strings (< into <, etc).


public class Message {

/**
 * Message to be shown.
 */
@Parameter(required = true)
private String message;
@BeforeRenderTemplate
public boolean render(MarkupWriter writer) {

if (message != null && message.trim().length() > 0) {

writer.element("div", "class", "t-crud-message");

writer.element("p");
writer.write(message);
writer.end(); // p

writer.end(); // div

}

return false;

}

}

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



T5: Newbie

2009-09-29 Thread Alan Chaney
I'm a complete newbie to T5. I need to develop my own component to go 
into a page. Could someone please direct me to an example on the web.


The component is very simple - it will just inject HTML from an external
source.

Thanks

Alan Chaney

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



Re: newbie question about loop

2009-09-04 Thread Alfonso Quiroga
Thiago, thanks, so I make no change to the code, but internally I'm happy ;)
And about moving logic... maybe I can...

${ getViewPosition(position) }

and in .java I do:
getViewPosition(int aNumber) {
   return aNumber + 1;
}

I mean... maybe it's better because I don't override getter of a
property (position)



On Fri, Sep 4, 2009 at 2:37 PM, Thiago H. de Paula
Figueiredo wrote:
> Em Fri, 04 Sep 2009 14:33:16 -0300, Alfonso Quiroga 
> escreveu:
>>
>>      public int getPosition() {
>>              return position + 1;
>>     }
>
> This is not a hack: it's moving logic from the template to a class, and
> that's a Good Thing. :)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: newbie question about loop

2009-09-04 Thread Thiago H. de Paula Figueiredo
Em Fri, 04 Sep 2009 14:33:16 -0300, Alfonso Quiroga  
 escreveu:

  public int getPosition() {
  return position + 1;
 }


This is not a hack: it's moving logic from the template to a class, and  
that's a Good Thing. :)


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



newbie question about loop

2009-09-04 Thread Alfonso Quiroga
Hi! I am looping and I need the "index" position, but index starts in
0, and I want to show it in screen starting in 1, so... I have:

${position}

That works but starts in 0 I tried ${position + 1} but didn't work
The only hack I found, is declaring a special getter of "position" in
the page, like this:
  public int getPosition() {
  return position + 1;
 }

is this the real solution? thanks!

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



RE: Newbie questiones

2009-09-03 Thread Martin Torre Castro



   The more probable thing is that I am the dumb. When I tried before to do it, 
it was failing but maybe it was another thing and I got confused and thought 
that Enums couldn't be passed to another pages.

   I was thinking until this evening (I read something about it somewhere) that 
only primitive types, theirs wrappers and String could be passed and that you 
had to convert the Date, Calendar and Enum objects. By your answer, I guess I 
was wrong. Could you please confirm it to me? Which are the no-conversion-types 
and the another ones?


> From: josmar52...@gmail.com
> Date: Thu, 3 Sep 2009 17:45:31 -0400
> Subject: Re: Newbie questiones
> To: users@tapestry.apache.org
> 
> Maybe this is a dumb question, but why can't you just pass the Enum instead
> of converting to a String, then passing, the reconverting back to Enum?
> 
> 
> On Thu, Sep 3, 2009 at 5:17 PM, Joshua Martin  wrote:
> 
> > Are you trying to pass the value of a Select to another page?
> >
> >
> >
> > On Thu, Sep 3, 2009 at 5:14 PM, Madtyn  wrote:
> >
> >>   I'm experimenting and trying all kinds of things and I think the
> >> problem I have is when passing Enums to the EventContext. Although I
> >> do before the Enum -> String conversion and then set the String value
> >> in the destination page and return as a String  in the onPassivate,
> >> when I get the String value before converting it to Enum again, this
> >> makes something fail.
> >>
> >>   I can't understand why it did work when I didn't used the
> >> EventContext and why it does fail now.
> >>
> >>
> >>   Anyone does know about an efficient way to pass the Enums from the
> >> select component on the first page to the EventContext to the second
> >> injected page?
> >>
> >>   I know I could use a @Persist annotation, but it involves some
> >> details I would prefer avoiding. Some sample code would be great.
> >>
> >> Thanks to everyone
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > _
> >
> > Joshua S. Martin
> >
> >
> > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
> > contains information that may be confidential, protected by the attorney
> > client or other legal privileges, and or proprietary non public information.
> > If you are not an intended recipient of this message or an authorized
> > assistant to an intended recipient, please notify the sender by replying to
> > this message and then delete it from your system. Use, dissemination,
> > distribution, or reproduction of this message and or any of its attachments
> > (if any) by unintended recipients is not authorized and may be unlawful.
> >
> 
> 
> 
> -- 
> _
> 
> Joshua S. Martin
> 
> 
> CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
> contains information that may be confidential, protected by the attorney
> client or other legal privileges, and or proprietary non public information.
> If you are not an intended recipient of this message or an authorized
> assistant to an intended recipient, please notify the sender by replying to
> this message and then delete it from your system. Use, dissemination,
> distribution, or reproduction of this message and or any of its attachments
> (if any) by unintended recipients is not authorized and may be unlawful.

_
Descárgate Internet Explorer 8 ¡Y gana gratis viajes con Spanair!
http://www.vivelive.com/spanair

Re: Newbie questiones

2009-09-03 Thread Joshua Martin
Maybe this is a dumb question, but why can't you just pass the Enum instead
of converting to a String, then passing, the reconverting back to Enum?


On Thu, Sep 3, 2009 at 5:17 PM, Joshua Martin  wrote:

> Are you trying to pass the value of a Select to another page?
>
>
>
> On Thu, Sep 3, 2009 at 5:14 PM, Madtyn  wrote:
>
>>   I'm experimenting and trying all kinds of things and I think the
>> problem I have is when passing Enums to the EventContext. Although I
>> do before the Enum -> String conversion and then set the String value
>> in the destination page and return as a String  in the onPassivate,
>> when I get the String value before converting it to Enum again, this
>> makes something fail.
>>
>>   I can't understand why it did work when I didn't used the
>> EventContext and why it does fail now.
>>
>>
>>   Anyone does know about an efficient way to pass the Enums from the
>> select component on the first page to the EventContext to the second
>> injected page?
>>
>>   I know I could use a @Persist annotation, but it involves some
>> details I would prefer avoiding. Some sample code would be great.
>>
>> Thanks to everyone
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> _
>
> Joshua S. Martin
>
>
> CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
> contains information that may be confidential, protected by the attorney
> client or other legal privileges, and or proprietary non public information.
> If you are not an intended recipient of this message or an authorized
> assistant to an intended recipient, please notify the sender by replying to
> this message and then delete it from your system. Use, dissemination,
> distribution, or reproduction of this message and or any of its attachments
> (if any) by unintended recipients is not authorized and may be unlawful.
>



-- 
_

Joshua S. Martin


CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
contains information that may be confidential, protected by the attorney
client or other legal privileges, and or proprietary non public information.
If you are not an intended recipient of this message or an authorized
assistant to an intended recipient, please notify the sender by replying to
this message and then delete it from your system. Use, dissemination,
distribution, or reproduction of this message and or any of its attachments
(if any) by unintended recipients is not authorized and may be unlawful.


Re: Newbie questions

2009-09-03 Thread Madtyn
   More than one select. The problem is that the model of the select
is an Enum made by myself. As I explained, when I did the conversion
to String and used the parameter by parameter onPassivate()-onActivate
way of doing it, it worked. But using the EventContext is going to get
me more than nervous :-(.




2009/9/3, Joshua Martin :
> Are you trying to pass the value of a Select to another page?
>
>
> On Thu, Sep 3, 2009 at 5:14 PM, Madtyn  wrote:
>
>>   I'm experimenting and trying all kinds of things and I think the
>> problem I have is when passing Enums to the EventContext. Although I
>> do before the Enum -> String conversion and then set the String value
>> in the destination page and return as a String  in the onPassivate,
>> when I get the String value before converting it to Enum again, this
>> makes something fail.
>>
>>   I can't understand why it did work when I didn't used the
>> EventContext and why it does fail now.
>>
>>
>>   Anyone does know about an efficient way to pass the Enums from the
>> select component on the first page to the EventContext to the second
>> injected page?
>>
>>   I know I could use a @Persist annotation, but it involves some
>> details I would prefer avoiding. Some sample code would be great.
>>
>> Thanks to everyone
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> _
>
> Joshua S. Martin
>
>
> CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
> contains information that may be confidential, protected by the attorney
> client or other legal privileges, and or proprietary non public information.
> If you are not an intended recipient of this message or an authorized
> assistant to an intended recipient, please notify the sender by replying to
> this message and then delete it from your system. Use, dissemination,
> distribution, or reproduction of this message and or any of its attachments
> (if any) by unintended recipients is not authorized and may be unlawful.
>

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



Re: Newbie questiones

2009-09-03 Thread Joshua Martin
Are you trying to pass the value of a Select to another page?


On Thu, Sep 3, 2009 at 5:14 PM, Madtyn  wrote:

>   I'm experimenting and trying all kinds of things and I think the
> problem I have is when passing Enums to the EventContext. Although I
> do before the Enum -> String conversion and then set the String value
> in the destination page and return as a String  in the onPassivate,
> when I get the String value before converting it to Enum again, this
> makes something fail.
>
>   I can't understand why it did work when I didn't used the
> EventContext and why it does fail now.
>
>
>   Anyone does know about an efficient way to pass the Enums from the
> select component on the first page to the EventContext to the second
> injected page?
>
>   I know I could use a @Persist annotation, but it involves some
> details I would prefer avoiding. Some sample code would be great.
>
> Thanks to everyone
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
_

Joshua S. Martin


CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s),
contains information that may be confidential, protected by the attorney
client or other legal privileges, and or proprietary non public information.
If you are not an intended recipient of this message or an authorized
assistant to an intended recipient, please notify the sender by replying to
this message and then delete it from your system. Use, dissemination,
distribution, or reproduction of this message and or any of its attachments
(if any) by unintended recipients is not authorized and may be unlawful.


Re: Newbie questiones

2009-09-03 Thread Madtyn
   I'm experimenting and trying all kinds of things and I think the
problem I have is when passing Enums to the EventContext. Although I
do before the Enum -> String conversion and then set the String value
in the destination page and return as a String  in the onPassivate,
when I get the String value before converting it to Enum again, this
makes something fail.

   I can't understand why it did work when I didn't used the
EventContext and why it does fail now.


   Anyone does know about an efficient way to pass the Enums from the
select component on the first page to the EventContext to the second
injected page?

   I know I could use a @Persist annotation, but it involves some
details I would prefer avoiding. Some sample code would be great.

Thanks to everyone

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



Re: Newbie questions

2009-09-03 Thread Madtyn
Hi. I made the mvn clean and tried again to run the app but the same
error keeps on.

/* on the FindSocios page */-

showSocios.setSocioSearchType(socioSearchType.toString());  //LINE 122
the stacktrace leads to here, the only hint I have
showSocios.setDateSearchType(dateSearchType.toString());
showSocios.setCatSearchType(catSearchType.toString());

switch(socioSearchType) {
   case ALL:
   return showSocios;
   case BYLOGIN:
   showSocios.setLogin(login);
   return showSocios;
   case BYDNI:
   showSocios.setDni(dni);
   return showSocios;

/* on the ShowSocios page*/--

The onActivate() signature when receiving is:





void onActivate(EventContext context) throws ParseException {

  this.idServ = context.get(Long.class, 3);
  this.login= context.get(String.class, 5);
  this.dni= context.get(String.class, 6);
...and so on
}

java.lang.VerifyError
(class: es/udc/madtyn/gimnasio/web/pages/show/ShowSocios, method:
onActivate signature: (Lorg/apache/tapestry5/EventContext;)V) Illegal
constant pool index
Stack trace:
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:85)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:589)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:602)
org.apache.tapestry5.internal.services.PageElementFactoryImpl.newRootComponentElement(PageElementFactoryImpl.java:266)
org.apache.tapestry5.internal.services.PageLoaderProcessor.loadRootComponent(PageLoaderProcessor.java:412)
org.apache.tapestry5.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:390)
org.apache.tapestry5.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59)
org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:79)
es.udc.madtyn.gimnasio.web.pages.find.FindSocios._$read_inject_page_showSocios(FindSocios.java)
es.udc.madtyn.gimnasio.web.pages.find.FindSocios.onSubmitFromBusquedaForm(FindSocios.java:122)

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



Re: Newbie questions

2009-09-03 Thread Thiago H. de Paula Figueiredo
Em Thu, 03 Sep 2009 08:40:53 -0300, Martin Torre Castro  
 escreveu:



Thank you very much Thiago.


You're welcome!

EventContext is working ok when I'm sending data from the page to the  
same page. But if I send data from another page and I'm setting the  
EventContext parameters as before is show an error:


method onActivate signature: (Lorg/apache/tapestry/EventContext;)V)  
Illegal constant pool index


This is a compilation or class manipulation issue. Try recompiling your  
application.
It looks like you're trying to receive an array of EventContext in your  
onActivate method: that's not correct. It should be  
onActivate(EventContext context).
The context value can't be an EventContext (something I guess it's fixed  
in the next Tapestry version).


Do I have to set the onActivate parameters one by one as I usually did  
or is better to make a setContext method in the page receiving the data?


If you use a method other than onActivate to recevie data, it's a valid  
choice, but you're not using the activation context.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



RE: Newbie questions

2009-09-03 Thread Martin Torre Castro

Thank you very much Thiago. 

EventContext is working ok when I'm sending data from the page to the same 
page. But if I send data from another page and I'm setting the EventContext 
parameters as before is show an error:

method onActivate signature: (Lorg/apache/tapestry/EventContext;)V) Illegal 
constant pool index


Do I have to set the onActivate parameters one by one as I usually did or is 
better to make a setContext method in the page receiving the data? If so, how 
do I implement the setter? With a constructor of ArrayEventContext? 


   Thank you very much again. I really aprecciate the help of all you guys. 
It's saving my life!

_
Con Vodafone disfruta de Hotmail gratis en tu móvil. ¡Pruébalo!
http://serviciosmoviles.es.msn.com/hotmail/vodafone.aspx

Re: Newbie questions

2009-09-02 Thread Thiago H. de Paula Figueiredo
Em Wed, 02 Sep 2009 16:30:44 -0300, Martin Torre Castro  
 escreveu:


 Hello, I have some doubts I can't solve about passing values  
between pages and don't understand as I wish.Maybe you could help me.


Hi!

1.-When I've got more than one onActivate() for a page with different  
kinds of arguments, for example:

[...]

Use a single onActivate(EventContext context) method. It will be invoked  
with any number of parameters. EventContext.getCount() will give you the  
number of parameters and EventContext.get(Class typeToConvert, int index)  
will return the parameter values.


2.-About catching the values from selects and texfields, I've seen some  
code using attributes on Java with _attributeName linking these  
variables to the values on the html components. This is a convention on  
Tapestry that makes it to find automatically the so _named fields or I'm  
missing something?


This _fieldName is a field naming convention that Howard, the framework  
creator and main committer, used to follow. Tapestry doesn't treat  
underscored-prefixed fields differently from non-undescored-prefixed ones.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Newbie questions

2009-09-02 Thread Martin Torre Castro

 Hello, I have some doubts I can't solve about passing values between pages 
and don't understand as I wish.Maybe you could help me.   

1.-When I've got more than one onActivate() for a page with different kinds of 
arguments, for example:
onActivate() { ...some_code_here... }
onActivate(Long l) {...some_code_here...}
onActivate(String s) {...some_code_here...}
onActivate(String s1, String2) {...some_code_here...}

 How can I know which one of them is going to be called? Is it possible for 
more than one to be called when loading the same page? If this is true, which 
order do they follow?   When I use a PageLink t:context="numberField" it calls 
only one of the onActivate, but in other pages I'm finding non-predictable 
behaviours for me.   

If I have a Object[] onPassivate() for example, can I do 

Object onPassivate() {
 if(condition) return new Object[] {a.toString(), b.toString()}
 elsereturn new Object[] {c}  // C being a Long Object
}   
and catch the different cases by separate?   

2.-About catching the values from selects and texfields, I've seen some code 
using attributes on Java with _attributeName linking these variables to the 
values on the html components. This is a convention on Tapestry that makes it 
to find automatically the so _named fields or I'm missing something?

_
Messenger cumple 10 años ¡Descárgate ya los nuevos emoticonos!
http://www.vivelive.com/felicidades

Re: newbie needs some advice/ build-in components not loaded by server

2009-05-07 Thread Thiago H. de Paula Figueiredo
It looks like you have some corrupted JAR or messed up dependencies.
By the way, instead of using JBoss from the beginning, try using
Jetty. It won't make any difference while developing your web
interface in Tapestry, but it will make solve some common environment
problems easier.

-- 
Thiago

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



newbie needs some advice/ build-in components not loaded by server

2009-05-07 Thread Yvonne Olbrich
Hi all,

I have been trying for 3 days now to work out the easy example from
the site for Tapestry 5.

Index.tml
---
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

tutorial1 Start Page


tutorial1 Start Page

 This is the start page for this application, a good place
to start your modifications.
Just to prove this is live: 

 The current time is: ${currentTime}. 



[refresh]





and I removed all error messages until this very last one. I use
Eclipse and JBOSS 5.0.1 GA to try and build my own small app after the
examples, but I ran into a problem which I did not find on any of the
mailing lists nor in the archive. The app finds my pages/Index.java
class and the Index.tml alright and ${currentTime} is rendered but as
soon as I add any tag here  I get an error.


"Unable to resolve 'pagelink' to a component class name.  Available
component types: (none)."

and after that I get the same error for 'ExceptionReport' which of
course is also a component...
--

I really don't know what else to do ...

Has anyone of you an idea why the components are not loaded? I know
they are in the core.jar as the Filter class is, but they are
obviously not found anyway

starting info of console has no error:
--
14:17:17,109 INFO  [ComponentClassResolver] Available pages:
(blank): de.aops.pages.Index
Index: de.aops.pages.Index
14:17:17,140 INFO  [TapestryFilter] Startup status:Application
'tapestry' (Tapestry version 5.0.18).

Startup time: 422 ms to build IoC Registry, 1.141 ms overall.

Startup services status:
 ActionRenderResponseGenerator: DEFINED
  AjaxComponentEventRequestHandler: DEFINED
 AjaxComponentEventResultProcessor: DEFINED
   AjaxPartialResponseRenderer: DEFINED
 Alias: REAL
AliasOverrides: REAL
   ApplicationDefaults: REAL
ApplicationGlobals: REAL
ApplicationInitializer: REAL
   ApplicationStateManager: DEFINED
 ApplicationStatePersistenceStrategySource: DEFINED
   AspectDecorator: DEFINED
   AssetBindingFactory: DEFINED
   AssetObjectProvider: REAL
   AssetSource: VIRTUAL
 BaseURLSource: DEFINED
   BeanBlockOverrideSource: DEFINED
   BeanBlockSource: DEFINED
   BeanModelSource: DEFINED
 BindingSource: DEFINED
  ChainBuilder: VIRTUAL
  ClassFactory: BUILTIN
  ClassNameLocator: REAL
ClasspathAssetAliasManager: DEFINED
 ClasspathAssetFactory: DEFINED
 ClasspathURLConverter: REAL
  ClientPersistentFieldStorage: DEFINED
 ClientPersistentFieldStrategy: DEFINED
   ComponentClassCache: DEFINED
 ComponentClassFactory: DEFINED
ComponentClassResolver: REAL
 ComponentClassTransformWorker: DEFINED
 ComponentClassTransformer: VIRTUAL
  ComponentDefaultProvider: DEFINED
  ComponentEventRequestHandler: DEFINED
 ComponentEventResultProcessor: DEFINED
  ComponentInstanceResultProcessor: DEFINED
   ComponentInstantiatorSource: REAL
ComponentInvocationMap: DEFINED
   ComponentMessagesSource: DEFINED
   ComponentSource: DEFINED
   ComponentTemplateSource: VIRTUAL
   Context: DEFINED
   ContextAssetFactory: DEFINED
ContextPathEncoder: DEFINED
   ContextValueEncoder: DEFINED
CookieSink: DEFINED
  CookieSource: DEFINED
   Cookies: DEFINED
 CtClassSource: DEFINED
  DataTypeAnalyzer: DEFINED
   DefaultDataTypeAnalyzer: DEFINED
DefaultFileItemFactory: DEFINED
  DefaultImplementationBuilder: VIRTUAL
   EndOfRequestListenerHub: DEFINED
   Environment: VIRTUAL
EnvironmentalShadowBuilder: VIRTUAL
 ExceptionAnalyzer: DEFINED
  ExceptionTracker: DEFINED
   FactoryDefaults: REAL
 FieldTranslatorSour

Re: T5 newbie books/tutorials and a couple of questions?

2009-01-05 Thread Geoff Callender

Kevin,

I, too, would recommend using a new entity to resolve the many-to-many  
into a pair of one-to-many relationships.  But please don't ask me to  
justify that statement - I came to the conclusion too long ago to  
remember the reasons.  All I remember is that it's less pain in the  
long run (and you'll keep more of your hair).


grep JumpStart for many-to-many and you'll find the UserRole example.

Regards,
Geoff

On 04/01/2009, at 4:16 AM, Jonathan Barker wrote:


Kevin,

Almost three years ago, I climbed learning curves for T4 (and  
Hivemind),

Spring, Acegi, and Hibernate simultaneously.  It was... challenging.

Make sure you really need ManyToMany with Hibernate.  Often, two  
OneToMany

relationships will suffice.

Take your time with Hibernate.  See how the different options result  
in

different implementations (in the database) of relationships. Reverse
engineer an existing database and see what Hibernate gives you.  I  
think I
know Hibernate pretty well, and yet I keep the reference guide up  
whenever
I'm working with it - even with content-assist.  Oh, and take some  
time to
figure out how you are going to implement equals() and hashCode() -  
those

are important questions with Hibernate.

Have fun!

Jonathan


-Original Message-
From: dok...@phideaux.rawfeddogs.net
[mailto:dok...@phideaux.rawfeddogs.net] On Behalf Of Kevin Monceaux
Sent: Saturday, January 03, 2009 00:58
To: Tapestry users
Subject: RE: T5 newbie books/tutorials and a couple of questions?

Jonathan,

On Fri, 2 Jan 2009, Jonathan Barker wrote:

Search the list for the Jumpstart application.  It has been kept  
right
up to date with the latest release of T5.  I think you will find  
it has
many good examples. (Also, search the Wiki for titles with  
"Tapestry5".

It's not all up to date, but there's some great stuff.)


It looks like there's plenty there to keep me busy for a while.  It
doesn't seem to have any ManyToMany relation examples.  The  
following in

the Jumpstart root directory:

# find . -name "*.java" -exec grep ManyToMany {} \;

returns nothing.  But, it does have a few OneToMany relations, which
should be close enough to get me started.

Searching the wiki for ManyToMany also turned up next to nothing.  It
turned up a couple of pages, but they just mentioned OneToMany,
ManyToMany, etc., in passing without any actual code examples of the
annotations.  I was sure I saw a few examples in the tapestry5 doc
section.  Is the main Tapestry site indexed by Google?  A Google  
search

for:

site:tapestry.apache.org/tapestry5 ManyToMany

got no hits at all.


I'm not sure you really want a grid for what you have displayed, but

rather
Loops generating the tables on your own.  Because you have both  
column

and
row groupings (COLSPAN,ROWSPAN) on the pages you listed, I'm not  
sure

how

you would do things like apply sorting.


I suspected that might be the case.  The grid component is impressive
enough as it is.  If it could "magically" handle multi-level  
hierarchical

data I might not know how to act.  :-)  With Django I'm currently
generating those pages with nested loops.  Before Django I gave
ASP.NET(via Mono on a FreeBSD box) a try and was generating those  
pages by

dumping the data to XML and using XSLT.

Hibernate has a learning curve all its own, so if you're not  
familiar
with it, take some time to learn it on its own.  At least be  
prepared
for some hair-pulling if you try to learn both Tapestry and  
Hibernate at

the same time.


I'm a relative newbie to Tapestry, Hibernate, and Java.  It might  
be a
good thing that I have very little hair.  I figure if I'm going to  
go bald
some day I might as well beat nature to it.  I alternate between  
clipping
it as short as clippers will clip it, and shaving my head.  I've  
let it

grow out a bit for winter.  Maybe I should shave it before Hibernate
drives me to trying to pull what little I have left out.  :-)



Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


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



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




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



Re: T5 newbie books/tutorials and a couple of questions?

2009-01-03 Thread Jonathan O'Connor

Kevin,
I'm a believer in Samson and Delilah. Cutting your hair is making you 
weak! As a chess player, I never play chess the week after I get a 
haircut, as I just loose. Also, Garry Kasparov, former world champion, 
used to say that the brain worked better if it was 1 degree warmer than 
the rest of the body. So if you must shave your head, at least wear a 
woolly hat. Thinking caps are also good!

Ciao,
Jonathan

On 03/01/2009 05:57, Kevin Monceaux wrote:

Jonathan,

On Fri, 2 Jan 2009, Jonathan Barker wrote:

Search the list for the Jumpstart application.  It has been kept 
right up to date with the latest release of T5.  I think you will 
find it has many good examples. (Also, search the Wiki for titles 
with "Tapestry5". It's not all up to date, but there's some great 
stuff.)


It looks like there's plenty there to keep me busy for a while.  It 
doesn't seem to have any ManyToMany relation examples.  The following 
in the Jumpstart root directory:


# find . -name "*.java" -exec grep ManyToMany {} \;

returns nothing.  But, it does have a few OneToMany relations, which 
should be close enough to get me started.


Searching the wiki for ManyToMany also turned up next to nothing.  It 
turned up a couple of pages, but they just mentioned OneToMany, 
ManyToMany, etc., in passing without any actual code examples of the 
annotations.  I was sure I saw a few examples in the tapestry5 doc 
section.  Is the main Tapestry site indexed by Google?  A Google 
search for:


site:tapestry.apache.org/tapestry5 ManyToMany

got no hits at all.

I'm not sure you really want a grid for what you have displayed, but 
rather
Loops generating the tables on your own.  Because you have both 
column and
row groupings (COLSPAN,ROWSPAN) on the pages you listed, I'm not sure 
how

you would do things like apply sorting.


I suspected that might be the case.  The grid component is impressive 
enough as it is.  If it could "magically" handle multi-level 
hierarchical data I might not know how to act.  :-)  With Django I'm 
currently generating those pages with nested loops.  Before Django I 
gave ASP.NET(via Mono on a FreeBSD box) a try and was generating those 
pages by dumping the data to XML and using XSLT.


Hibernate has a learning curve all its own, so if you're not familiar 
with it, take some time to learn it on its own.  At least be prepared 
for some hair-pulling if you try to learn both Tapestry and Hibernate 
at the same time.


I'm a relative newbie to Tapestry, Hibernate, and Java.  It might be a 
good thing that I have very little hair.  I figure if I'm going to go 
bald some day I might as well beat nature to it.  I alternate between 
clipping it as short as clippers will clip it, and shaving my head.  
I've let it grow out a bit for winter.  Maybe I should shave it before 
Hibernate drives me to trying to pull what little I have left out.  :-)




Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


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





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



RE: T5 newbie books/tutorials and a couple of questions?

2009-01-03 Thread Jonathan Barker
Kevin,

Almost three years ago, I climbed learning curves for T4 (and Hivemind),
Spring, Acegi, and Hibernate simultaneously.  It was... challenging.

Make sure you really need ManyToMany with Hibernate.  Often, two OneToMany
relationships will suffice.

Take your time with Hibernate.  See how the different options result in
different implementations (in the database) of relationships. Reverse
engineer an existing database and see what Hibernate gives you.  I think I
know Hibernate pretty well, and yet I keep the reference guide up whenever
I'm working with it - even with content-assist.  Oh, and take some time to
figure out how you are going to implement equals() and hashCode() - those
are important questions with Hibernate.  

Have fun!

Jonathan
 
> -Original Message-
> From: dok...@phideaux.rawfeddogs.net
> [mailto:dok...@phideaux.rawfeddogs.net] On Behalf Of Kevin Monceaux
> Sent: Saturday, January 03, 2009 00:58
> To: Tapestry users
> Subject: RE: T5 newbie books/tutorials and a couple of questions?
> 
> Jonathan,
> 
> On Fri, 2 Jan 2009, Jonathan Barker wrote:
> 
> > Search the list for the Jumpstart application.  It has been kept right
> > up to date with the latest release of T5.  I think you will find it has
> > many good examples. (Also, search the Wiki for titles with "Tapestry5".
> > It's not all up to date, but there's some great stuff.)
> 
> It looks like there's plenty there to keep me busy for a while.  It
> doesn't seem to have any ManyToMany relation examples.  The following in
> the Jumpstart root directory:
> 
> # find . -name "*.java" -exec grep ManyToMany {} \;
> 
> returns nothing.  But, it does have a few OneToMany relations, which
> should be close enough to get me started.
> 
> Searching the wiki for ManyToMany also turned up next to nothing.  It
> turned up a couple of pages, but they just mentioned OneToMany,
> ManyToMany, etc., in passing without any actual code examples of the
> annotations.  I was sure I saw a few examples in the tapestry5 doc
> section.  Is the main Tapestry site indexed by Google?  A Google search
> for:
> 
>  site:tapestry.apache.org/tapestry5 ManyToMany
> 
> got no hits at all.
> 
> > I'm not sure you really want a grid for what you have displayed, but
> rather
> > Loops generating the tables on your own.  Because you have both column
> and
> > row groupings (COLSPAN,ROWSPAN) on the pages you listed, I'm not sure
> how
> > you would do things like apply sorting.
> 
> I suspected that might be the case.  The grid component is impressive
> enough as it is.  If it could "magically" handle multi-level hierarchical
> data I might not know how to act.  :-)  With Django I'm currently
> generating those pages with nested loops.  Before Django I gave
> ASP.NET(via Mono on a FreeBSD box) a try and was generating those pages by
> dumping the data to XML and using XSLT.
> 
> > Hibernate has a learning curve all its own, so if you're not familiar
> > with it, take some time to learn it on its own.  At least be prepared
> > for some hair-pulling if you try to learn both Tapestry and Hibernate at
> > the same time.
> 
> I'm a relative newbie to Tapestry, Hibernate, and Java.  It might be a
> good thing that I have very little hair.  I figure if I'm going to go bald
> some day I might as well beat nature to it.  I alternate between clipping
> it as short as clippers will clip it, and shaving my head.  I've let it
> grow out a bit for winter.  Maybe I should shave it before Hibernate
> drives me to trying to pull what little I have left out.  :-)
> 
> 
> 
> Kevin
> http://www.RawFedDogs.net
> http://www.WacoAgilityGroup.org
> Bruceville, TX
> 
> Si hoc legere scis nimium eruditionis habes.
> Longum iter est per praecepta, breve et efficax per exempla!!!
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org


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



RE: T5 newbie books/tutorials and a couple of questions?

2009-01-03 Thread Kevin Monceaux

Jonathan,

On Fri, 2 Jan 2009, Jonathan Barker wrote:

Search the list for the Jumpstart application.  It has been kept right 
up to date with the latest release of T5.  I think you will find it has 
many good examples. (Also, search the Wiki for titles with "Tapestry5". 
It's not all up to date, but there's some great stuff.)


It looks like there's plenty there to keep me busy for a while.  It 
doesn't seem to have any ManyToMany relation examples.  The following in 
the Jumpstart root directory:


# find . -name "*.java" -exec grep ManyToMany {} \;

returns nothing.  But, it does have a few OneToMany relations, which 
should be close enough to get me started.


Searching the wiki for ManyToMany also turned up next to nothing.  It 
turned up a couple of pages, but they just mentioned OneToMany, 
ManyToMany, etc., in passing without any actual code examples of the 
annotations.  I was sure I saw a few examples in the tapestry5 doc 
section.  Is the main Tapestry site indexed by Google?  A Google search 
for:


site:tapestry.apache.org/tapestry5 ManyToMany

got no hits at all.


I'm not sure you really want a grid for what you have displayed, but rather
Loops generating the tables on your own.  Because you have both column and
row groupings (COLSPAN,ROWSPAN) on the pages you listed, I'm not sure how
you would do things like apply sorting.


I suspected that might be the case.  The grid component is impressive 
enough as it is.  If it could "magically" handle multi-level hierarchical 
data I might not know how to act.  :-)  With Django I'm currently 
generating those pages with nested loops.  Before Django I gave 
ASP.NET(via Mono on a FreeBSD box) a try and was generating those pages by 
dumping the data to XML and using XSLT.


Hibernate has a learning curve all its own, so if you're not familiar 
with it, take some time to learn it on its own.  At least be prepared 
for some hair-pulling if you try to learn both Tapestry and Hibernate at 
the same time.


I'm a relative newbie to Tapestry, Hibernate, and Java.  It might be a 
good thing that I have very little hair.  I figure if I'm going to go bald 
some day I might as well beat nature to it.  I alternate between clipping 
it as short as clippers will clip it, and shaving my head.  I've let it 
grow out a bit for winter.  Maybe I should shave it before Hibernate 
drives me to trying to pull what little I have left out.  :-)




Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


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



RE: T5 newbie books/tutorials and a couple of questions?

2009-01-02 Thread Jonathan Barker

Search the list for the Jumpstart application.  It has been kept right up to
date with the latest release of T5.  I think you will find it has many good
examples. (Also, search the Wiki for titles with "Tapestry5".  It's not all
up to date, but there's some great stuff.)

I'm not sure you really want a grid for what you have displayed, but rather
Loops generating the tables on your own.  Because you have both column and
row groupings (COLSPAN,ROWSPAN) on the pages you listed, I'm not sure how
you would do things like apply sorting.

You could override the cell contents to come up with some really custom
stuff, and you can even put grids within cells of other grids.

The annotations you mention (like @OneToMany) are part of Hibernate
Annotations, and there is a tapestry-hibernate module for easy integration
of Hibernate.  I do my Hibernate integration with Spring (and
tapestry-spring), but it will make life simpler if you can do it with
tapestry-hibernate.  In the end, it doesn't really matter to Tapestry how
you construct your object graph.

Hibernate has a learning curve all its own, so if you're not familiar with
it, take some time to learn it on its own.  At least be prepared for some
hair-pulling if you try to learn both Tapestry and Hibernate at the same
time.

Jonathan

> -Original Message-
> From: dok...@phideaux.rawfeddogs.net
> [mailto:dok...@phideaux.rawfeddogs.net] On Behalf Of Kevin Monceaux
> Sent: Friday, January 02, 2009 13:51
> To: Tapestry Users
> Subject: T5 newbie books/tutorials and a couple of questions?
> 
> Tapestry Fans,
> 
> I've been tinkering with Tapestry a little bit off and on but am still
> pretty much a complete newbie.
> 
> In the past I've tried a few other Java frameworks, but a framework that
> requires more lines of XML configuration than lines of source code never
> made any sense to me.
> 
> I've also tinkered a bit with various "script" based frameworks like Ruby
> on Rails and Django.  At the moment I have two websites I act as webmaster
> for.  My personal web site is currently a mixture of PHP and PSP(Pascal
> Server Pages).  Actually I think PSP is now known as PWU - Pascal Web
> Units.  The second is a local canine agility group's web site which is
> currently Django based.  I'm considering converting both to Tapestry.
> 
> In the past I purchased the PDF version of Enjoying Web Development with
> Tapestry and went through part of it with Tapestry 4.  That was quite a
> while back and don't really remember any of it, which is probably a good
> thing considering how different Tapestry 5 is.
> 
> I've gone through the Tapestry 5 tutorial a few times and was thrilled to
> recently discover it now has some database examples.  The last page of the
> tutorial says:
> 
> ... but Tapestry and this tutorial are a work in progress, so stay
> patient, and check out the other Tapestry tutorials and resources
> available on the Tapestry 5 home page.
> 
> I checked the Tapestry 5 home page but couldn't find any other tutorials.
> I'm anxiously awaiting other tutorials and/or additional sections of the
> current tutorial.
> 
> I purchased "Tapestry 5: Building Web Applications: A step-by-step guide
> to Java Web development with the developer-friendly Apache Tapestry
> framework" when I first heard about it but was underwhelmed, especially
> with it's lack of database examples.  Now that the tutorial has got me
> going with some database examples, I'm taking another look at that book.
> Will all the examples in the book work with the current version of
> Tapestry 5 or are there any changes I should be aware of?  Are there any
> other Tapestry 5 books available now or in the near future?
> 
> Where can I find some relational database examples?  I think I came across
> a couple of entity examples with annotations along the line of
> @ManyToMany, @OneToMany, etc., in the documentation section of the
> Tapestry web site but I'm now having trouble finding them again.
> 
> Can the grid component handle hierarchical data?  For example, the brags
> page on WAG's website currently looks something like:
> 
> http://www.WacoAgilityGroup.org/WAG/Brags/
> 
> which is pulling data from three different tables.  The Members page
> currently looks like:
> 
> http://www.WacoAgilityGroup.org/WAG/Members/
> 
> It's currently a static page but I'm planning to move everything into the
> database, which will also involve a few tables.  If the grid component can
> handle hierarchical data, can someone point me towards some examples?
> 
> 
> 
> 
> Kevin
> http://www.RawFedDogs.net
> http://www.Wac

Re: T5 newbie books/tutorials and a couple of questions?

2009-01-02 Thread Christian Edward Gruber

There are some on the tapestry wiki, under the Tapestry 5 How-Tos.

Christian.

On 2-Jan-09, at 13:51 , Kevin Monceaux wrote:


Tapestry Fans,

I've been tinkering with Tapestry a little bit off and on but am  
still pretty much a complete newbie.


In the past I've tried a few other Java frameworks, but a framework  
that requires more lines of XML configuration than lines of source  
code never made any sense to me.


I've also tinkered a bit with various "script" based frameworks like  
Ruby on Rails and Django.  At the moment I have two websites I act  
as webmaster for.  My personal web site is currently a mixture of  
PHP and PSP(Pascal Server Pages).  Actually I think PSP is now known  
as PWU - Pascal Web Units.  The second is a local canine agility  
group's web site which is currently Django based.  I'm considering  
converting both to Tapestry.


In the past I purchased the PDF version of Enjoying Web Development  
with Tapestry and went through part of it with Tapestry 4.  That was  
quite a while back and don't really remember any of it, which is  
probably a good thing considering how different Tapestry 5 is.


I've gone through the Tapestry 5 tutorial a few times and was  
thrilled to recently discover it now has some database examples.   
The last page of the tutorial says:


... but Tapestry and this tutorial are a work in progress, so stay  
patient, and check out the other Tapestry tutorials and resources  
available on the Tapestry 5 home page.


I checked the Tapestry 5 home page but couldn't find any other  
tutorials. I'm anxiously awaiting other tutorials and/or additional  
sections of the current tutorial.


I purchased "Tapestry 5: Building Web Applications: A step-by-step  
guide to Java Web development with the developer-friendly Apache  
Tapestry framework" when I first heard about it but was  
underwhelmed, especially with it's lack of database examples.  Now  
that the tutorial has got me going with some database examples, I'm  
taking another look at that book. Will all the examples in the book  
work with the current version of Tapestry 5 or are there any changes  
I should be aware of?  Are there any other Tapestry 5 books  
available now or in the near future?


Where can I find some relational database examples?  I think I came  
across a couple of entity examples with annotations along the line  
of @ManyToMany, @OneToMany, etc., in the documentation section of  
the Tapestry web site but I'm now having trouble finding them again.


Can the grid component handle hierarchical data?  For example, the  
brags page on WAG's website currently looks something like:


http://www.WacoAgilityGroup.org/WAG/Brags/

which is pulling data from three different tables.  The Members page  
currently looks like:


http://www.WacoAgilityGroup.org/WAG/Members/

It's currently a static page but I'm planning to move everything  
into the database, which will also involve a few tables.  If the  
grid component can handle hierarchical data, can someone point me  
towards some examples?





Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


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




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



T5 newbie books/tutorials and a couple of questions?

2009-01-02 Thread Kevin Monceaux

Tapestry Fans,

I've been tinkering with Tapestry a little bit off and on but am still 
pretty much a complete newbie.


In the past I've tried a few other Java frameworks, but a framework that 
requires more lines of XML configuration than lines of source code never 
made any sense to me.


I've also tinkered a bit with various "script" based frameworks like Ruby 
on Rails and Django.  At the moment I have two websites I act as webmaster 
for.  My personal web site is currently a mixture of PHP and PSP(Pascal 
Server Pages).  Actually I think PSP is now known as PWU - Pascal Web 
Units.  The second is a local canine agility group's web site which is 
currently Django based.  I'm considering converting both to Tapestry.


In the past I purchased the PDF version of Enjoying Web Development with 
Tapestry and went through part of it with Tapestry 4.  That was quite a 
while back and don't really remember any of it, which is probably a good 
thing considering how different Tapestry 5 is.


I've gone through the Tapestry 5 tutorial a few times and was thrilled to 
recently discover it now has some database examples.  The last page of the 
tutorial says:


... but Tapestry and this tutorial are a work in progress, so stay 
patient, and check out the other Tapestry tutorials and resources 
available on the Tapestry 5 home page.


I checked the Tapestry 5 home page but couldn't find any other tutorials. 
I'm anxiously awaiting other tutorials and/or additional sections of the 
current tutorial.


I purchased "Tapestry 5: Building Web Applications: A step-by-step guide 
to Java Web development with the developer-friendly Apache Tapestry 
framework" when I first heard about it but was underwhelmed, especially 
with it's lack of database examples.  Now that the tutorial has got me 
going with some database examples, I'm taking another look at that book. 
Will all the examples in the book work with the current version of 
Tapestry 5 or are there any changes I should be aware of?  Are there any 
other Tapestry 5 books available now or in the near future?


Where can I find some relational database examples?  I think I came across 
a couple of entity examples with annotations along the line of 
@ManyToMany, @OneToMany, etc., in the documentation section of the 
Tapestry web site but I'm now having trouble finding them again.


Can the grid component handle hierarchical data?  For example, the brags 
page on WAG's website currently looks something like:


http://www.WacoAgilityGroup.org/WAG/Brags/

which is pulling data from three different tables.  The Members page 
currently looks like:


http://www.WacoAgilityGroup.org/WAG/Members/

It's currently a static page but I'm planning to move everything into the 
database, which will also involve a few tables.  If the grid component can 
handle hierarchical data, can someone point me towards some examples?





Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!


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



Re: (newbie) Tapestry generated

2008-11-25 Thread Howard Lewis Ship
I'm thinking that the current fix is broken, and the right solution
may be that for HTML markup, always use EndTagStyle.REQUIRE. That
means a  in a template will render a , but other than
than those minor quibbles, it will work more in line with how
SGML/HTML treats empty elements.

On Tue, Nov 25, 2008 at 6:32 AM, Nicolas Charles <[EMAIL PROTECTED]> wrote:
> You could override the MarkupWriterFactory to prevent the abreviation of the
>  tag
> It should look like this
>
> public class XhtmlMarkupWriterFactoryImpl implements MarkupWriterFactory {
> private final String applicationCharset;
> private final MarkupModel xmlModel = new DefaultMarkupModel() {
> private final Set DONT_ABRV = new HashSet(Arrays.asList("b",
> "select"));
> @Override
>   public EndTagStyle getEndTagStyle(String element) {
>   boolean isDontAbr = DONT_ABRV.contains(element);
>   return isDontAbr ? EndTagStyle.REQUIRE : EndTagStyle.ABBREVIATE;
> }
> @Override
>   public boolean isXML() {
>   return true;
>   }
>   };
> }
>
> and alias it in the AppModule :
> public static void
> contributeAlias(Configuration>
> configuration,
>   @Inject @Symbol(SymbolConstants.CHARSET) final
> String applicationCharset) {
>   configuration.add(AliasContribution.create(MarkupWriterFactory.class,
>   new XhtmlMarkupWriterFactoryImpl(applicationCharset)));
>   }
>
>
> Note that i don't abbreviate the select either, for IE doesn't understand at
> all an empty 
>
> Regards
> Nicolas
>
> Peter Stavrinides wrote:
>>
>> Tapestry is meant to generate valid XHTML, which means the tag should be
>> closed, but due to a bug introduced recently it appears not to with certain
>> tags see:
>> https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be
>> fixed, in the meantime use a  instead, it will work... I use the
>> same rounded corner trick!
>>
>> cheers,
>> Peter
>>
>> - Original Message -
>> From: "akira" <[EMAIL PROTECTED]>
>> To: users@tapestry.apache.org
>> Sent: Tuesday, 25 November, 2008 2:53:51 AM GMT +02:00 Athens, Beirut,
>> Bucharest, Istanbul
>> Subject: (newbie) Tapestry generated 
>>
>> Hi, this is the first time i'm using Tapestry. I'm using a css tricky  to
>> make rounded corners, the css uses empty b (bold) to create the  rounded
>> corners, when Tapestry generates the html it creates the open  b but doesn't
>> create the closing b:
>> what i want: 
>> Tapestry generated code: 
>> There's someplace where i can configure Tapestry to generate close  tags
>> when there is nothing between the tags? TIA.
>>
>> -
>> 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: (newbie) Tapestry generated

2008-11-25 Thread akira
HI, thanks for the reply, i voted for the bug to be fixed and i'm  
using the  temporarily and i'm going to try Nicolas override  
method (didn't test on IE yet).
On Nov 25, 2008, at 11:33 PM, [EMAIL PROTECTED]  
wrote:



From: Peter Stavrinides <[EMAIL PROTECTED]>
Date: November 25, 2008 4:12:41 PM JST
To: Tapestry users 
Subject: Re: (newbie) Tapestry generated 


Tapestry is meant to generate valid XHTML, which means the tag  
should be closed, but due to a bug introduced recently it appears  
not to with certain tags see:
https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be  
fixed, in the meantime use a  instead, it will work... I use  
the same rounded corner trick!


cheers,
Peter


From: Nicolas Charles <[EMAIL PROTECTED]>
Date: November 25, 2008 11:32:27 PM JST
To: Tapestry users 
Subject: Re: (newbie) Tapestry generated 


You could override the MarkupWriterFactory to prevent the  
abreviation of the  tag

It should look like this

public class XhtmlMarkupWriterFactoryImpl implements  
MarkupWriterFactory {

private final String applicationCharset;
private final MarkupModel xmlModel = new DefaultMarkupModel()  
{  private final Set DONT_ABRV = new  
HashSet(Arrays.asList("b", "select"));

@Override
  public EndTagStyle getEndTagStyle(String element) {
  boolean isDontAbr = DONT_ABRV.contains(element);
  return isDontAbr ? EndTagStyle.REQUIRE :  
EndTagStyle.ABBREVIATE;

}
@Override
  public boolean isXML() {
  return true;
  }
  };
}

and alias it in the AppModule :
public static void  
contributeAlias 
(Configuration> configuration,
  @Inject  
@Symbol(SymbolConstants.CHARSET) final String applicationCharset) {
   
configuration.add(AliasContribution.create(MarkupWriterFactory.class,

  new XhtmlMarkupWriterFactoryImpl(applicationCharset)));
  }


Note that i don't abbreviate the select either, for IE doesn't  
understand at all an empty 


Regards
Nicolas




Re: (newbie) Tapestry generated

2008-11-25 Thread Nicolas Charles
You could override the MarkupWriterFactory to prevent the abreviation of 
the  tag

It should look like this

public class XhtmlMarkupWriterFactoryImpl implements MarkupWriterFactory {
  
   private final String applicationCharset;
  
   private final MarkupModel xmlModel = new DefaultMarkupModel() {   
   private final Set DONT_ABRV = new 
HashSet(Arrays.asList("b", "select"));
  
   @Override

   public EndTagStyle getEndTagStyle(String element) {
   boolean isDontAbr = DONT_ABRV.contains(element);
   return isDontAbr ? EndTagStyle.REQUIRE : EndTagStyle.ABBREVIATE;
  
   }
  
   @Override

   public boolean isXML() {
   return true;
   }
   };
}

and alias it in the AppModule :
public static void 
contributeAlias(Configuration> 
configuration,
   @Inject @Symbol(SymbolConstants.CHARSET) 
final String applicationCharset) {
   
configuration.add(AliasContribution.create(MarkupWriterFactory.class,

   new XhtmlMarkupWriterFactoryImpl(applicationCharset)));
   }


Note that i don't abbreviate the select either, for IE doesn't 
understand at all an empty 


Regards
Nicolas

Peter Stavrinides wrote:

Tapestry is meant to generate valid XHTML, which means the tag should be 
closed, but due to a bug introduced recently it appears not to with certain 
tags see:
https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be fixed, in the 
meantime use a  instead, it will work... I use the same rounded corner 
trick!

cheers,
Peter

- Original Message -
From: "akira" <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Tuesday, 25 November, 2008 2:53:51 AM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: (newbie) Tapestry generated 

Hi, this is the first time i'm using Tapestry. I'm using a css tricky  
to make rounded corners, the css uses empty b (bold) to create the  
rounded corners, when Tapestry generates the html it creates the open  
b but doesn't create the closing b:

what i want: 
Tapestry generated code: 
There's someplace where i can configure Tapestry to generate close  
tags when there is nothing between the tags? TIA.


-
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: (newbie) Tapestry generated

2008-11-24 Thread Peter Stavrinides
Tapestry is meant to generate valid XHTML, which means the tag should be 
closed, but due to a bug introduced recently it appears not to with certain 
tags see:
https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be fixed, in 
the meantime use a  instead, it will work... I use the same rounded 
corner trick!

cheers,
Peter

- Original Message -
From: "akira" <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Tuesday, 25 November, 2008 2:53:51 AM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: (newbie) Tapestry generated 

Hi, this is the first time i'm using Tapestry. I'm using a css tricky  
to make rounded corners, the css uses empty b (bold) to create the  
rounded corners, when Tapestry generates the html it creates the open  
b but doesn't create the closing b:
what i want: 
Tapestry generated code: 
There's someplace where i can configure Tapestry to generate close  
tags when there is nothing between the tags? TIA.

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



(newbie) Tapestry generated

2008-11-24 Thread akira
Hi, this is the first time i'm using Tapestry. I'm using a css tricky  
to make rounded corners, the css uses empty b (bold) to create the  
rounded corners, when Tapestry generates the html it creates the open  
b but doesn't create the closing b:

what i want: 
Tapestry generated code: 
There's someplace where i can configure Tapestry to generate close  
tags when there is nothing between the tags? TIA.


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



newbie- tapestry 5 internals?

2008-11-11 Thread hari ks
hi,
   I am totally new to tapestry 5. I did read the tapestry 5 building web 
applications book which is nice.  Was trying to go through the source code. 
There is tapestry filter ,IOC modules etc.. 
Is there any link explaining tapestry internal architecture? 

Also when running maven I had to use -Dmaven.skip.test=true  as it threw some 
errors.

Thanks & Regards,
Hari Sujathan 


  

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



Re: Newbie question about T5 urls

2008-09-03 Thread nick shaw
Great, that puts my mind at ease!

Thanks Filip

On Wed, Sep 3, 2008 at 9:22 PM, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:

> Nope, that's not possible anymore.
>
> The reason it worked in T4 is that friendly URLs were just "aliases" for
> the real Tapestry URLs. That's not how it is in T5.
>
> -Filip
>
>
> On 2008-09-03 14:33, nick shaw wrote:
>
>> Hi
>>
>> I am new to Tapestry5 and I have a question about page urls:
>>
>> I have a page called admin/ManageContent which I access with
>> http://server/context-root/admin/manageContent.
>>
>> I have now secured the page using Acegi so only admin users can access
>> pages
>> that match /admin/*, so typing the above url into my browser redirects me
>> to
>> the login page which is great. But is there any way a malicious user could
>> could bypass the acegi filter to access the page? I know it was possible
>> to
>> do something like this with T4's friendlyUrls feature.
>>
>> Nick
>>
>>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Newbie question about T5 urls

2008-09-03 Thread Filip S. Adamsen

Nope, that's not possible anymore.

The reason it worked in T4 is that friendly URLs were just "aliases" for 
the real Tapestry URLs. That's not how it is in T5.


-Filip

On 2008-09-03 14:33, nick shaw wrote:

Hi

I am new to Tapestry5 and I have a question about page urls:

I have a page called admin/ManageContent which I access with
http://server/context-root/admin/manageContent.

I have now secured the page using Acegi so only admin users can access pages
that match /admin/*, so typing the above url into my browser redirects me to
the login page which is great. But is there any way a malicious user could
could bypass the acegi filter to access the page? I know it was possible to
do something like this with T4's friendlyUrls feature.

Nick



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



Newbie question about T5 urls

2008-09-03 Thread nick shaw
Hi

I am new to Tapestry5 and I have a question about page urls:

I have a page called admin/ManageContent which I access with
http://server/context-root/admin/manageContent.

I have now secured the page using Acegi so only admin users can access pages
that match /admin/*, so typing the above url into my browser redirects me to
the login page which is great. But is there any way a malicious user could
could bypass the acegi filter to access the page? I know it was possible to
do something like this with T4's friendlyUrls feature.

Nick


Re: Complete newbie issue: Tapestry tutorial inside Eclipse?

2008-08-20 Thread Toby Hobson
Not exactly an answer to your problem but I debug "mvn jetty:run" through
eclipse as an external tool and it works nicely. If you can't get the jetty
launcher to work properly you might want to try this

Toby

2008/8/20 torput <[EMAIL PROTECTED]>

>
> I was trying this tutorial:
> http://tapestry.apache.org/tapestry5/tutorial1/env.html
>
> But with runjettyrun and also newer versions of other required tools.
>
> When I try to run the tutorial1 inside Eclipse, this is what I get. Any
> idea
> what I should do?
>
>
> [INFO] mortbay.log Logging to
> org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via
> org.mortbay.log.Slf4jLog
> [INFO] mortbay.log jetty-6.1.6
> [ERROR] mortbay.log failed app
> java.lang.RuntimeException: Error invoking service binder method
> org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:22): Unresolved compilation problem:
>
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
> at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
> at
>
> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
>
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at
>
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at runjettyrun.Bootstrap.main(Bootstrap.java:76)
> Caused by: java.lang.Error: Unresolved compilation problem:
>
> at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:390)
> ... 16 more
> [ERROR] mortbay.log Failed startup of context
> [EMAIL PROTECTED]/,src/main/webapp}
> java.lang.RuntimeException: Error invoking service binder method
> org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:22): Unresolved compilation problem:
>
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
> at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
> at
>
> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
>
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at
>
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at runjettyrun.Bootstrap.main(Bootstrap.java:76)
> Caused by: java.lang.Error: Unresolved compilation problem:
>
> at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.inv

Complete newbie issue: Tapestry tutorial inside Eclipse?

2008-08-20 Thread torput

I was trying this tutorial:
http://tapestry.apache.org/tapestry5/tutorial1/env.html

But with runjettyrun and also newer versions of other required tools.

When I try to run the tutorial1 inside Eclipse, this is what I get. Any idea
what I should do?


[INFO] mortbay.log Logging to
org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via
org.mortbay.log.Slf4jLog
[INFO] mortbay.log jetty-6.1.6
[ERROR] mortbay.log failed app
java.lang.RuntimeException: Error invoking service binder method
org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
AppModule.java:22): Unresolved compilation problem:

at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
at
org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at runjettyrun.Bootstrap.main(Bootstrap.java:76)
Caused by: java.lang.Error: Unresolved compilation problem:

at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:390)
... 16 more
[ERROR] mortbay.log Failed startup of context
[EMAIL PROTECTED]/,src/main/webapp}
java.lang.RuntimeException: Error invoking service binder method
org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
AppModule.java:22): Unresolved compilation problem:

at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
at
org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at runjettyrun.Bootstrap.main(Bootstrap.java:76)
Caused by: java.lang.Error: Unresolved compilation problem:

at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:390)
... 16 more
[INFO] mortbay.log Started [EMAIL PROTECTED]:8080
-- 
View this message in context: 
http://www.nabble.com/Complete-newbie-issue%3A-Tapestry-tutorial-inside-Eclipse--tp19064329p19064329.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: Newbie

2008-06-04 Thread Menno Kok
Adam,

Who Emanuel is? You tell me my english is poor? I know so do not tell me. Many 
tapestry people is friendly so please be friendly too.

Menno


- Original Message 
From: Adam Zimowski <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Wednesday, June 4, 2008 3:01:45 AM
Subject: Re: Newbie

Emanuel heheh This is a poor impersination of a non-native English
speaker. It's still very easy to pick out your style, and figure out
it's you. Only you provoke people with classic trollish attacks such
as:

, can you [...]?
, why [...]?

so seeing this:

"Sven, can you answer my question?"

we all know you came right back since your old gmail account was disabled.


On Tue, Jun 3, 2008 at 11:08 AM, Richard Clark <[EMAIL PROTECTED]> wrote:
> Hello Menno,
>
> I have been using Tapestry for over three years,  starting with
> Tapestry 3.  I am still maintaining  one application on Tapestry 3 and
> a few applications on Tapestry 4;  I am also starting development with
> Tapestry 5.  Most of what I learned with one version applies to the
> next.
>
>  I understand your worry that a future "Tapestry 6"  might be
> incompatible with Tapestry 5  since, in the past, each new version of
> Tapestry has not been compatible with the previous version. Howard
> designed Tapestry 5  so he (and others) can update it without breaking
> backward compatibility.  Some parts of Tapestry are now considered
> "private",  and can change in incompatible ways, while the "public"
> interfaces  will stay the same even as Tapestry grows and improves.
>
>  In my opinion, Tapestry is well worth learning and will help you
> write high-quality Web applications very quickly.  it is different
> from anything else out there, which means that some people will not
> like it, but in my experience is often the best tool for the job.
>
> Regards,
>
> ...Richard
>
>  P.S. I have used YUI with both Tapestry 3 and 4.  Tapestry's  design
> makes it easy to add a library such as YUI  to your application.
>
> -
> 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: Newbie

2008-06-03 Thread Adam Zimowski
Emanuel heheh This is a poor impersination of a non-native English
speaker. It's still very easy to pick out your style, and figure out
it's you. Only you provoke people with classic trollish attacks such
as:

, can you [...]?
, why [...]?

so seeing this:

"Sven, can you answer my question?"

we all know you came right back since your old gmail account was disabled.


On Tue, Jun 3, 2008 at 11:08 AM, Richard Clark <[EMAIL PROTECTED]> wrote:
> Hello Menno,
>
> I have been using Tapestry for over three years,  starting with
> Tapestry 3.  I am still maintaining  one application on Tapestry 3 and
> a few applications on Tapestry 4;  I am also starting development with
> Tapestry 5.  Most of what I learned with one version applies to the
> next.
>
>  I understand your worry that a future "Tapestry 6"  might be
> incompatible with Tapestry 5  since, in the past, each new version of
> Tapestry has not been compatible with the previous version. Howard
> designed Tapestry 5  so he (and others) can update it without breaking
> backward compatibility.  Some parts of Tapestry are now considered
> "private",  and can change in incompatible ways, while the "public"
> interfaces  will stay the same even as Tapestry grows and improves.
>
>  In my opinion, Tapestry is well worth learning and will help you
> write high-quality Web applications very quickly.  it is different
> from anything else out there, which means that some people will not
> like it, but in my experience is often the best tool for the job.
>
> Regards,
>
> ...Richard
>
>  P.S. I have used YUI with both Tapestry 3 and 4.  Tapestry's  design
> makes it easy to add a library such as YUI  to your application.
>
> -
> 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: Newbie

2008-06-03 Thread Richard Clark
Hello Menno,

I have been using Tapestry for over three years,  starting with
Tapestry 3.  I am still maintaining  one application on Tapestry 3 and
a few applications on Tapestry 4;  I am also starting development with
Tapestry 5.  Most of what I learned with one version applies to the
next.

 I understand your worry that a future "Tapestry 6"  might be
incompatible with Tapestry 5  since, in the past, each new version of
Tapestry has not been compatible with the previous version. Howard
designed Tapestry 5  so he (and others) can update it without breaking
backward compatibility.  Some parts of Tapestry are now considered
"private",  and can change in incompatible ways, while the "public"
interfaces  will stay the same even as Tapestry grows and improves.

 In my opinion, Tapestry is well worth learning and will help you
write high-quality Web applications very quickly.  it is different
from anything else out there, which means that some people will not
like it, but in my experience is often the best tool for the job.

Regards,

...Richard

 P.S. I have used YUI with both Tapestry 3 and 4.  Tapestry's  design
makes it easy to add a library such as YUI  to your application.

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



Re: Newbie

2008-06-03 Thread Sven Homburg
i have tried to find somthing about tapestry 6 with "tapestry" search query
wich version of google are using

2008/6/3 Menno Kok <[EMAIL PROTECTED]>:

> I search "tapestry" inside google and get many result and read many many of
> them.
> Sven, can you answer my question? I am now afraid with tapestry. Help me to
> be afraid not. I like tapestry a bit and I want to use tapestry.
>
> Thank you.
>
> Menno
>
>
> - Original Message 
> From: Sven Homburg <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Tuesday, June 3, 2008 3:50:13 PM
> Subject: Re: Newbie
>
> let me know your google query string
>
> 2008/6/3 Menno Kok <[EMAIL PROTECTED]>:
>
> > Hello men and women,
> >
> > I saw many google search result about tapestry that maked me nervos. Is
> it
> > true that tapetsry 6 would be not compatible with other tapestry
> versions?
> > I want to know before I spend many times with learning tapestry.
> > Forgive me my bad english, please.
> >
> > Thank you,
> >
> > Menno
> >
> >
> > - Original Message 
> > From: Menno Kok <[EMAIL PROTECTED]>
> > To: users@tapestry.apache.org
> > Sent: Tuesday, June 3, 2008 1:53:29 PM
> > Subject: Newbie
> >
> > Hi,
> >
> > I have see Tapestry and quite like it. Though some people no like it.
> > Is there plans to integrate Tapestry with YUI?
> >
> > Thanks
> >
> > Menno
> >
> >
> >
> >
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>
>
>
>
>



-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


RE: Newbie

2008-06-03 Thread Blower, Andy
Menno,

No one knows whether Tapestry 6 will be compatible with Tapestry 5 because it 
doesn't exist, and is not even planned. According to Howard Lewis Ship 
(Tapestry creator) he has no plans to make Tapestry 6, and that's all anyone 
has to go on.

The way I have of looking at the major version incompatibilities of Tapestry 
3->4->5 is that it driven by improvements and is much better than 'nearly 
compatible' versions touted as backward compatible (quite common) because you 
know what you're getting into beforehand.

My advice is to use Tapestry 5 if it suits your needs better than anything 
else, and not if some other framework is more suited to you and your needs.

Cheers,

Andy.
(new to Tapestry myself - 2 months now)

> -Original Message-
> From: Menno Kok [mailto:[EMAIL PROTECTED]
> Sent: 03 June 2008 15:11
> To: Tapestry users
> Subject: Re: Newbie
>
> I search "tapestry" inside google and get many result and read many
> many of them.
> Sven, can you answer my question? I am now afraid with tapestry. Help
> me to be afraid not. I like tapestry a bit and I want to use tapestry.
>
> Thank you.
>
> Menno
>
>
> - Original Message 
> From: Sven Homburg <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Tuesday, June 3, 2008 3:50:13 PM
> Subject: Re: Newbie
>
> let me know your google query string
>
> 2008/6/3 Menno Kok <[EMAIL PROTECTED]>:
>
> > Hello men and women,
> >
> > I saw many google search result about tapestry that maked me nervos.
> Is it
> > true that tapetsry 6 would be not compatible with other tapestry
> versions?
> > I want to know before I spend many times with learning tapestry.
> > Forgive me my bad english, please.
> >
> > Thank you,
> >
> > Menno
> >
> >
> > - Original Message 
> > From: Menno Kok <[EMAIL PROTECTED]>
> > To: users@tapestry.apache.org
> > Sent: Tuesday, June 3, 2008 1:53:29 PM
> > Subject: Newbie
> >
> > Hi,
> >
> > I have see Tapestry and quite like it. Though some people no like it.
> > Is there plans to integrate Tapestry with YUI?
> >
> > Thanks
> >
> > Menno
> >
> >
> >
> >
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>
>


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



Re: Newbie

2008-06-03 Thread Menno Kok
Mr. Daniel,

You laugh my name and you laugh mine english.
Fuck you bastard.





- Original Message 
From: Daniel Jue <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Tuesday, June 3, 2008 4:11:17 PM
Subject: Re: Newbie

Dear Kok Menno,

Tapestry 6 is perfectly compatible with Tapestry 5, I am using it now.
It's just one class file right now, but I like to imagine that it's
adding heuristic artificial intelligence to my T5 application.  It
makes error 403 pages say "I'm sorry Daniel, I can't let you do that."
You can always dream, can't you?
But you seemed to have missed the point, because there is no Tapestry
6.  Tapestry 5 is the final release of Tapestry.  I hope I have
unmaked you nervos. ;-)


On Tue, Jun 3, 2008 at 9:50 AM, Sven Homburg <[EMAIL PROTECTED]> wrote:
> let me know your google query string
>
> 2008/6/3 Menno Kok <[EMAIL PROTECTED]>:
>
>> Hello men and women,
>>
>> I saw many google search result about tapestry that maked me nervos. Is it
>> true that tapetsry 6 would be not compatible with other tapestry versions?
>> I want to know before I spend many times with learning tapestry.
>> Forgive me my bad english, please.
>>
>> Thank you,
>>
>> Menno
>>
>>
>> - Original Message 
>> From: Menno Kok <[EMAIL PROTECTED]>
>> To: users@tapestry.apache.org
>> Sent: Tuesday, June 3, 2008 1:53:29 PM
>> Subject: Newbie
>>
>> Hi,
>>
>> I have see Tapestry and quite like it. Though some people no like it.
>> Is there plans to integrate Tapestry with YUI?
>>
>> Thanks
>>
>> Menno
>>
>>
>>
>>
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>

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


  

Re: Newbie

2008-06-03 Thread Daniel Jue
Dear Kok Menno,

Tapestry 6 is perfectly compatible with Tapestry 5, I am using it now.
 It's just one class file right now, but I like to imagine that it's
adding heuristic artificial intelligence to my T5 application.  It
makes error 403 pages say "I'm sorry Daniel, I can't let you do that."
 You can always dream, can't you?
But you seemed to have missed the point, because there is no Tapestry
6.  Tapestry 5 is the final release of Tapestry.  I hope I have
unmaked you nervos. ;-)


On Tue, Jun 3, 2008 at 9:50 AM, Sven Homburg <[EMAIL PROTECTED]> wrote:
> let me know your google query string
>
> 2008/6/3 Menno Kok <[EMAIL PROTECTED]>:
>
>> Hello men and women,
>>
>> I saw many google search result about tapestry that maked me nervos. Is it
>> true that tapetsry 6 would be not compatible with other tapestry versions?
>> I want to know before I spend many times with learning tapestry.
>> Forgive me my bad english, please.
>>
>> Thank you,
>>
>> Menno
>>
>>
>> - Original Message 
>> From: Menno Kok <[EMAIL PROTECTED]>
>> To: users@tapestry.apache.org
>> Sent: Tuesday, June 3, 2008 1:53:29 PM
>> Subject: Newbie
>>
>> Hi,
>>
>> I have see Tapestry and quite like it. Though some people no like it.
>> Is there plans to integrate Tapestry with YUI?
>>
>> Thanks
>>
>> Menno
>>
>>
>>
>>
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>

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



Re: Newbie

2008-06-03 Thread Menno Kok
I search "tapestry" inside google and get many result and read many many of 
them.
Sven, can you answer my question? I am now afraid with tapestry. Help me to be 
afraid not. I like tapestry a bit and I want to use tapestry.

Thank you.

Menno


- Original Message 
From: Sven Homburg <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Tuesday, June 3, 2008 3:50:13 PM
Subject: Re: Newbie

let me know your google query string

2008/6/3 Menno Kok <[EMAIL PROTECTED]>:

> Hello men and women,
>
> I saw many google search result about tapestry that maked me nervos. Is it
> true that tapetsry 6 would be not compatible with other tapestry versions?
> I want to know before I spend many times with learning tapestry.
> Forgive me my bad english, please.
>
> Thank you,
>
> Menno
>
>
> - Original Message 
> From: Menno Kok <[EMAIL PROTECTED]>
> To: users@tapestry.apache.org
> Sent: Tuesday, June 3, 2008 1:53:29 PM
> Subject: Newbie
>
> Hi,
>
> I have see Tapestry and quite like it. Though some people no like it.
> Is there plans to integrate Tapestry with YUI?
>
> Thanks
>
> Menno
>
>
>
>



-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com



  

AW: Newbie

2008-06-03 Thread Martin Kersten
:-) 

-Ursprüngliche Nachricht-
Von: Menno Kok [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 3. Juni 2008 15:45
An: Tapestry users
Betreff: Re: Newbie

Hello men and women,

I saw many google search result about tapestry that maked me nervos. Is it true 
that tapetsry 6 would be not compatible with other tapestry versions?
I want to know before I spend many times with learning tapestry.
Forgive me my bad english, please.

Thank you,

Menno


- Original Message 
From: Menno Kok <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 1:53:29 PM
Subject: Newbie

Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno


  

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



Re: Newbie

2008-06-03 Thread Sven Homburg
let me know your google query string

2008/6/3 Menno Kok <[EMAIL PROTECTED]>:

> Hello men and women,
>
> I saw many google search result about tapestry that maked me nervos. Is it
> true that tapetsry 6 would be not compatible with other tapestry versions?
> I want to know before I spend many times with learning tapestry.
> Forgive me my bad english, please.
>
> Thank you,
>
> Menno
>
>
> - Original Message 
> From: Menno Kok <[EMAIL PROTECTED]>
> To: users@tapestry.apache.org
> Sent: Tuesday, June 3, 2008 1:53:29 PM
> Subject: Newbie
>
> Hi,
>
> I have see Tapestry and quite like it. Though some people no like it.
> Is there plans to integrate Tapestry with YUI?
>
> Thanks
>
> Menno
>
>
>
>



-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: Newbie

2008-06-03 Thread Menno Kok
Hello men and women,

I saw many google search result about tapestry that maked me nervos. Is it true 
that tapetsry 6 would be not compatible with other tapestry versions?
I want to know before I spend many times with learning tapestry.
Forgive me my bad english, please.

Thank you,

Menno


- Original Message 
From: Menno Kok <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Tuesday, June 3, 2008 1:53:29 PM
Subject: Newbie

Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno


  

Newbie

2008-06-03 Thread Menno Kok
Hi,

I have see Tapestry and quite like it. Though some people no like it.
Is there plans to integrate Tapestry with YUI?

Thanks

Menno



  

Re: Newbie Question about services and modules

2008-04-18 Thread Michael Szalay
Thanks a lot for your hints.

The problem was the name of the servlet filter and the build method, which
has to be static.

Regards

Michael


On Thu, Apr 17, 2008 at 10:01 PM, Igor Drobiazko <[EMAIL PROTECTED]>
wrote:

> Method bind shoould be static
>
> On Thu, Apr 17, 2008 at 9:56 PM, Michael Szalay <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all
> >
> > I tried to build my first service, but its not found within the
> > registration
> >
> > I try to lookup it in the page:
> >
> >  @Inject
> >private QuizService quizService;
> >
> > There is a Module class which should build my service:
> >
> > package com.szalay.quiz.services;
> >
> > import org.apache.tapestry.ioc.ServiceBinder;
> >
> > /**
> >  *
> >  * @author michael
> >  */
> > public class QuizModule {
> >
> >/**
> > *  this is called by tapestry at application startup
> > *
> > * @param binder
> > */
> >public void bind(ServiceBinder binder) {
> >binder.bind(QuizService.class,
> > QuizServiceImpl.class).scope("singleton");
> >}
> > }
> >
> > QuizService:
> >
> > package com.szalay.quiz.services;
> >
> > import com.szalay.quiz.entity.Quiz;
> > import java.util.Collection;
> >
> > /**
> >  *
> >  * @author michael
> >  */
> > public interface QuizService {
> >
> >public Collection getLatestQuiz(int number) throws Exception;
> >
> >public Integer getNumberOfQuizes() throws Exception;
> > }
> >
> >
> > QuizServiceImpl:
> >
> > package com.szalay.quiz.services;
> >
> > import com.szalay.quiz.entity.Quiz;
> > import java.util.Collection;
> >
> > /**
> >  *
> >  * @author michael
> >  */
> > public class QuizServiceImpl implements QuizService {
> >
> >public Collection getLatestQuiz(int number) throws Exception {
> >...
> >}
> >
> >public Integer getNumberOfQuizes() throws Exception {
> >...
> >}
> >
> > }
> >
> >
> > But this gets the error:
> >
> > Caused by: java.lang.RuntimeException: No service implements the
> interface
> > com.szalay.quiz.services.QuizService.
> >at
> >
> >
> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
> >at
> >
> >
> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
> >at
> >
> >
> org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
> >
> >
> > here is my web.xml
> >
> > 
> > http://java.sun.com/xml/ns/javaee";
> > xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> > http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
> >
> >
> >
> >tapestry.app-package
> >com.szalay.quiz
> >
> >
> >app
> >org.apache.tapestry.TapestryFilter
> >
> >
> >app
> >/*
> >
> >
> >
> >
> >
> >30
> >
> >
> >
> > 
> >
> >
> >
> > I have not idea about what is wrong. Anyone of you?
> >
> > Regards
> >
> > Michael
> >
>
>
>
> --
> Best regards,
>
> Igor Drobiazko
>


Re: Newbie Question about services and modules

2008-04-17 Thread Chris Lewis
Sorry I missed the filter-mapping part, which I believe needs to match
the filter name. So you should have:

...


Quiz
org.apache.tapestry.TapestryFilter


Quiz
/*


...

Chris Lewis wrote:
> Hi Michael,
>
> I believe the problem is your filter name in web.xml. See this part:
>
> ...
>
> 
> app
> org.apache.tapestry.TapestryFilter
> 
>
> ...
>
> If I remember correctly T5 uses the filter name to deduce your
> application module. By default (using the maven quickstart archetype)
> this is named 'app', and a default module is created for you named
> AppModule.java in the services directory. My guess is you renamed your
> module but did not rename your filter (I've done this a couple of times).
>
> chris
>
> Michael Szalay wrote:
>   
>> Hi all
>>
>> I tried to build my first service, but its not found within the registration
>>
>> I try to lookup it in the page:
>>
>>  @Inject
>> private QuizService quizService;
>>
>> There is a Module class which should build my service:
>>
>> package com.szalay.quiz.services;
>>
>> import org.apache.tapestry.ioc.ServiceBinder;
>>
>> /**
>>  *
>>  * @author michael
>>  */
>> public class QuizModule {
>>
>> /**
>>  *  this is called by tapestry at application startup
>>  *
>>  * @param binder
>>  */
>> public void bind(ServiceBinder binder) {
>> binder.bind(QuizService.class,
>> QuizServiceImpl.class).scope("singleton");
>> }
>> }
>>
>> QuizService:
>>
>> package com.szalay.quiz.services;
>>
>> import com.szalay.quiz.entity.Quiz;
>> import java.util.Collection;
>>
>> /**
>>  *
>>  * @author michael
>>  */
>> public interface QuizService {
>>
>> public Collection getLatestQuiz(int number) throws Exception;
>>
>> public Integer getNumberOfQuizes() throws Exception;
>> }
>>
>>
>> QuizServiceImpl:
>>
>> package com.szalay.quiz.services;
>>
>> import com.szalay.quiz.entity.Quiz;
>> import java.util.Collection;
>>
>> /**
>>  *
>>  * @author michael
>>  */
>> public class QuizServiceImpl implements QuizService {
>>
>> public Collection getLatestQuiz(int number) throws Exception {
>> ...
>> }
>>
>> public Integer getNumberOfQuizes() throws Exception {
>> ...
>> }
>>
>> }
>>
>>
>> But this gets the error:
>>
>> Caused by: java.lang.RuntimeException: No service implements the interface
>> com.szalay.quiz.services.QuizService.
>> at
>> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
>> at
>> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
>> at
>> org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
>>
>>
>> here is my web.xml
>>
>> 
>> http://java.sun.com/xml/ns/javaee"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
>> http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>>
>> 
>> 
>> tapestry.app-package
>> com.szalay.quiz
>> 
>> 
>> app
>> org.apache.tapestry.TapestryFilter
>> 
>> 
>> app
>> /*
>> 
>>
>> 
>> 
>> 
>> 30
>> 
>> 
>>
>> 
>>
>>
>>
>> I have not idea about what is wrong. Anyone of you?
>>
>> Regards
>>
>> Michael
>>
>>   
>> 
>
>   

-- 
http://thegodcode.net



Re: Newbie Question about services and modules

2008-04-17 Thread Chris Lewis
Hi Michael,

I believe the problem is your filter name in web.xml. See this part:

...


app
org.apache.tapestry.TapestryFilter


...

If I remember correctly T5 uses the filter name to deduce your
application module. By default (using the maven quickstart archetype)
this is named 'app', and a default module is created for you named
AppModule.java in the services directory. My guess is you renamed your
module but did not rename your filter (I've done this a couple of times).

chris

Michael Szalay wrote:
> Hi all
>
> I tried to build my first service, but its not found within the registration
>
> I try to lookup it in the page:
>
>  @Inject
> private QuizService quizService;
>
> There is a Module class which should build my service:
>
> package com.szalay.quiz.services;
>
> import org.apache.tapestry.ioc.ServiceBinder;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizModule {
>
> /**
>  *  this is called by tapestry at application startup
>  *
>  * @param binder
>  */
> public void bind(ServiceBinder binder) {
> binder.bind(QuizService.class,
> QuizServiceImpl.class).scope("singleton");
> }
> }
>
> QuizService:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public interface QuizService {
>
> public Collection getLatestQuiz(int number) throws Exception;
>
> public Integer getNumberOfQuizes() throws Exception;
> }
>
>
> QuizServiceImpl:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizServiceImpl implements QuizService {
>
> public Collection getLatestQuiz(int number) throws Exception {
> ...
> }
>
> public Integer getNumberOfQuizes() throws Exception {
> ...
> }
>
> }
>
>
> But this gets the error:
>
> Caused by: java.lang.RuntimeException: No service implements the interface
> com.szalay.quiz.services.QuizService.
> at
> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
> at
> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
> at
> org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
>
>
> here is my web.xml
>
> 
> http://java.sun.com/xml/ns/javaee"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
> 
> 
> tapestry.app-package
> com.szalay.quiz
> 
> 
> app
> org.apache.tapestry.TapestryFilter
> 
> 
> app
> /*
> 
>
> 
> 
> 
> 30
> 
> 
>
> 
>
>
>
> I have not idea about what is wrong. Anyone of you?
>
> Regards
>
> Michael
>
>   

-- 
http://thegodcode.net


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



Re: Newbie Question about services and modules

2008-04-17 Thread Peter Beshai
In your AppModule class you probably need to add
@SubModule({QuizModule.class}) above the class definition.

e.g.
@SubModule( { DAOModule.class })
public class AppModule
{
...
}

Also, you may want to make the bind method static, unless you're using
instance variables with it.

Peter Beshai

On Thu, Apr 17, 2008 at 3:56 PM, Michael Szalay <[EMAIL PROTECTED]>
wrote:

> Hi all
>
> I tried to build my first service, but its not found within the
> registration
>
> I try to lookup it in the page:
>
>  @Inject
>private QuizService quizService;
>
> There is a Module class which should build my service:
>
> package com.szalay.quiz.services;
>
> import org.apache.tapestry.ioc.ServiceBinder;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizModule {
>
>/**
> *  this is called by tapestry at application startup
> *
> * @param binder
> */
>public void bind(ServiceBinder binder) {
>binder.bind(QuizService.class,
> QuizServiceImpl.class).scope("singleton");
>}
> }
>
> QuizService:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public interface QuizService {
>
>public Collection getLatestQuiz(int number) throws Exception;
>
>public Integer getNumberOfQuizes() throws Exception;
> }
>
>
> QuizServiceImpl:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizServiceImpl implements QuizService {
>
>public Collection getLatestQuiz(int number) throws Exception {
>...
>}
>
>public Integer getNumberOfQuizes() throws Exception {
>...
>}
>
> }
>
>
> But this gets the error:
>
> Caused by: java.lang.RuntimeException: No service implements the interface
> com.szalay.quiz.services.QuizService.
>at
>
> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
>at
>
> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
>at
>
> org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
>
>
> here is my web.xml
>
> 
> http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
>
>
>tapestry.app-package
>com.szalay.quiz
>
>
>app
>org.apache.tapestry.TapestryFilter
>
>
>app
>/*
>
>
>
>
>
>30
>
>
>
> 
>
>
>
> I have not idea about what is wrong. Anyone of you?
>
> Regards
>
> Michael
>


Re: Newbie Question about services and modules

2008-04-17 Thread Igor Drobiazko
Method bind shoould be static

On Thu, Apr 17, 2008 at 9:56 PM, Michael Szalay <[EMAIL PROTECTED]>
wrote:

> Hi all
>
> I tried to build my first service, but its not found within the
> registration
>
> I try to lookup it in the page:
>
>  @Inject
>private QuizService quizService;
>
> There is a Module class which should build my service:
>
> package com.szalay.quiz.services;
>
> import org.apache.tapestry.ioc.ServiceBinder;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizModule {
>
>/**
> *  this is called by tapestry at application startup
> *
> * @param binder
> */
>public void bind(ServiceBinder binder) {
>binder.bind(QuizService.class,
> QuizServiceImpl.class).scope("singleton");
>}
> }
>
> QuizService:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public interface QuizService {
>
>public Collection getLatestQuiz(int number) throws Exception;
>
>public Integer getNumberOfQuizes() throws Exception;
> }
>
>
> QuizServiceImpl:
>
> package com.szalay.quiz.services;
>
> import com.szalay.quiz.entity.Quiz;
> import java.util.Collection;
>
> /**
>  *
>  * @author michael
>  */
> public class QuizServiceImpl implements QuizService {
>
>public Collection getLatestQuiz(int number) throws Exception {
>...
>}
>
>public Integer getNumberOfQuizes() throws Exception {
>...
>}
>
> }
>
>
> But this gets the error:
>
> Caused by: java.lang.RuntimeException: No service implements the interface
> com.szalay.quiz.services.QuizService.
>at
>
> org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
>at
>
> org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
>at
>
> org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
>
>
> here is my web.xml
>
> 
> http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
>
>
>tapestry.app-package
>com.szalay.quiz
>
>
>app
>org.apache.tapestry.TapestryFilter
>
>
>app
>/*
>
>
>
>
>
>30
>
>
>
> 
>
>
>
> I have not idea about what is wrong. Anyone of you?
>
> Regards
>
> Michael
>



-- 
Best regards,

Igor Drobiazko


Newbie Question about services and modules

2008-04-17 Thread Michael Szalay
Hi all

I tried to build my first service, but its not found within the registration

I try to lookup it in the page:

 @Inject
private QuizService quizService;

There is a Module class which should build my service:

package com.szalay.quiz.services;

import org.apache.tapestry.ioc.ServiceBinder;

/**
 *
 * @author michael
 */
public class QuizModule {

/**
 *  this is called by tapestry at application startup
 *
 * @param binder
 */
public void bind(ServiceBinder binder) {
binder.bind(QuizService.class,
QuizServiceImpl.class).scope("singleton");
}
}

QuizService:

package com.szalay.quiz.services;

import com.szalay.quiz.entity.Quiz;
import java.util.Collection;

/**
 *
 * @author michael
 */
public interface QuizService {

public Collection getLatestQuiz(int number) throws Exception;

public Integer getNumberOfQuizes() throws Exception;
}


QuizServiceImpl:

package com.szalay.quiz.services;

import com.szalay.quiz.entity.Quiz;
import java.util.Collection;

/**
 *
 * @author michael
 */
public class QuizServiceImpl implements QuizService {

public Collection getLatestQuiz(int number) throws Exception {
...
}

public Integer getNumberOfQuizes() throws Exception {
...
}

}


But this gets the error:

Caused by: java.lang.RuntimeException: No service implements the interface
com.szalay.quiz.services.QuizService.
at
org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
at
org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45)
at
org.apache.tapestry.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)


here is my web.xml


http://java.sun.com/xml/ns/javaee"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>



tapestry.app-package
com.szalay.quiz


app
org.apache.tapestry.TapestryFilter


app
/*





30







I have not idea about what is wrong. Anyone of you?

Regards

Michael


Re: T5, newbie: [Solved] Component parameter passing problems

2008-04-04 Thread Alec Leamas
Thanks to Josh this problem has been solved. The culprit was how I 
invoked the components. I was using  


I should use 

Thanks for all help! And a special thank to Josh!

--Alec


Davor Hrg wrote:

how is getRows declared in your page class ?

  

OK, thanks...

In my page, I have 

The columns argument, a List is just fine.
The rows argument, a List is the problem.

The page has a List getRows() which is verified.

Looking in MyComponent.java, I have

   @Parameter
private List  rows;

@Parameter
private List columns;

public String getSomethingStrange()
{
return rows.get(0).get( "mail" );
}

The latter getter fails. The debug info is from a breakpoint inside this
method. The error I get is a classcast error "java.lang.String cannot be
cast to ...MyMap" If I change the index to 1, there  an error "Caused
by: Index: 1, Size: 1" i. e., index out of bounds.

Davor Hrg wrote:


Tapestry support for Java generics is very limited,
you need a value encoder to make this work,

also, add more details on who calls what... so more is known
of the problem you are trying to solve.


Davor Hrg

On Tue, Apr 1, 2008 at 1:43 PM, Alec Leamas <[EMAIL PROTECTED]>
  

wrote:


I have problems passing my own datatype(s) to my own component. The
component takes two parameters, one List and one List.
MyMap is declared as MyMap extends TreeMap {...}.

The first parameter, a list of strings arrives safely to my component.
However, the other one, seems to be mixed up: when I try to access an
element in my List, it turns out that Tapestry (nothing else
involved)  have filled  this list with String items, not the expected
MyMap items. In the end, there is a class cast exception when trying to
access the MyMap items as Maps.

In the Eclipse debugger, it seems that the value of the List
instance variable is a single string holding what looks like  the
serialized value of my List  list. The start is
"[{key=value,key=value...

I've tried to contribute coercions between MyMap<->Map, but this desn't
seem to help (?).

Basically, I'm stucked unless I write everything in several big pages
with duplicated code. Don't really want to do that. :-(

Any hints out there?

--alec

PS  Version: 5.0.11 DS





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



  1   2   3   >