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' 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.ap

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



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
> 



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


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


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

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


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



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



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



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]



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]



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



  

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


  

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


Re: Newbie,T5: Grid limitations (long).

2008-03-25 Thread Howard Lewis Ship
There's certainly an issue that if the Grid component grew to
encompass every possible user's most remote needs, the end result
would not be useable by anybody (a Grid component with 27 required
parameters of which six are detailed interfaces, etc., etc.).  The
point is, the common components need to hit a 90/10 rule of
usefulness.  A secondary goal would be to make the underlying
components of Grid (GridRows, GridColumns, GridPager) easy to
reuse/extend for a more application-specific Grid implementation.

On Tue, Mar 25, 2008 at 2:41 PM, Alec Leamas <[EMAIL PROTECTED]> wrote:
> Jesper Zedlitz wrote:
>  > Alec Leamas wrote:
>  >
>  >> - The paging policy with a fixed number of numbered pages is hardcoded
>  >> and can't be changed. Other policies e. g., overlap between pages
>  >>
>  >>
>  > Isn't that something you can handle inside your own GridDataSource? With 
> the
>  > page number, the number of results per page, the number of overlapping
>  > items (ok, you need a separate parameter for that) it should be possible
>  > return the correct entries.
>  >
>  >
>  Obviouly, I was not clear about this. It's about starting a page at just
>  any item, not just on even page boundaries as defined by the page size.
>  See
>  
> http://www.nabble.com/T5%2C-newbie%3A-Grid-use-w-dynamic-columns-td16080438.html
>
> >> - It is not possible to change the overall rendering of a row e. g,, to
>  >> to embed each ... in a  
>  >>
>  >>
>  > That is not valid XHTML 1.0 Strict
>  >
>  > I do not know enough about the Grid component to write something about the
>  > other questions. What I miss is the "columns" attribute from T4's Table
>  > component..
>  Yep, when coming from T4 you miss the column component.
>
>   Anyway, I don't want to write bad HTML. So after some more RTFM I've
>  concluded that the microformat issue (the ... above) can be
>  resolved by the rowclass attribute, together with som explicit column
>  fomatting as described in the manual.
>
>  One item of four resolved. Thanks!
>
>  --alec
>
>
>
>  -
>  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,T5: Grid limitations (long).

2008-03-25 Thread Alec Leamas

Jesper Zedlitz wrote:

Alec Leamas wrote:
  

- The paging policy with a fixed number of numbered pages is hardcoded
and can't be changed. Other policies e. g., overlap between pages 



Isn't that something you can handle inside your own GridDataSource? With the
page number, the number of results per page, the number of overlapping
items (ok, you need a separate parameter for that) it should be possible
return the correct entries.

  
Obviouly, I was not clear about this. It's about starting a page at just 
any item, not just on even page boundaries as defined by the page size. 
See 
http://www.nabble.com/T5%2C-newbie%3A-Grid-use-w-dynamic-columns-td16080438.html

- It is not possible to change the overall rendering of a row e. g,, to
to embed each ... in a   



That is not valid XHTML 1.0 Strict

I do not know enough about the Grid component to write something about the
other questions. What I miss is the "columns" attribute from T4's Table
component..

Yep, when coming from T4 you miss the column component.

Anyway, I don't want to write bad HTML. So after some more RTFM I've 
concluded that the microformat issue (the ... above) can be 
resolved by the rowclass attribute, together with som explicit column 
fomatting as described in the manual.


One item of four resolved. Thanks!

--alec

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



Re: Newbie,T5: Grid limitations (long).

2008-03-25 Thread Jesper Zedlitz
Alec Leamas wrote:
> - The paging policy with a fixed number of numbered pages is hardcoded
> and can't be changed. Other policies e. g., overlap between pages 
>
Isn't that something you can handle inside your own GridDataSource? With the
page number, the number of results per page, the number of overlapping
items (ok, you need a separate parameter for that) it should be possible
return the correct entries.

> pages started at random points in the input vector is not possible. 
>
Maybe this works: 
Inject the Grid component into your page using
 @Component
 private Grid grid;
When setting up the result you set a random page - something like this:
 int numberOfPages = (int)(result.size()/grid.getRowsPerPage());
 grid.setCurrentPage( (int)(Math.random() * numberOfPages) );

> - It is not possible to change the overall rendering of a row e. g,, to
> to embed each ... in a   
>
That is not valid XHTML 1.0 Strict

I do not know enough about the Grid component to write something about the
other questions. What I miss is the "columns" attribute from T4's Table
component...

Jesper

-- 
Jesper Zedlitz   Dept. for Computer Science, CAU of Kiel
Room 1108Communication Systems Research Group
 Phone:+49-(0)431-880-7279
Christian-Albrechts-Platz 4  Fax:  +49-(0)431-880-7615
24098 Kiel - Germany [EMAIL PROTECTED]


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



Re: Newbie Tapestry

2008-03-11 Thread Patrick Moore
Why don't we just move T5 up to T7 just so that we can say that T6 is the
"old" version :-)

-Pat


Re: Newbie Tapestry

2008-03-07 Thread David Marquis

AND, not to forget references to Tapestry 'Six' :

Rob Smeets (?) quoted:
> I googled and also learnt there is Tapestry -Six- in the works which
would also be a whole new beast not compatible with all previous  
Tapestry

versions.

WTheck ?
Come on, give us a break.

--
David

On 7-Mar-08, at 6:23 AM, Angelo Turetta wrote:


Rob Smeets wrote:

Hi Gabriel,
I dug into this list and found a routine that when someone dare to  
ask a
legitimate question that probably may sound "politically incorrect"  
to some
members, he gets the troll label. Why? I think that's too easy to  
do. Please

answer my questions, if you have one.


Look, every month or so one 'nice' person from the wicket community  
comes here under false identity and posts a question just like yours  
from a gmail account.


So, either you actually ARE him (and Gabriel is right in its  
advice), or you haven't done your homework before posting (and are  
yourself feeding the troll).


Angelo.

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





smime.p7s
Description: S/MIME cryptographic signature


Re: Newbie Tapestry

2008-03-07 Thread Davor Hrg
I really hope there are no Tapestry trolls on wicket mailing list,
like you are one here.

I'd like not to feed the troll, but I feel the need to mark you as troll,
so that new users don't get alarmed too much by your fud.

Like for chain letters and spam, it takes a moment to recognize the pattern.

Davor Hrg

On Fri, Mar 7, 2008 at 11:59 AM, Rob Smeets <[EMAIL PROTECTED]> wrote:
> Hi Gabriel,
>
>  I dug into this list and found a routine that when someone dare to ask a
>  legitimate question that probably may sound "politically incorrect" to some
>  members, he gets the troll label. Why? I think that's too easy to do. Please
>  answer my questions, if you have one.
>
>  Rob
>
>  On Fri, Mar 7, 2008 at 11:44 AM, Gabriel Landais <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > Rob Smeets a écrit :
>  > > Hi,
>  > >
>  > > [...]
>  > >
>  > > Rob
>  >
>  > Don't feed the troll
>  >
>  > Gabriel
>  >
>  > -
>  > 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

2008-03-07 Thread Angelo Turetta

Rob Smeets wrote:

Hi Gabriel,

I dug into this list and found a routine that when someone dare to ask a
legitimate question that probably may sound "politically incorrect" to some
members, he gets the troll label. Why? I think that's too easy to do. Please
answer my questions, if you have one.


Look, every month or so one 'nice' person from the wicket community 
comes here under false identity and posts a question just like yours 
from a gmail account.


So, either you actually ARE him (and Gabriel is right in its advice), or 
you haven't done your homework before posting (and are yourself feeding 
the troll).


Angelo.

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



Re: Newbie Tapestry

2008-03-07 Thread Rob Smeets
Hi Gabriel,

I dug into this list and found a routine that when someone dare to ask a
legitimate question that probably may sound "politically incorrect" to some
members, he gets the troll label. Why? I think that's too easy to do. Please
answer my questions, if you have one.

Rob

On Fri, Mar 7, 2008 at 11:44 AM, Gabriel Landais <[EMAIL PROTECTED]>
wrote:

> Rob Smeets a écrit :
> > Hi,
> >
> > [...]
> >
> > Rob
>
> Don't feed the troll
>
> Gabriel
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Newbie Tapestry

2008-03-07 Thread Gabriel Landais

Rob Smeets a écrit :

Hi,

[...]

Rob


Don't feed the troll

Gabriel

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



Re: Newbie needs help with display of values on page

2008-01-10 Thread Mark Horn
Dave,

The Tapestry 5 Wiki help me a lot.  It can be found at:

http://wiki.apache.org/tapestry/#head-fa893a125e25b4c453eaab4fc08b8fb5d00ca04a

Also, There are some nice tutorials/examples available at:

http://code.google.com/p/shams/

-Mark

On 1/10/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Things are kind of slow here at the office, so I'm taking advantage of that
> to finally get a look at Tapestry. Though I'm a newbie to Tapestry, I'm not
> a newbie to web development; I've worked with JSP, JSF, Struts, and even
> XMLC. Thought I might as well dive into Tap5 since that's the future, even
> though that seems to mean that the book I have (Kent Tong's) is of no value
> to me (this is not a complaint; I know others have complained about the
> lack of backward compatibility, but I realize that sometimes you just have
> to drop that baggage in order to make any real progress forward). But I'm
> having a tough time finding any documentation on page templates; how to
> build them or display values.
>
> I've started with the tutorial app, using v5.0.7,  and am gradually
> extending it. I've gotten the Spring integration working, which was very
> simple once I began to understand what I had done wrong. So I'm able to
> leverage my existing knowledge, and get data from a database. I do intend
> to look at the Tapestry IOC way of doing things, but I'm starting with
> little steps; that will come later.
>
> So what I've got at this point is a Jobs.tml that I can access from the
> Start.tml. Jobs.java gets a ServiceDao injected by Spring, and uses that to
> retrieve a list of JobStatus for display. A JobStatus consists of a String
> jobId, a String projectNumber, and a Map stages. A Status is
> an enum, and the stages Map maps various job stages to the status of that
> stage. I access the Status of a job stage by calling getStatus(String
> stage) on the JobStatus object.
>
> In Jobs.tml I have:
>
>   
>   
> 
>   Job ID
>   Project Number
>   Output Status
>   Shipment Info Posting
>   Bureau Code Posting
>   Inquiry Posting
> 
>   
>   
>   
> ${jobStatus.jobId}
> ${jobStatus.projectNumber}
> ${outputStatus}
> 
>   
> 
>   
>
> There are a couple of things about this that bother me. It seems that
> Jobs.java is required to have a jobStatus property (with getter/setter) to
> support the iteration (and for no other reason). I can get the output
> status with ${outputStatus} by adding a getOutputStatus() method to
> Jobs.java, which then invokes the getStatus("Output") method on the
> required JobStatus property. But to me that "smells" (to use XP
> terminology). It seems that a temp variable could be created to support the
> iteration (ala JSF), and I would rather access the output status by
> something like ${jobStatus.getStatus("Output")}, without requiring an
> artificial method in Jobs.java, especially since it appears that I'll have
> to add a number of other, similar, artificial methods for the other
> statuses.
>
> I realize that I may have a *lot* wrong above, and my hope is that someone
> will (gently) point those errors out to me. Better yet would be to (again
> gently) point me to documentation that will explain the above.
>
> Thanks,
> Dave
>
> We must begin not just to act, but to think, for there is no better slave
> than the one who believes his slavery to be freedom, and we are in
> no greater peril than when we cannot see the chains on our minds
> because there are yet no chains on our feet.
> -- Michael Reid
>
>
> This message contains information from Equifax Inc. which may be
> confidential and privileged.  If you are not an intended recipient, please
> refrain from any disclosure, copying, distribution or use of this
> information and note that such actions are prohibited.  If you have
> received this transmission in error, please notify by 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 needs help with display of values on page

2008-01-10 Thread Davor Hrg
5.0.8-SNAPSHOT has new var: binding prefix
but it is only for simple values, without expression evaluation.
for example to display loop index.


Davor Hrg


On Jan 10, 2008 2:52 PM,  <[EMAIL PROTECTED]> wrote:
>
> Things are kind of slow here at the office, so I'm taking advantage of that
> to finally get a look at Tapestry. Though I'm a newbie to Tapestry, I'm not
> a newbie to web development; I've worked with JSP, JSF, Struts, and even
> XMLC. Thought I might as well dive into Tap5 since that's the future, even
> though that seems to mean that the book I have (Kent Tong's) is of no value
> to me (this is not a complaint; I know others have complained about the
> lack of backward compatibility, but I realize that sometimes you just have
> to drop that baggage in order to make any real progress forward). But I'm
> having a tough time finding any documentation on page templates; how to
> build them or display values.
>
> I've started with the tutorial app, using v5.0.7,  and am gradually
> extending it. I've gotten the Spring integration working, which was very
> simple once I began to understand what I had done wrong. So I'm able to
> leverage my existing knowledge, and get data from a database. I do intend
> to look at the Tapestry IOC way of doing things, but I'm starting with
> little steps; that will come later.
>
> So what I've got at this point is a Jobs.tml that I can access from the
> Start.tml. Jobs.java gets a ServiceDao injected by Spring, and uses that to
> retrieve a list of JobStatus for display. A JobStatus consists of a String
> jobId, a String projectNumber, and a Map stages. A Status is
> an enum, and the stages Map maps various job stages to the status of that
> stage. I access the Status of a job stage by calling getStatus(String
> stage) on the JobStatus object.
>
> In Jobs.tml I have:
>
>   
>   
> 
>   Job ID
>   Project Number
>   Output Status
>   Shipment Info Posting
>   Bureau Code Posting
>   Inquiry Posting
> 
>   
>   
>   
> ${jobStatus.jobId}
> ${jobStatus.projectNumber}
> ${outputStatus}
> 
>   
> 
>   
>
> There are a couple of things about this that bother me. It seems that
> Jobs.java is required to have a jobStatus property (with getter/setter) to
> support the iteration (and for no other reason). I can get the output
> status with ${outputStatus} by adding a getOutputStatus() method to
> Jobs.java, which then invokes the getStatus("Output") method on the
> required JobStatus property. But to me that "smells" (to use XP
> terminology). It seems that a temp variable could be created to support the
> iteration (ala JSF), and I would rather access the output status by
> something like ${jobStatus.getStatus("Output")}, without requiring an
> artificial method in Jobs.java, especially since it appears that I'll have
> to add a number of other, similar, artificial methods for the other
> statuses.
>
> I realize that I may have a *lot* wrong above, and my hope is that someone
> will (gently) point those errors out to me. Better yet would be to (again
> gently) point me to documentation that will explain the above.
>
> Thanks,
> Dave
>
> We must begin not just to act, but to think, for there is no better slave
> than the one who believes his slavery to be freedom, and we are in
> no greater peril than when we cannot see the chains on our minds
> because there are yet no chains on our feet.
> -- Michael Reid
>
>
> This message contains information from Equifax Inc. which may be
> confidential and privileged.  If you are not an intended recipient, please
> refrain from any disclosure, copying, distribution or use of this
> information and note that such actions are prohibited.  If you have
> received this transmission in error, please notify by 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 needs help with display of values on page

2008-01-10 Thread Shing Hing Man
I think the new binding var (available from Tapestry
0.8 snapshot)  is what you are looking for.
Document is available at the following.

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/parameters.html

There is also a post on this last week.

Shing

--- [EMAIL PROTECTED] wrote:

> 
> Things are kind of slow here at the office, so I'm
> taking advantage of that
> to finally get a look at Tapestry. Though I'm a
> newbie to Tapestry, I'm not
> a newbie to web development; I've worked with JSP,
> JSF, Struts, and even
> XMLC. Thought I might as well dive into Tap5 since
> that's the future, even
> though that seems to mean that the book I have (Kent
> Tong's) is of no value
> to me (this is not a complaint; I know others have
> complained about the
> lack of backward compatibility, but I realize that
> sometimes you just have
> to drop that baggage in order to make any real
> progress forward). But I'm
> having a tough time finding any documentation on
> page templates; how to
> build them or display values.
> 
> I've started with the tutorial app, using v5.0.7, 
> and am gradually
> extending it. I've gotten the Spring integration
> working, which was very
> simple once I began to understand what I had done
> wrong. So I'm able to
> leverage my existing knowledge, and get data from a
> database. I do intend
> to look at the Tapestry IOC way of doing things, but
> I'm starting with
> little steps; that will come later.
> 
> So what I've got at this point is a Jobs.tml that I
> can access from the
> Start.tml. Jobs.java gets a ServiceDao injected by
> Spring, and uses that to
> retrieve a list of JobStatus for display. A
> JobStatus consists of a String
> jobId, a String projectNumber, and a
> Map stages. A Status is
> an enum, and the stages Map maps various job stages
> to the status of that
> stage. I access the Status of a job stage by calling
> getStatus(String
> stage) on the JobStatus object.
> 
> In Jobs.tml I have:
> 
>   
>   
> 
>   Job ID
>   Project Number
>   Output Status
>   Shipment Info Posting
>   Bureau Code Posting
>   Inquiry Posting
> 
>   
>   
>value="jobStatus" >
> ${jobStatus.jobId}
> ${jobStatus.projectNumber}
> ${outputStatus}
> 
>   
> 
>   
> 
> There are a couple of things about this that bother
> me. It seems that
> Jobs.java is required to have a jobStatus property
> (with getter/setter) to
> support the iteration (and for no other reason). I
> can get the output
> status with ${outputStatus} by adding a
> getOutputStatus() method to
> Jobs.java, which then invokes the
> getStatus("Output") method on the
> required JobStatus property. But to me that "smells"
> (to use XP
> terminology). It seems that a temp variable could be
> created to support the
> iteration (ala JSF), and I would rather access the
> output status by
> something like ${jobStatus.getStatus("Output")},
> without requiring an
> artificial method in Jobs.java, especially since it
> appears that I'll have
> to add a number of other, similar, artificial
> methods for the other
> statuses.
> 
> I realize that I may have a *lot* wrong above, and
> my hope is that someone
> will (gently) point those errors out to me. Better
> yet would be to (again
> gently) point me to documentation that will explain
> the above.
> 
> Thanks,
> Dave
> 
> We must begin not just to act, but to think, for
> there is no better slave
> than the one who believes his slavery to be freedom,
> and we are in
> no greater peril than when we cannot see the chains
> on our minds
> because there are yet no chains on our feet.
> -- Michael Reid
> 
> 
> This message contains information from Equifax Inc.
> which may be
> confidential and privileged.  If you are not an
> intended recipient, please
> refrain from any disclosure, copying, distribution
> or use of this
> information and note that such actions are
> prohibited.  If you have
> received this transmission in error, please notify
> by e-mail
> [EMAIL PROTECTED]
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page : http://www.lombok.demon.co.uk/



  __
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


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



Re: Newbie: Help me on using Select Component

2007-11-06 Thread Eko S.W.
Yepz!
It definitely help!

Thanks!

I am planning too, but maybe in Indonesian...
-- 
Best wishes,
Eko SW
My Job : http://swdevsoftwareconsulting.blogspot.com


Re: Newbie: Help me on using Select Component

2007-11-05 Thread Angelo Chen

Hi Eko,

Glad you found that blog useful, it's just something I learned from the
mailing list and I keep it there for re-use, I think newbies experience is
just what would be T5 user needs, just put yours online to help others and
help yourself too.

A.C. 


Eko S.W. wrote:
> 
> oookey !!!
> That's just what I need!!
> 
> Maybe I am planning to jot something I know about Tap
> So, all newbie out there can tak advantage of our experiences
> 
> 
> Btw, why your blog doesn't shown up on my Google Search ???
> ;)
> -- 
> Best wishes,
> Eko SW
> My Heart : http://swdev.blogs.friendster.com/my_blog/
> My Job : http://swdevsoftwareconsulting.blogspot.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie%3A-Help-me-on-using-Select-Component-tf4747705.html#a13584595
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: Help me on using Select Component

2007-11-05 Thread Eko S.W.
oookey !!!
That's just what I need!!

Maybe I am planning to jot something I know about Tap
So, all newbie out there can tak advantage of our experiences


Btw, why your blog doesn't shown up on my Google Search ???
;)
-- 
Best wishes,
Eko SW
My Heart : http://swdev.blogs.friendster.com/my_blog/
My Job : http://swdevsoftwareconsulting.blogspot.com


Re: Newbie: Help me on using Select Component

2007-11-04 Thread Angelo Chen

Hi Eko,

try this:

http://ac960.blogspot.com/2007/10/tapestry-5-using-select-component.html

that's where I keep my note about how to use Select in T5.

A.C.


Eko S.W. wrote:
> 
> Dear Community,
> 
> I am not able to use Select Component
> And I am not succeed on following Select in Tap Wiki,
> such as in
> http://wiki.apache.org/tapestry/Tapestry5SelectObject?highlight=%28select%29
> That is the closest tutorial, but I am not suceed on it
> 
> The problem is, the Select in HTML doesn't show up it contents
> 
> What happened?
> I think I already follow the article
> -- 
> Best wishes,
> Eko SW
> http://swdev.blogs.friendster.com/my_blog/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie%3A-Help-me-on-using-Select-Component-tf4747705.html#a13578323
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 in need of help

2007-08-23 Thread Nick Westgate

To summarize, read the threads linked to by Angelo, and read the T5 docs.

1 - Validate in onActivate and redirect to the login page.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
(You can redirect via "return Login.class;")

There is another login example here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html

2 - Search for posts on making your own layout (page wrapper) component.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html

3 - Use an ASO for application-wide state (e.g. logged in status)
http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html

You might also want to check here for inspiration in other areas:
http://wiki.apache.org/tapestry/Tapestry5HowTos

Cheers,
Nick.


Jean-Philippe Steinmetz wrote:

Hello,

 


I need to build a web application that will act as an administration panel
for one of our systems here. It must be written in Java and unfortunately
I've never written a web app in Java before. I've only written standalone
Java apps. I have written many portals/content management systems in PHP
using my own custom frameworks based around the Smarty template engine and
so I'm looking for that kind of simplicity, rapid development and separation
of logic/design experience in Java. This is what led me to Tapestry as it
appears to have many similarities to the frameworks I've written in PHP. As
such I have started a new project for Tapestry 5.0.5 in Eclipse 3.3 and have
been able to get through all of the basic tutorials available. Still, not
all my questions are being answered. If any of you can provide me some
answers to these questions it would be greatly appreciated. I apologize for
my ignorance in this matter. Like I said, I've never written a web app in
Java before.

 


1.  When a user points their browser to
http://server/myapp/somepage.html where does the entry point of execution
for the component begin? For instance, since this application will be an
administration tool I will need a user to authenticate their self and then
hold a session. If the user attempts to access a page that they do not have
access to either because their permission level isn't high enough or because
they have not logged in, then I would need to redirect them. So where do I
put the code to make these checks and further set up my page?
2.  Typically when I write a web application there is a common look and
feel the entire application must conform to. In order to provide much
simpler page development I usually create a header and footer file to
contain the common HTML elements that will then be pieced together with the
body of a template as a page is being rendered. How can I accomplish this
with Tapestry?
3.  How do I create and access persistent objects and variables that can
span the entire realm of pages I am building? I see that I can inject
variables into other pages and that variables/objects can be set in the
component but this seems to always require that the programmer know which
page the user comes from and which pages the user will end up. For instance,
I would create an object representing the user including their properties,
priveleges, etc. once they log in. This object should be persistent across
the entire web application so that if the user decides to use a bookmark to
move to another page they're session will still remain and they will not
need to log back in.

 


Once again thank you for any help you can provide. I'm sure this stuff seems
obvious but writing web apps in Java is apparently very different from
writing web apps in a scripting language model.

 


Jean-Philippe Steinmetz

---

Webmaster / Developer

Information Sciences Institute

University of Southern California

[EMAIL PROTECTED]

310.448.8471

 





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



Re: Newbie in need of help

2007-08-23 Thread Angelo Chen

Hi Jean,

For your #1, here is a related link:

http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631


Angelo Chen wrote:
> 
> Hi Jean,
> 
> I'm newbie too, and have asked similar questions in the last few days,
> here are the links to those threads that might be helpful to you:
> 
> for #2:
>  
> http://www.nabble.com/T5%3ATiles--tf4310807.html#a12291330
> 
> for #3:
> 
> http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631
> 
> 
> 
> 
> Jean-Philippe Steinmetz-2 wrote:
>> 
>> Hello,
>> 
>>  
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-in-need-of-help-tf4321016.html#a12305512
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 in need of help

2007-08-23 Thread Angelo Chen

Hi Jean,

I'm newbie too, and have asked similar questions in the last few days, here
are the links to those threads that might be helpful to you:

for #2:
 
http://www.nabble.com/T5%3ATiles--tf4310807.html#a12291330

for #3:

http://www.nabble.com/T5%3ALogin-and-session-tf4312177.html#a12276631




Jean-Philippe Steinmetz-2 wrote:
> 
> Hello,
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-in-need-of-help-tf4321016.html#a12305458
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 - Show all validation errors

2007-08-13 Thread Jesse Kuhnert
Yeah that's mostly how it's done.

But - you may want to think about handling this differently if you
have the opportunity.   At least from a ui perspective - I've not been
particularly fond of web forms that display all my errors at the top
or bottom in a list that I then need to re lookup for each field I'm
trying to correct.   (maybe some contextual display of errors next to
the relevant section of a form - ie a fieldset -  that still lists
things but at least has them listed on a per section basis)

just random thoughts...

On 8/3/07, Adam Bennett <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm trying to wrap my head around Tapestry.  I'll be ordering some books
> shortly but in the meantime:  What is the simplest way (in 4.1) to show
> a list of form validation errors.  Here is the essence of my page:
>
> 
> 
>
> 
>
> 
> 
>
>  value="ognl:login.user"
> validators="validators:required,email[Invalid email
> address]"/>
>
> 
>  value="ognl:login.pwd" validators="validators:required"/>
>
> 
> 
> 
> 
>
> It doesn't seem like a task that should require any custom java code in
> my page class.  From what I can guess It will probably involve something
> like this:
>
> 
>  source="ognl:components.myForm.delegate.fieldTracking"
> value="currentFieldTracking">
> 
>  delegate="currentFieldTracking.errorRenderer"/>
> 
> 
> 
>
> Yet the above doesn't work.
>
> Thanks for your patience.
> - Adam (a former (hopefully) Struts developer)
>
>
>
> Videx Inc. 1105 N. E. Circle Blvd. Corvallis OR 97330 (541) 758-0521
> CONFIDENTIAL COMMUNICATION: The email message and any attachments are 
> intended only for the addressee.  They may be privileged, confidential, and 
> protected from disclosure. If you are not the intended recipient, any 
> dissemination, distribution, or copying is expressly prohibited.  If you 
> received this email message in error, please notify the sender immediately by 
> replying to this e-mail message or by telephone
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

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



Re: Newbie - Show all validation errors

2007-08-03 Thread Shing Hing Man
In your form component,

>  success="listener:doSubmit">

I think you meant jwcid="[EMAIL PROTECTED]".
Also, you need to specify the delegate parameter.
In case you did not know, there is an example on
displaying all errors in chapter 3 of 

Enjoying Web Development with Tapestry
http://www.agileskills2.org/EWDT/
The first 3 chapters are free for download.

Shing


--- Adam Bennett <[EMAIL PROTECTED]> wrote:

> Hello all,
> 
> I'm trying to wrap my head around Tapestry.  I'll be
> ordering some books 
> shortly but in the meantime:  What is the simplest
> way (in 4.1) to show 
> a list of form validation errors.  Here is the
> essence of my page:
> 
> 
> 
> 
>  
>  
>
>  success="listener:doSubmit">
>  field="component:user"/>
> 
>  displayName="Email" 
> value="ognl:login.user"
>
> validators="validators:required,email[Invalid email 
> address]"/>
> 
>  field="component:password"/>
>  displayName="Password"
> value="ognl:login.pwd"
> validators="validators:required"/>
> 
> 
> 
> 
> 
> 
> It doesn't seem like a task that should require any
> custom java code in 
> my page class.  From what I can guess It will
> probably involve something 
> like this:
> 
> 
> 
source="ognl:components.myForm.delegate.fieldTracking"
> value="currentFieldTracking">
> 
>  delegate="currentFieldTracking.errorRenderer"/>
> 
> 
> 
> 
> Yet the above doesn't work.
> 
> Thanks for your patience.
> - Adam (a former (hopefully) Struts developer)
> 
> 
> 
> Videx Inc. 1105 N. E. Circle Blvd. Corvallis OR
> 97330 (541) 758-0521
> CONFIDENTIAL COMMUNICATION: The email message and
> any attachments are intended only for the addressee.
>  They may be privileged, confidential, and protected
> from disclosure. If you are not the intended
> recipient, any dissemination, distribution, or
> copying is expressly prohibited.  If you received
> this email message in error, please notify the
> sender immediately by replying to this e-mail
> message or by telephone
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page : http://www.lombok.demon.co.uk/



  ___
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 

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



Re: Newbie problem with For component on T4

2007-03-11 Thread Hernâni Cerqueira

Jesse Kuhnert escreveu:

It means "currentArt" is null at the point when it's trying to resolve
currentArt.title.
Yes, that one i knew. And I was sure that "artList" didn't have any null 
values. I found the problem, it's my stupidity... I wanted to post here 
that I was not needing help anymore, but I didn't know how to reply to 
my "unreplyed" posts.


Check out the first span tag. Instead o jwcid has jwcdi... :-[  Sorry 
for the trouble.


Cheers,
Hernâni



On 3/10/07, Hernâni Cerqueira <[EMAIL PROTECTED]> wrote:

Hello all, I'm new to Tapestry, this is my first project using it, and
until now everything was doing perfectly. But now i'm having a small
issue with the For component. I was doing something i've done sometimes
already. I have a For component that iterates from a list of beans, and
displays it's data... Until here ok, but i keep getting a ognlexception:
source is null for getProperty(null, "title"). As a newbie, i have some
difficulties on expressing myself on tapestry dialect, so here goes some
piece of my code:

html:
   (...)

Título
Corpo



Página





class="footer">Escrito por: jwcid="author">Autor

mail
url


(...)

page:
(...)
 











(...)

java:
(...)
public List getArtList() throws TorqueException {
return HistArtPeer.getArtList();
}

public abstract HistArt getCurrentArt();
public abstract HistPage getCurrentPage();
(...)

the exception:

ognl.OgnlException
source is null for getProperty(null, "title")
Stack Trace:

* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1652)
* ognl.ASTProperty.getValueBody(ASTProperty.java:92)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
* ognl.SimpleNode.getValue(SimpleNode.java:210)
* ognl.ASTChain.getValueBody(ASTChain.java:109)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
* ognl.SimpleNode.getValue(SimpleNode.java:210)
* ognl.Ognl.getValue(Ognl.java:333)
* ognl.Ognl.getValue(Ognl.java:310)
(...)

I hope that this is enough for you to tell-me wath i'm doing wrong this
time, because i've already did similar stuff a couple of times and
everything did just fine.

Thanks in advance,
Hernâni

-
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 problem with For component on T4

2007-03-11 Thread Justin Walsh
jwcdi="arts"

should be

jwcid="arts"


Hernâni Cerqueira wrote:
> Hello all, I'm new to Tapestry, this is my first project using it, and
> until now everything was doing perfectly. But now i'm having a small
> issue with the For component. I was doing something i've done
> sometimes already. I have a For component that iterates from a list of
> beans, and displays it's data... Until here ok, but i keep getting a
> ognlexception: source is null for getProperty(null, "title"). As a
> newbie, i have some difficulties on expressing myself on tapestry
> dialect, so here goes some piece of my code:
>
> html:
>   (...)
>
> jwcid="title">Título
> jwcid="body">Corpo
>
>
>
> jwcid="pageTitle">Página
>
>
>
>
>
> class="footer">Escrito por:  jwcid="author">Autor
> class="footer"> jwcid="mail">mail
> class="footer"> jwcid="url">url
>
>
>(...)
>
> page:
>(...)
> 
>
>
>
>
>
>
>
>
>
>
>
>(...)
>
> java:
>(...)
>public List getArtList() throws TorqueException {
>return HistArtPeer.getArtList();
>}
>  public abstract HistArt getCurrentArt();
>public abstract HistPage getCurrentPage();
>(...)
>
> the exception:
>
> ognl.OgnlException
> source is null for getProperty(null, "title")
> Stack Trace:
>
>* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1652)
>* ognl.ASTProperty.getValueBody(ASTProperty.java:92)
>* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>* ognl.SimpleNode.getValue(SimpleNode.java:210)
>* ognl.ASTChain.getValueBody(ASTChain.java:109)
>* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>* ognl.SimpleNode.getValue(SimpleNode.java:210)
>* ognl.Ognl.getValue(Ognl.java:333)
>* ognl.Ognl.getValue(Ognl.java:310)
>(...)
>
> I hope that this is enough for you to tell-me wath i'm doing wrong
> this time, because i've already did similar stuff a couple of times
> and everything did just fine.
>
> Thanks in advance,
> Hernâni
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
Justin Walsh 
http://www.ewage.co.za


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



Re: Newbie problem with For component on T4

2007-03-10 Thread Jesse Kuhnert

It means "currentArt" is null at the point when it's trying to resolve
currentArt.title.

On 3/10/07, Hernâni Cerqueira <[EMAIL PROTECTED]> wrote:

Hello all, I'm new to Tapestry, this is my first project using it, and
until now everything was doing perfectly. But now i'm having a small
issue with the For component. I was doing something i've done sometimes
already. I have a For component that iterates from a list of beans, and
displays it's data... Until here ok, but i keep getting a ognlexception:
source is null for getProperty(null, "title"). As a newbie, i have some
difficulties on expressing myself on tapestry dialect, so here goes some
piece of my code:

html:
   (...)

Título
Corpo



Página





Escrito por: Autor
mail
url


(...)

page:
(...)
 











(...)

java:
(...)
public List getArtList() throws TorqueException {
return HistArtPeer.getArtList();
}

public abstract HistArt getCurrentArt();
public abstract HistPage getCurrentPage();
(...)

the exception:

ognl.OgnlException
source is null for getProperty(null, "title")
Stack Trace:

* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1652)
* ognl.ASTProperty.getValueBody(ASTProperty.java:92)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
* ognl.SimpleNode.getValue(SimpleNode.java:210)
* ognl.ASTChain.getValueBody(ASTChain.java:109)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
* ognl.SimpleNode.getValue(SimpleNode.java:210)
* ognl.Ognl.getValue(Ognl.java:333)
* ognl.Ognl.getValue(Ognl.java:310)
(...)

I hope that this is enough for you to tell-me wath i'm doing wrong this
time, because i've already did similar stuff a couple of times and
everything did just fine.

Thanks in advance,
Hernâni

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





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

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



Re: Newbie - Tapestry and Databases

2007-03-02 Thread Hernâni Cerqueira
You could try torque from apache, it's easy to use and set up, and 
anyone who knows how to use an import staement knows how to integrate 
torque with tapestry. If you want some more info feel free to ask...


Hernâni

Damian Sobieralski escreveu:

I am wondering if anyone could assist me in resources for working with
databases?

  As a newbie, I've went through book and tutorial examples covering
form submission and page rendering in Tapestry. YAY!  But now I am ready
(I think) to dive into database access.  But a quick search on this
topic frightens me a more than a bit. Or, rather, lack of step by step
instructions on how to get this to work. I hear hand waving about Spring
integration but I cannot find someone who has created a tutorial on how
to do this. 


 So, can anyone recommend a good starting point?  I've used iBATIS and
Hibernate in "simple servlets". So I'm familiar with both of them.  It's
the Tapestry hooks to these persistence systems that confuse me to no
end. I know jack about Spring. I know about the same for Hivemind (other
than I know Tapestry uses it for version 4). Do I need to be a guru in
Spring and/or Hivemind to access a database within Tapestry?  Wowsers,
I'm willing to do that but that seems like a lot of work just to get to
the point of accessing a database from within Tapestry.

 I would greatly appreciate advice on where a newbie could start to
educate himself about accessing a database with Tapestry. I want to put
the work in. So I'm not asking for spoon fed help.  But I don't know
where to look for this information (or even what I should be searching
for). Web links, books, emails. I'll take any help that you can offer. I
also looked through the nabble archives of tapestry-user but didn't see
anything I could make heads or tails of.

 I did look on the Tapestry project website but I didn't see anything
titled "using Hibernate with Tapestry' or "using iBatis with Tapestry".
If suh links exist, I wouldn't be offended by a RTFM followed by a link
to this online resource :)

Thanks for any advice that you can share with me.

- Damian
  


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

2007-03-02 Thread Olivier Jacquet


For Tapestry 4 there is the excellent book by Tong Ka Iok which covers 
database access and hibernate in detail.


http://www.agileskills2.org/EWDT/



Damian Sobieralski wrote:

I am wondering if anyone could assist me in resources for working with
databases?

  As a newbie, I've went through book and tutorial examples covering
form submission and page rendering in Tapestry. YAY!  But now I am ready
(I think) to dive into database access.  But a quick search on this
topic frightens me a more than a bit. Or, rather, lack of step by step
instructions on how to get this to work. I hear hand waving about Spring
integration but I cannot find someone who has created a tutorial on how
to do this. 


 So, can anyone recommend a good starting point?  I've used iBATIS and
Hibernate in "simple servlets". So I'm familiar with both of them.  It's
the Tapestry hooks to these persistence systems that confuse me to no
end. I know jack about Spring. I know about the same for Hivemind (other
than I know Tapestry uses it for version 4). Do I need to be a guru in
Spring and/or Hivemind to access a database within Tapestry?  Wowsers,
I'm willing to do that but that seems like a lot of work just to get to
the point of accessing a database from within Tapestry.

 I would greatly appreciate advice on where a newbie could start to
educate himself about accessing a database with Tapestry. I want to put
the work in. So I'm not asking for spoon fed help.  But I don't know
where to look for this information (or even what I should be searching
for). Web links, books, emails. I'll take any help that you can offer. I
also looked through the nabble archives of tapestry-user but didn't see
anything I could make heads or tails of.

 I did look on the Tapestry project website but I didn't see anything
titled "using Hibernate with Tapestry' or "using iBatis with Tapestry".
If suh links exist, I wouldn't be offended by a RTFM followed by a link
to this online resource :)

Thanks for any advice that you can share with me.

- Damian
  


-
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 and form submission (rewinding resetting values)

2007-03-01 Thread Nick Westgate

Hi Damian.

The "set up" is only being done once: when the Person is null.
We create a new one to be edited, and we do this at the first
available opportunity, which is the render phase, since this
occurs before the first rewind.

(Keep in mind that the rewind phase is exactly the same as a render
phase except for (a) its purpose, which is to assign values back to
bound properties etc, and (b) that the HTML result is discarded.)

So that is a common pattern for initialization in pageBeginRender:
if (not rewinding)
{
if (object1 is null)
{
   init object1;
}
if (object2 is null)
{
   init object2;
}
...
}

The only other change was the @Persist annotation to tell Tapestry
to preserve the field's value. The default behaviour is for field
values to be discarded - we must specify which fields are stateful.

This default is reasonable since we want to minimize stored state.
Tapestry performs a lot of magic for us - we just have to remember
where it stops. ;-)

These concepts are no doubt covered in the first 4 free chapters of
Kent Tong's book. Check them out if you haven't read them yet.

Cheers,
Nick.


Damian Sobieralski wrote:

Nick,

 Thank you!! That did the trick.

 Granted, I am new to this so this might be an asinine question - but
why do I have to "set up" the form to be re-displayed on a validation
error?  I mean, when would one rewind after a validation and NOT want
the form values pre-filled in with their previously submitted values?
Shouldn't that be the natural/default behavior and I'd only "overrule"
this behavior if I had a reason?

 I understand that this is the way it works. I guess I'm just wondering
why it was designed this way (probably something very reasonable that I
am not aware of)?

 Anyways, this was most frustrating. But upto this point I was having
fun with Tapestry.  So I can continue on with the learning.

Thanks again for scooting me on my way in the adventure!

- Damian


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



RE: Newbie and form submission (rewinding resetting values)

2007-03-01 Thread Damian Sobieralski
Nick,

 Thank you!! That did the trick.

 Granted, I am new to this so this might be an asinine question - but
why do I have to "set up" the form to be re-displayed on a validation
error?  I mean, when would one rewind after a validation and NOT want
the form values pre-filled in with their previously submitted values?
Shouldn't that be the natural/default behavior and I'd only "overrule"
this behavior if I had a reason?

 I understand that this is the way it works. I guess I'm just wondering
why it was designed this way (probably something very reasonable that I
am not aware of)?

 Anyways, this was most frustrating. But upto this point I was having
fun with Tapestry.  So I can continue on with the learning.

Thanks again for scooting me on my way in the adventure!

- Damian


> -Original Message-
> From: Nick Westgate [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 01, 2007 8:35 PM
> To: Tapestry users
> Subject: Re: Newbie and form submission (rewinding resetting values)
> 
> Hi Damian.
> 
> You need to add something like this here:
> +   @Persist
> > public abstract Person getPerson();
> 
> Otherwise the Person is not persisted between cycles.
> That's what's causing your current exception.
> 
> Also, you don't want to overwrite changes made to Person
> by the user, so you should add something here too:
> > public void pageBeginRender(PageEvent event)
> > {
> >  if (! event.getRequestCycle().isRewinding())
> >  {
> +if (getPerson() == null)
> > setPerson(new Person());
> >}
> 
> Cheers,
> Nick.
> 
> -
> 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 and form submission (rewinding resetting values)

2007-03-01 Thread Nick Westgate

Hi Damian.

You need to add something like this here:
+   @Persist

public abstract Person getPerson();


Otherwise the Person is not persisted between cycles.
That's what's causing your current exception.

Also, you don't want to overwrite changes made to Person
by the user, so you should add something here too:

public void pageBeginRender(PageEvent event)
{
	 if (! event.getRequestCycle().isRewinding()) 
	 {

+if (getPerson() == null)
	setPerson(new Person());	
   } 


Cheers,
Nick.

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



Re: Newbie help with For and TextField components

2007-01-11 Thread Jim Downing

Hi Daniel,

thanks very much for this, it makes things much clearer (best 
explanation of it I've seen by a long chalk!).


I'll take your advice and create a holder object for my string that uses 
a UUID to identify the strings.


Thanks!

jim

Daniel Tabuenca wrote:

Eventually I'm going to be saving the values in RDF - the values won't
have a persistent key, they're just literal values. I'm also keen to
avoid using any session persistence but will do if it's necessary. Can
tapestry deal with simple values that don't have identity in this way?


To understand this you need to know what that key is really used for.

Say I have a Person Object...

public class Person(){

public String name;
public String id;
}

and two person Object sin a list;

Person bob;
Person alice;
List personList;

bob.setName("Bob");
bob.setId("1");

alice.setName("Alice");
alice.setId("2");

personList.add(bob);
personList.add(alice);



Now... when if I set my keyExpression to be person.id when tapestry
renders out the form it stores a hidden field with the ids in order..
in this case it would have "1" and "2". Why is this important?  Well
you have to understand what happens during a rewind. It is nothing
magical really and the simplistic way to explain is that your page
just renders out again but with the form bindings reversed so in
your case



when it gets to that input field... instead of reading the "value"
parameter with getName() it simply writes that paremeter with
setName().


so say I got the page and it has a list of my current users

* [ BOB ]
* [ALICE ]

now I want to change Bob's name to Robert so I edit.

* [ROBERT]
* [ALICE]

and hit submit..

What happens if while I was changing the name on the form.. someone
somehow change the original person list so that the names are
backwards so the objects are { alice, bob}. If tapestry allowed it
this would be bad! Because you meant to change Bob's name but as far
as Tapestry is concerned you just instructed it to set the name on the
first item on the list to "Robert". And if the order on the list was
somehow changed it's your Alice object that will get it's name change.

This is why tapestry stores extra information in the hidden field.
What it does, is before actually calling setName() it will check that
your keyExpression submitted with the form matches the keyExpression
of the object from the list. If the list got changed this will be
different and tapestry will detect this and throw you an exception so
you don't accidentally delete or modify th wrong object.

Of course... if you don't have a real key you can either make one up.
Or if your oject converts automatically to a string tapestry will just
store that in the hidden fields. Of course, if you don't care about
what I just described or you know for certain that nobody will modify
the list, you could set keyExpression to something constant so it
always matches no matter what.

I hope this explenation was useful. The whole rewind idea seemed
magical to me until someone explained it to me like this.



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



Re: Newbie help with For and TextField components

2007-01-10 Thread Daniel Tabuenca

Eventually I'm going to be saving the values in RDF - the values won't
have a persistent key, they're just literal values. I'm also keen to
avoid using any session persistence but will do if it's necessary. Can
tapestry deal with simple values that don't have identity in this way?


To understand this you need to know what that key is really used for.

Say I have a Person Object...

public class Person(){

public String name;
public String id;
}

and two person Object sin a list;

Person bob;
Person alice;
List personList;

bob.setName("Bob");
bob.setId("1");

alice.setName("Alice");
alice.setId("2");

personList.add(bob);
personList.add(alice);



Now... when if I set my keyExpression to be person.id when tapestry
renders out the form it stores a hidden field with the ids in order..
in this case it would have "1" and "2". Why is this important?  Well
you have to understand what happens during a rewind. It is nothing
magical really and the simplistic way to explain is that your page
just renders out again but with the form bindings reversed so in
your case



when it gets to that input field... instead of reading the "value"
parameter with getName() it simply writes that paremeter with
setName().


so say I got the page and it has a list of my current users

* [ BOB ]
* [ALICE ]

now I want to change Bob's name to Robert so I edit.

* [ROBERT]
* [ALICE]

and hit submit..

What happens if while I was changing the name on the form.. someone
somehow change the original person list so that the names are
backwards so the objects are { alice, bob}. If tapestry allowed it
this would be bad! Because you meant to change Bob's name but as far
as Tapestry is concerned you just instructed it to set the name on the
first item on the list to "Robert". And if the order on the list was
somehow changed it's your Alice object that will get it's name change.

This is why tapestry stores extra information in the hidden field.
What it does, is before actually calling setName() it will check that
your keyExpression submitted with the form matches the keyExpression
of the object from the list. If the list got changed this will be
different and tapestry will detect this and throw you an exception so
you don't accidentally delete or modify th wrong object.

Of course... if you don't have a real key you can either make one up.
Or if your oject converts automatically to a string tapestry will just
store that in the hidden fields. Of course, if you don't care about
what I just described or you know for certain that nobody will modify
the list, you could set keyExpression to something constant so it
always matches no matter what.

I hope this explenation was useful. The whole rewind idea seemed
magical to me until someone explained it to me like this.

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



Re: Newbie help with For and TextField components

2007-01-10 Thread Daniel Tabuenca

Well it's because you are using strings directly. Here's what the
equivalent of what is going on in JAVA:

List names  = NAMES;

for( String name : names ){
name = " NEW VALUE FROM INPUT FIELD";
// but strings are immutable so name has a new string reference and
does not modify
// the one that is part of the list.
}

What happens is your new name is stored only in the "name" property
and never makes it back to your list try printing out getName()
and you will see that it is probably set to your last name on the
list.







On 1/10/07, Jim Downing <[EMAIL PROTECTED]> wrote:

Hi Daniel,

thanks for the help!

Daniel Tabuenca wrote:
> The Chart example the plotValues property is persisted:
>
>  class="org.apache.tapestry.workbench.chart.ChartPage">
>
>  
>
> ...
>
>
> I am assuming you are not persisting since from your logs:
>
> 9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
> Rewind? true
> 9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names
> list

It's true, I wasn't persisting them. To be ultra-simplistic I've done
this by storing them back in a static field: -

Home.java:
...
public static List NAMES = new ArrayList();
public void pageBeginRender(PageEvent event) {
LOG.info("Begin render. Rewind? " +
getRequestCycle().isRewinding() +". Names: "+ getNames());
LOG.info("Initializing names list to "+ NAMES);
setNames(NAMES);
}

public void submit() {
LOG.info("Submitted. List is: " + getNames());
NAMES = getNames();
}

public void add() {
LOG.info("Adding a blank name to " + getNames());
List nms = getNames();
nms.add("");
setNames(nms);
}
...


Unfortunately that doesn't seem to be at the heart of the problem - the
list now grows as desired when the 'add' listener is called, but the
values in the list aren't changed. It looks like the form values aren't
correctly set after the rewind, e.g. in the log excerpt below I'd be
expecting to see the (non-blank) form values in the message at the
highlighted point: -

 INFO  com.example.pages.Home  - Begin render. Rewind? true.  Names: null
 INFO  com.example.pages.Home  - Initializing names list to [, , ]
--> INFO  com.example.pages.Home  - Submitted. List is: [, , ] <--
 INFO  com.example.pages.Home  - Begin render. Rewind? false. Names: [, , ]
 INFO  com.example.pages.Home  - Initializing names list to [, , ]

Eventually I'm going to be saving the values in RDF - the values won't
have a persistent key, they're just literal values. I'm also keen to
avoid using any session persistence but will do if it's necessary. Can
tapestry deal with simple values that don't have identity in this way?

Thanks,

jim



-
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 help with For and TextField components

2007-01-10 Thread Jim Downing

Hi Firas,

Firas Adiler wrote:

I'm a bit puzzled myself, but how did you manage to run the app without
providing setters for 'idx' and 'name' fields:
public abstract void setIdx(int idx)
public abstract void setName(String name)?
  


Seems to work fine just defining the getter in other situations - I 
think the setter appears by reflection magic.


jim

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



Re: Newbie help with For and TextField components

2007-01-10 Thread Jim Downing
Hi Daniel, 


thanks for the help!

Daniel Tabuenca wrote:

The Chart example the plotValues property is persisted:

class="org.apache.tapestry.workbench.chart.ChartPage">


 

...


I am assuming you are not persisting since from your logs:

9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names 
list


It's true, I wasn't persisting them. To be ultra-simplistic I've done 
this by storing them back in a static field: -


Home.java:
...
   public static List NAMES = new ArrayList();
   public void pageBeginRender(PageEvent event) {
   LOG.info("Begin render. Rewind? " + 
getRequestCycle().isRewinding() +". Names: "+ getNames());

   LOG.info("Initializing names list to "+ NAMES);
   setNames(NAMES);
   }

   public void submit() {
   LOG.info("Submitted. List is: " + getNames());
   NAMES = getNames();
   }

   public void add() {
   LOG.info("Adding a blank name to " + getNames());
   List nms = getNames();
   nms.add("");
   setNames(nms);
   }
...


Unfortunately that doesn't seem to be at the heart of the problem - the 
list now grows as desired when the 'add' listener is called, but the 
values in the list aren't changed. It looks like the form values aren't 
correctly set after the rewind, e.g. in the log excerpt below I'd be 
expecting to see the (non-blank) form values in the message at the 
highlighted point: -


INFO  com.example.pages.Home  - Begin render. Rewind? true.  Names: null
INFO  com.example.pages.Home  - Initializing names list to [, , ]
--> INFO  com.example.pages.Home  - Submitted. List is: [, , ] <--
INFO  com.example.pages.Home  - Begin render. Rewind? false. Names: [, , ]
INFO  com.example.pages.Home  - Initializing names list to [, , ]

Eventually I'm going to be saving the values in RDF - the values won't 
have a persistent key, they're just literal values. I'm also keen to 
avoid using any session persistence but will do if it's necessary. Can 
tapestry deal with simple values that don't have identity in this way?


Thanks,

jim



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



Re: Newbie help with For and TextField components

2007-01-10 Thread Daniel Tabuenca

The Chart example the plotValues property is persisted:



 

...


I am assuming you are not persisting since from your logs:

9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list

The list gest reinitialized on each request.


I think you may be misunderstanding the @For loop. @For inside a form
will not create a List or populate it for you. @For works with an
existing list and in your case the existing list is a new list on each
beginRender. @For then iterates over an empty list which means nothing
inside it will ever get executed (all your form input fields never get
rewound). The keyExpression is used only to verify that the list that
you are working with  has not changed since you rendered the page. In
your case it HAS! When you rendered the page originally your list had
a blank name in it. On the rewind it has no elements. Maybe tapestry
should be smarter and throw an error when the size of the list doesn't
match the size from when it was rendered.






On 1/10/07, Jim Downing <[EMAIL PROTECTED]> wrote:

Hi Jesse,

Jesse Kuhnert wrote:
> I think the problem with this approach is that the For component has
> no way of uniquely identifying your list values.
>
> I would try using the keyExpression or converter parameters of the For
> component to do this instead.
> http://tapestry.apache.org/tapestry4.1/components/general/for.html

Thanks for the pointers, but I'm still having problems, using either a
custom converter or a keyExpression (using "toString()"). As I
understand it either of these methods rely on there being a single
reference to the object that doesn't change between requests. This
obviously doesn't exist for value objects.

What I'm finding confusing is that this looks to me just like the
example in the charts pane of the tapestry workbench demo; there a list
of PlotValues is edited without keyExpresssion or a converter. Why is
this different?

Would a reasonable hack be to bind the value of the text field input to
a property with a concrete setter that used the @For index to build the
new list items manually?

Thanks,

jim

-
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 help with For and TextField components

2007-01-10 Thread Firas Adiler
Jim,

I'm a bit puzzled myself, but how did you manage to run the app without
providing setters for 'idx' and 'name' fields:
public abstract void setIdx(int idx)
public abstract void setName(String name)?

Regards,



-Original Message-
From: Jim Downing [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 3:47 PM
To: users@tapestry.apache.org
Subject: Newbie help with For and TextField components

Hi,

I'm trying to get some simple list editing working using For and TextField
but not having much luck.

Home.html: -

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> 
Example app   Hello
world! List of names:

1  

Home.java

public abstract class Home extends BasePage implements
PageBeginRenderListener {

private static final Logger LOG = Logger.getLogger(Home.class);

public void pageBeginRender(PageEvent event) {
LOG.info("Begin render. Rewind? " +
getRequestCycle().isRewinding());
if(getNames()== null) {
LOG.info("Initializing names list");
setNames(new ArrayList());
}
}

public void submit() {
LOG.info("Submitted. List is: " + getNames());
}

public void add() {
LOG.info("Adding a blank name to "+ getNames());
List nms = getNames();
nms.add("");
setNames(nms);
}
   
public abstract List getNames();

public abstract void setNames(List nms);

public abstract String getName();

public abstract int getIdx();
}

When I click the "Add" button I get: -

9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render. 
Rewind? true
9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9627423 [btpool0-3] INFO  com.example.pages.Home  - Adding a blank name to
[]
9627424 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is: 
[]
9627424 [btpool0-3] INFO  com.example.pages.Home  - Begin render. 
Rewind? false

Then changing the value in the form input and clicking submit produces
this: -

9638858 [btpool0-3] INFO  com.example.pages.Home  - Begin render. 
Rewind? true
9638858 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9638859 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is: []
9638859 [btpool0-3] INFO  com.example.pages.Home  - Begin render. 
Rewind? false

I'm puzzled - why hasn't the list been populated from the TextFields in the
For loop?

Any pointers gratefully received.

cheers,
jim



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



Re: Newbie help with For and TextField components

2007-01-10 Thread Daniel Tabuenca

I don't get it. What are you trying to do? You aren't persisting your
list anywhere so at each render or rewind your lists starts off
null. so by the time it gets to the @For loop the @For loop has
nothing to iterate over. Am I missing something?




On 1/9/07, Jim Downing <[EMAIL PROTECTED]> wrote:

Hi,

I'm trying to get some simple list editing working using For and
TextField but not having much luck.

Home.html: -

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

Example app


Hello world!
List
of names:

1 






Home.java

public abstract class Home extends BasePage implements
PageBeginRenderListener {

private static final Logger LOG = Logger.getLogger(Home.class);

public void pageBeginRender(PageEvent event) {
LOG.info("Begin render. Rewind? " +
getRequestCycle().isRewinding());
if(getNames()== null) {
LOG.info("Initializing names list");
setNames(new ArrayList());
}
}

public void submit() {
LOG.info("Submitted. List is: " + getNames());
}

public void add() {
LOG.info("Adding a blank name to "+ getNames());
List nms = getNames();
nms.add("");
setNames(nms);
}

public abstract List getNames();

public abstract void setNames(List nms);

public abstract String getName();

public abstract int getIdx();
}

When I click the "Add" button I get: -

9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9627423 [btpool0-3] INFO  com.example.pages.Home  - Adding a blank name
to []
9627424 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is:
[]
9627424 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? false

Then changing the value in the form input and clicking submit produces
this: -

9638858 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9638858 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9638859 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is: []
9638859 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? false

I'm puzzled - why hasn't the list been populated from the TextFields in
the For loop?

Any pointers gratefully received.

cheers,
jim


-
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 help with For and TextField components

2007-01-10 Thread Jim Downing

Hi Jesse,

Jesse Kuhnert wrote:

I think the problem with this approach is that the For component has
no way of uniquely identifying your list values.

I would try using the keyExpression or converter parameters of the For
component to do this instead.
http://tapestry.apache.org/tapestry4.1/components/general/for.html


Thanks for the pointers, but I'm still having problems, using either a 
custom converter or a keyExpression (using "toString()"). As I 
understand it either of these methods rely on there being a single 
reference to the object that doesn't change between requests. This 
obviously doesn't exist for value objects.


What I'm finding confusing is that this looks to me just like the 
example in the charts pane of the tapestry workbench demo; there a list 
of PlotValues is edited without keyExpresssion or a converter. Why is 
this different?


Would a reasonable hack be to bind the value of the text field input to 
a property with a concrete setter that used the @For index to build the 
new list items manually?


Thanks,

jim

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



Re: Newbie help with For and TextField components

2007-01-10 Thread Jesse Kuhnert

I think the problem with this approach is that the For component has
no way of uniquely identifying your list values.

I would try using the keyExpression or converter parameters of the For
component to do this instead.
http://tapestry.apache.org/tapestry4.1/components/general/for.html



On 1/9/07, Jim Downing <[EMAIL PROTECTED]> wrote:

Hi,

I'm trying to get some simple list editing working using For and
TextField but not having much luck.

Home.html: -

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

Example app


Hello world!
List
of names:

1 






Home.java

public abstract class Home extends BasePage implements
PageBeginRenderListener {

private static final Logger LOG = Logger.getLogger(Home.class);

public void pageBeginRender(PageEvent event) {
LOG.info("Begin render. Rewind? " +
getRequestCycle().isRewinding());
if(getNames()== null) {
LOG.info("Initializing names list");
setNames(new ArrayList());
}
}

public void submit() {
LOG.info("Submitted. List is: " + getNames());
}

public void add() {
LOG.info("Adding a blank name to "+ getNames());
List nms = getNames();
nms.add("");
setNames(nms);
}

public abstract List getNames();

public abstract void setNames(List nms);

public abstract String getName();

public abstract int getIdx();
}

When I click the "Add" button I get: -

9627410 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9627411 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9627423 [btpool0-3] INFO  com.example.pages.Home  - Adding a blank name
to []
9627424 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is:
[]
9627424 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? false

Then changing the value in the form input and clicking submit produces
this: -

9638858 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? true
9638858 [btpool0-3] INFO  com.example.pages.Home  - Initializing names list
9638859 [btpool0-3] INFO  com.example.pages.Home  - Submitted. List is: []
9638859 [btpool0-3] INFO  com.example.pages.Home  - Begin render.
Rewind? false

I'm puzzled - why hasn't the list been populated from the TextFields in
the For loop?

Any pointers gratefully received.

cheers,
jim


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





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

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



Re: Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Sam Gendler

We use Spring 1.2, but long ago wrote our own subclass of
ApplicationContext that will grab context override files from
elsewhere (including the local filesystem rather than the classpath).
It offers pretty much the exact functionality you are looking for.
I'm sure it can be applied to spring 2.0 as well.  It lets us have a
default config defined in the application context which works on
developer machines, and then have overrides that live in app context
files on the local filesystem in production boxes.  Any bean defined
in an override file will automatically replace any bean of the same
name found in the application context that would be loaded without the
override.  You can also provide totally unique beans in an override
context. This allows us to drop a developer build directly on a
production machine and the production overrides will be autodetected
and utilized. It probably isn't quite as flexible as hibernate's
mechanism, but it is flexible enough for our use cases.  I can talk to
the lawyerly folks about whether I can make it public if you'd like.

One cute little thing we do with it is to override the name of the CSS
files that get used.  This allows us to have a look and feel that
makes it abundantly clear you are not in a production environment (the
color scheme is pink and lime-green unless you have a production
override).  I'm sure hivemind would give us a more elegant solution to
the same problem(or at least a built-in solution to it), but then I'd
have to know more about hivemind, something I'm trying to avoid, since
we've already got enough frameworks that I have to be expert in
(tapestry, spring, dojo, hibernate, quartz, j2ee, etc).

Honestly, if you can get away with just using hivemind, then I'd
recommend it, if only becuse it will be one less framework you need to
deal with, which is probably a good thing.  But if you must have some
of Spring's features, then my strategy of minimizing our dependancy on
hivemind has worked out very well for us.

--sam

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



Re: [newbie] Tapestry-Spring

2006-11-22 Thread Daniel Tabuenca

That's correct. I use @Connfigurable to inject spring objects into
tapestry pages. The downside is the need to include an xml bean
configuraion in spring for each page I want to inject to, although
I've been using the spring-annotation project to define the beans
using annotations rather than xml. It also requires you to weave the
spring-aspects.jar using aspectj (or alternatively use spring's
support for runtime weaving). Some people might not like the reliance
on aspectj to do this.



On 11/22/06, Cyrille37 <[EMAIL PROTECTED]> wrote:

Daniel Tabuenca a écrit :
> I think what you read there is not necessarily true. If you are using
> Spring 2.0 and bean scopes or target sources then spring will give you
> a proxy and automatically manage the lifecycle for you. Also keep in
> mind that you can easily use spring itself to inject the beans into a
> tapestry page by using the @Configurable annotation which in my
> opinion is one of Spring 2.0's greatest improvements as it lest you
> use spring to configure objects that weren't  created by spring such
> as tapestry pages or even hibernate entities! The documentation for
> that feature is here:
>
> 
http://static.springframework.org/spring/docs/2.0.x/reference/aop.html#aop-atconfigurable
>
If I well understand, with that Spring2 feature, no need of
Tapestry-Spring anymore. Is that true ?

Thanks a lot
Cyrille


>
> On 11/22/06, Cyrille37 <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I'm steel walking on the web to learn more about WebApplication with
>> Tapestry and other frameworks integration before starting to draw the
>> architecture of my future project... It's not so simple ;-)
>>
>> Today I'm looking for Tapestry4 and Spring2.
>>
>> On the site of Tapestry-Spring
>> (http://howardlewisship.com/tapestry-javaforge/tapestry-spring/)
>> I read that "Injecting Spring beans that are not singletons doesn't work
>> properly".
>>
>> So how to implements Session Bean lifecycle with Tapestry and Spring ??
>> For example, I would like to get a Bean that represent a WabApp's User,
>> so that Bean must be instantiated for each user, a singleton would
>> not feet.
>>
>> Thanks for your comments.
>> Cyrille.
>> PS: Tanks to all for your answers in thread "[newbie] Spring vs
>> Hivemind", your comments were very helpfully.
>>



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

2006-11-22 Thread Cyrille37

Daniel Tabuenca a écrit :

I think what you read there is not necessarily true. If you are using
Spring 2.0 and bean scopes or target sources then spring will give you
a proxy and automatically manage the lifecycle for you. Also keep in
mind that you can easily use spring itself to inject the beans into a
tapestry page by using the @Configurable annotation which in my
opinion is one of Spring 2.0's greatest improvements as it lest you
use spring to configure objects that weren't  created by spring such
as tapestry pages or even hibernate entities! The documentation for
that feature is here:

http://static.springframework.org/spring/docs/2.0.x/reference/aop.html#aop-atconfigurable 

If I well understand, with that Spring2 feature, no need of 
Tapestry-Spring anymore. Is that true ?


Thanks a lot
Cyrille




On 11/22/06, Cyrille37 <[EMAIL PROTECTED]> wrote:

Hello,

I'm steel walking on the web to learn more about WebApplication with
Tapestry and other frameworks integration before starting to draw the
architecture of my future project... It's not so simple ;-)

Today I'm looking for Tapestry4 and Spring2.

On the site of Tapestry-Spring
(http://howardlewisship.com/tapestry-javaforge/tapestry-spring/)
I read that "Injecting Spring beans that are not singletons doesn't work
properly".

So how to implements Session Bean lifecycle with Tapestry and Spring ??
For example, I would like to get a Bean that represent a WabApp's User,
so that Bean must be instantiated for each user, a singleton would 
not feet.


Thanks for your comments.
Cyrille.
PS: Tanks to all for your answers in thread "[newbie] Spring vs
Hivemind", your comments were very helpfully.





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



Re: [newbie] Tapestry-Spring

2006-11-22 Thread Daniel Tabuenca

I think what you read there is not necessarily true. If you are using
Spring 2.0 and bean scopes or target sources then spring will give you
a proxy and automatically manage the lifecycle for you. Also keep in
mind that you can easily use spring itself to inject the beans into a
tapestry page by using the @Configurable annotation which in my
opinion is one of Spring 2.0's greatest improvements as it lest you
use spring to configure objects that weren't  created by spring such
as tapestry pages or even hibernate entities! The documentation for
that feature is here:

http://static.springframework.org/spring/docs/2.0.x/reference/aop.html#aop-atconfigurable

On 11/22/06, Cyrille37 <[EMAIL PROTECTED]> wrote:

Hello,

I'm steel walking on the web to learn more about WebApplication with
Tapestry and other frameworks integration before starting to draw the
architecture of my future project... It's not so simple ;-)

Today I'm looking for Tapestry4 and Spring2.

On the site of Tapestry-Spring
(http://howardlewisship.com/tapestry-javaforge/tapestry-spring/)
I read that "Injecting Spring beans that are not singletons doesn't work
properly".

So how to implements Session Bean lifecycle with Tapestry and Spring ??
For example, I would like to get a Bean that represent a WabApp's User,
so that Bean must be instantiated for each user, a singleton would not feet.

Thanks for your comments.
Cyrille.
PS: Tanks to all for your answers in thread "[newbie] Spring vs
Hivemind", your comments were very helpfully.


-
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: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Daniel Tabuenca

No, I believe this is the main positive hivemind has. It would be nice
if spring had a hivemind-like configuration system. One thing that
I've been trying lately is the spring-annotation project found here:
https://spring-annotation.dev.java.net/ It basically lets you fully
configure your beans using annotations which are then automatically
read by spring. Of course some argue that this goes against the spirit
of dependency injection since you then hard-code your dependencies in
the form of annotations. However, for most people, this is just what
they need. I agree with the  it really should be
the default and would be much nicer if it were in option in the actual
bean definition such as proxy="true" or something like that.



On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Thanks for the pointer! That's looking quite cool. My only complaint is
that you obviously have to remember to put " " inside
each bean with a non-standard scope. If this was available a year ago,
I'd have considered Spring - though I still like the HiveMind XML
notation better.

Sorry for asking instead of reading the docs: But can Spring 2.0 also
pull together its config from different jars on the classpath like
HiveMind does?
Or do you still need to have a "master application.xml" and and do
manual includes?

> -Original Message-
> From: Daniel Tabuenca [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 22, 2006 10:18 AM
> To: Tapestry users
> Subject: Re: Re: [newbie] Spring vs Hivemind
>
>  Spring 2.0 has singleton/prototype/request/session/global
> session/ and custom scopes. It should be noted that spring's
> prototype scope is different from hivemind in that an object
> is created every time a referencing dependency is set or when
> one requests it directly via a getBean("beanName"). In this
> sense spring acts more like a factory returning configured
> objects unlike hivemind which returns a proxy which creates a
> new object on each method invocation.
>
> Spring also has the concept of target sources which is
> basically equivalent to hivemind pooled service models and
> also allow lets you do hivemind-like prototype proxies.
>
> Here are the references to the docs if anyone is interested:
>
> http://static.springframework.org/spring/docs/2.0.x/reference/
> beans.html#beans-factory-scopes
>
> and
>
> http://static.springframework.org/spring/docs/2.0.x/reference/
> aop-api.html#aop-targetsource
>
>
>
> On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No, Spring has only prototype and singleton Beans afaik.
> > HiveMind has threaded/pooled service-models which can easily be
> > extended (Honeycomb does this to implement session-per-conversation
> > based on a "stateful" service-model).
>
> -
> 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: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Marcus.Schulte
Thanks for the pointer! That's looking quite cool. My only complaint is
that you obviously have to remember to put " " inside
each bean with a non-standard scope. If this was available a year ago,
I'd have considered Spring - though I still like the HiveMind XML
notation better.

Sorry for asking instead of reading the docs: But can Spring 2.0 also
pull together its config from different jars on the classpath like
HiveMind does?
Or do you still need to have a "master application.xml" and and do
manual includes?

> -Original Message-
> From: Daniel Tabuenca [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 22, 2006 10:18 AM
> To: Tapestry users
> Subject: Re: Re: [newbie] Spring vs Hivemind
> 
>  Spring 2.0 has singleton/prototype/request/session/global 
> session/ and custom scopes. It should be noted that spring's 
> prototype scope is different from hivemind in that an object 
> is created every time a referencing dependency is set or when 
> one requests it directly via a getBean("beanName"). In this 
> sense spring acts more like a factory returning configured 
> objects unlike hivemind which returns a proxy which creates a 
> new object on each method invocation.
> 
> Spring also has the concept of target sources which is 
> basically equivalent to hivemind pooled service models and 
> also allow lets you do hivemind-like prototype proxies.
> 
> Here are the references to the docs if anyone is interested:
> 
> http://static.springframework.org/spring/docs/2.0.x/reference/
> beans.html#beans-factory-scopes
> 
> and
> 
> http://static.springframework.org/spring/docs/2.0.x/reference/
> aop-api.html#aop-targetsource
> 
> 
> 
> On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No, Spring has only prototype and singleton Beans afaik.
> > HiveMind has threaded/pooled service-models which can easily be 
> > extended (Honeycomb does this to implement session-per-conversation 
> > based on a "stateful" service-model).
> 
> -
> 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]



  1   2   >