Re: Fwd: [Announce] Tapestry 5.2 Demo application

2010-10-21 Thread Katia Aresti Gonzalez
There is no security framework
just tapestry following Howard's tutorial
in the tynamo branch we use tynamo security, but this branch is not finished
yet. We will use tynamo conversations too.

2010/10/22 ael 

>
> What Security Framework this you use for this project?
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Fwd-Announce-Tapestry-5-2-Demo-application-tp3230348p3231528.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: [Announce] Tapestry 5.2 Demo application

2010-10-21 Thread Katia Aresti Gonzalez
thanks a lot for all these feedbacks, and thanks Howard for taking your time
to do a code review, this is really great !!!


Katia

2010/10/21 Mark W. Shead 

> I like the look of the application. I wonder if it would help with
> Tapestry branding to use the same template and style for 5.2.2
> archetype theme instead of the Concrete theme that is currently being
> used.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Fwd: [Announce] Tapestry 5.2 Demo application

2010-10-21 Thread Katia Aresti Gonzalez
Well, we can remove it if you wish Christophe

Or we can just add a comment to say that - as always - there is one
exception that confirms the rule :-) Kaptcha - as it's a tapx component.

Katia

2010/10/21 Christophe Cordenier 

> 2010/10/21 Piero Sartini 
>
> > Very nice effort!
> >
>
> Thanks !
>
>
> >
> > Is the captcha a tapestry core component? Just because on the first
> > page it reads:
> >
>
> Almost, tapx has been written by Howard :) To be complete third-party free
> we should remove it or implement it in the project.
>
>
> > "This version of the application uses only Tapestry's core components,
> > thus you will find here a *realistic* demonstration of Tapestry's
> > power."
> >
> >  Piero
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>


Re: Fwd: [Announce] Tapestry 5.2 Demo application

2010-10-21 Thread Katia Aresti Gonzalez
No, is a tapx component. It's not a core component, it's true. But as it's
howard's component... we consider it as "core"
But it's true, kaptcha is not in the core.

:)

http://github.com/hlship/tapx



2010/10/21 Piero Sartini 

> Very nice effort!
>
> Is the captcha a tapestry core component? Just because on the first
> page it reads:
> "This version of the application uses only Tapestry's core components,
> thus you will find here a *realistic* demonstration of Tapestry's
> power."
>
>  Piero
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Fwd: [Announce] Tapestry 5.2 Demo application

2010-10-21 Thread Katia Aresti Gonzalez
Hi all,

Thank you everybody for your feedbacks and thanks a lot for testing

In order to be more organized, I suggest you to open improvement and bug
issues on the project's github account :)

http://github.com/ccordenier/tapestry5-hotel-booking/issues

Katia


2010/10/21 Vangel V. Ajanovski 

> Tried the demo and I have a suggestion.
> When you log in you are offered an empty search page and it gives you an
> impression that the database is empty.
> If the users are given some examples or part of the list then will be
> able to 'query by example', so at least show some hotels on first
> arrival and then whatever the user searched for.
>
> On 10/21/2010 01:41 PM, Christophe Cordenier wrote:
> > I am pleased to announce that we have now a place for live application
> > demonstrations. Our first application has been inspired from Seam hotel
> > booking application and demonstrates a lot of Tapestry features from the
> > early step to more advanced one. You can already play with it at
> > http://tapestry.zones.apache.org:8180/tapestry5-hotel-booking/
>
>
>


Re: [T5.2] What security framework do you recommend ?

2010-10-18 Thread Katia Aresti Gonzalez
Hi,

It depends on your needs and on you.

I successfully used Spring Security 3.0 (without any additional library) and
it works very well. You can checkout the example here :

http://github.com/lguerin/tapestwitter

and Tynamo security with shiro too

http://github.com/ccordenier/tapestry5-hotel-booking/tree/tynamo

Both applications - tapestwitter and hotel-booking-tynamo - are full and
small demo applications, not much code to look at. Consider looking this
applications to give yourself an opinion.

My personal opinion is that I prefer spring because it looks more mature
than shiro (don't blame me Kalle :) ). In the other hand, Tynamo integration
is nice too and Tynamo committers are active members on this list, so you
will find help and you will help them to improve either shiro and tynamo.

Hope this helps

Katia

2010/10/18 Muhammad Mohsen 

> Hi All,
>
> I'm currently trying to decide what framework to use to secure my tapestry
> applications efficiently and easily. So I found tapestry-acegi and
> tynamo-security so far. Been reading some about tynamo's.
> May be someone could share his experience with either frameworks or
> securing
> tapestry applications in general.
>
> Regards.
> --
> *Regards,*
> *Muhammad Gelbana
> Java Software Programmer*
>


T 5.2 Validator Macro

2010-10-03 Thread Katia Aresti Gonzalez
Hi

I'm using the validator macro feature on Tapestry 5.2.

It works perfect when I put the validation on the tml :



However, I can't make it work with @Validation annotation on the java
class.

@Validate("password")
private String password;

I'm getting the following error : "Failure reading parameter 'validate' of
component Signup:password: Unknown validator type 'password'. Configured
validators are email, max, maxlength, min, minlength, none, regexp,
required."

@Validation 5.2 javadoc says "In addition, the value may include validator
macros. "

Am I missing something ?

Thank you,

Katia


Re: Eclipse IDE and TML code completion

2010-09-22 Thread Katia Aresti Gonzalez
Hi again,

You can simply adapt the plugin's values

${set your tld uri here}
${set your tld defaut namespace here}

Once TLD generated, you can add N user catalogues in Eclipse (one per tld
file) and you will have to explicitly change the URI and short name's values
which are unique.

We have already tested having Tapestry Core tld, TAPX tld and a custom
component TLD and it works.

Tapestry - URI = http://tapestry.apache.org/schema/tapestry_5_1_0.xsd
tapx - URI : tapestry-library:tapx

Our next step will be improving user documentation. :-)

Thanks for your feedback !

Katia

2010/9/22 Alessio Gambi 

> Hi,
>
> I managed (with some pain really) to install the tag library inside
> eclipse,
>
> I followed the tutorial on the "Tapestry5 How Tos" and it works fine for
> installing the t5.tld entry.
>
> But if I repeat the same procedure to install also the tld generated by
> your plugin, then eclipse either stops showing the auto completions or show
> only the last added (the ones belonging to my components).
>
> Then - but this is eclipse - if I remove all the user defined catalogs,
> refresh, clean and update dependencies for the project,  eclipse still shows
> the old auto completion tags.
>
> The only way I managed to show all the tags (basic t5 and my components) is
> to manually merge everything inside one single tls file and then load just
> that one using
> the http://tapestry.apache.org/schema/tapestry_5_1_0.xsd as Key value for
> the XML Catalog Wizard of eclipse.
>
>
> I think that a nice improvement to you plugin is to either merge all the
> tlds together (basic plus all the related components library projects and
> dependencies),
> or to programmatically add the tags definition to eclipse (for example by
> using some kind of eclipse plugin).
>
> -- Alessio
>
>
>
> On Sep 22, 2010, at 3:51 PM, Laurent Guerin wrote:
>
>  Happy to see that you could generate your TLD.
>>
>> The generated XML "tldgen-components-info.xml" is a temporary file used to
>> collect Javadoc informations on components.
>> We are aware about the m2Eclipse issue, it's already referenced in the
>> FAQ.
>>
>> Thank you for your feedback. We will check the classes.jar issue.
>>
>> 2010/9/22 Alessio Gambi 
>>
>>  Hi,
>>>
>>> I am using maven from eclipse (It did not worked) but apparently
>>> launching
>>> it from is fine.
>>>
>>> This is the printout of the tld file:
>>> 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-jsptaglibrary_2_1.xsd";
>>> version="2.1">
>>> 1.0
>>> t
>>>
>>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>>> 
>>>  
>>>  Dialog
>>>
>>> se.pmdit.tutorial.t5gwt.tapestry.components.Dialog
>>>  JSP
>>>  
>>>
>>>entryPoint
>>>true
>>>
>>>  java.lang.String
>>>
>>>  
>>>  
>>>
>>>componentType
>>>true
>>>
>>>  java.lang.String
>>>
>>>  
>>> 
>>> 
>>>  
>>>  GwtEntryPoint
>>>
>>>
>>> se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint
>>>  JSP
>>>  
>>>
>>>className
>>>true
>>>
>>>  java.lang.String
>>>
>>>  
>>> 
>>> 
>>>  
>>>  GwtComponent
>>>
>>>
>>> se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent
>>>  JSP
>>>  
>>>
>>>entryPoint
>>>true
>>>
>>>  java.lang.String
>>>
>>>  
>>>  
>>>
>>>componentType
>>>true
>>>
>>>  java.lang.String
>>>
>>>  
>>> 
>>> 
>>>  
>>>  GwtSupport
>>>
>>>
>>> se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport
>>>  JSP
>>> 
>>> 
>>>
>>>
>>> This is the tldgen-components-info.xml file:
>>> 
>>> 
>>> >> className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport"
>>> superClassName="java.lang.Object">
>>> 
>>> 
>>> 
>>> >> className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint"
>>> superClassName="java.lang.Object">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent"
>>> superClassName="java.lang.Object">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >>
>>> superClassName="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent">
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>> Hi Alessio,
>>>

 Thanks for your tests.

 which Maven version did you use ?


>>> mvn -version
>>> Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
>>>
>>> Java version: 1.6.0_20
>>> Java home:
>>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
>>> Default locale: en_US, platform encoding: MacRoman
>>> OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
>>>
>>>
>>> Additionally,
>>> I noticed also a strange behavior using m2eclipse:
>>>
>>> I downloaded the source code for the plugin that you provide
>>> Modified the pom.xml to remove the dependency on tools.jar
>>> The build fails because of a failing test:
>>>
>>>
>>>
>>> -

Re: Eclipse IDE and TML code completion

2010-09-22 Thread Katia Aresti Gonzalez
I meant to dire "executing" maven ... ^_^

2010/9/22 Katia Aresti Gonzalez 

> Hi !
>
> Thanks for testing ! Are you lancing maven with an eclipse plugin, from the
> console or another way ?
> We found some problems with eclipse m2 plugin.
>
> Katia
>
> 2010/9/22 Alessio Gambi 
>
> Forgot to say I am using tapestry 5.1.0.5
>>
>>
>>
>> On Sep 22, 2010, at 10:50 AM, Laurent Guerin wrote:
>>
>>  For those interested in using Eclipse code completion with tml files,
>>> EXANPE Team (Julien Maupoux, Katia Aresti and myself) has developped a
>>> Maven plugin that allow you to generate a tld describing any Tapestry 5
>>> components library.
>>>
>>> The plugin uses both Javadoc and @Parameter annotation to perform the
>>> generation.
>>>
>>> Once you have generated your TLD, just to configure Eclipse as described
>>> in the Wiki :
>>> http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse
>>>
>>> This plugin has been tested on Tapestry 5.2 itself (see result TLD
>>> attachment for test completion with core components).
>>>
>>> The source code of this plugin is available here :
>>> http://github.com/exanpe/tapestry-tldgen
>>>
>>> Informations, usage and notes available here :
>>> http://exanpe.free.fr/tapestry-tldgen/
>>>
>>>
>>> The plugin has been released as alpha version 1.0.0 and promoting into
>>> Maven central repository.
>>> So, all feedbacks are appreciated (directly on GitHub) !
>>>
>>> Best regards,
>>>
>>> Laurent Guerin
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>
>>
>


Re: Eclipse IDE and TML code completion

2010-09-22 Thread Katia Aresti Gonzalez
Hi !

Thanks for testing ! Are you lancing maven with an eclipse plugin, from the
console or another way ?
We found some problems with eclipse m2 plugin.

Katia

2010/9/22 Alessio Gambi 

> Forgot to say I am using tapestry 5.1.0.5
>
>
>
> On Sep 22, 2010, at 10:50 AM, Laurent Guerin wrote:
>
>  For those interested in using Eclipse code completion with tml files,
>> EXANPE Team (Julien Maupoux, Katia Aresti and myself) has developped a
>> Maven plugin that allow you to generate a tld describing any Tapestry 5
>> components library.
>>
>> The plugin uses both Javadoc and @Parameter annotation to perform the
>> generation.
>>
>> Once you have generated your TLD, just to configure Eclipse as described
>> in the Wiki :
>> http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse
>>
>> This plugin has been tested on Tapestry 5.2 itself (see result TLD
>> attachment for test completion with core components).
>>
>> The source code of this plugin is available here :
>> http://github.com/exanpe/tapestry-tldgen
>>
>> Informations, usage and notes available here :
>> http://exanpe.free.fr/tapestry-tldgen/
>>
>>
>> The plugin has been released as alpha version 1.0.0 and promoting into
>> Maven central repository.
>> So, all feedbacks are appreciated (directly on GitHub) !
>>
>> Best regards,
>>
>> Laurent Guerin
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
>


Re: throw new PageRedirectException

2010-09-22 Thread Katia Aresti Gonzalez
http://tapestry.apache.org/tapestry5/guide/pagenav.html

2010/9/22 asianCoolz 

> with throw new PageRedirectException("NextTapestryPage"); , i was redicectd
> to
> another page, but the url on the browser address bar is not change.   is
> there
> any method i can call "forward", so that use 'forward' to another page
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Textfield disabled return a null value

2010-09-21 Thread Katia Aresti Gonzalez
Why do you need to disable the autocomplete field this way ?
What happens if the user makes a mistake and chooses à wring value ?


A quick answer can be to use a hidden and fill it with the value in
JavaScript. This hidden value will be mapped with the java class. So when
submitting you will have your value
But I don't see the point of disabling this way

...




2010/9/21 Cucchietti Denis 

> Hi Katia,
>
> Yes its after submitting.
>
> It's on an autocomplete textfield. When the user select a value into the
> autocomplete list I have added some javascript in order to disable the
> textfield. But when I submit the form the textfield is null :-/.
>
> Is there another mean to forbid the user to change the value of the
> textfield?
>
> Thanks ;-)
>
> -Message d'origine-
> De : Katia Aresti Gonzalez [mailto:katiaare...@gmail.com]
> Envoyé : mardi 21 septembre 2010 17:10
> À : Tapestry users
> Objet : Re: Textfield disabled return a null value
>
> Do you mean after submitting ?
>
> When a field is disabled on HTML, this field's value is not submitted.
>
> where is this field's value coming from ?
>
>
>
> 2010/9/21 Cucchietti Denis 
>
> > Hi everybody !
> >
> > I have a little problem :
> >
> > I want to get a value from a field which is disabled but in my page.java
> > the property is null even if the textfield is not empty.
> >
> > The problem is that I don't want that the user modify the textfield...
> >
> > Thanks for your help in advance !
> >
> >
> >
> >
> > 
> >
> > Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage
> > exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le
> secret
> > professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> > imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne
> > pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos
> Origin
> > ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les
> > meilleurs efforts soient faits pour maintenir cette transmission exempte
> de
> > tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa
> > responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant
> d'un
> > virus transmis.
> >
> > This e-mail and the documents attached are confidential and intended
> solely
> > for the addressee; it may also be privileged. If you receive this e-mail
> in
> > error, please notify the sender immediately and destroy it. As its
> integrity
> > cannot be secured on the Internet, the Atos Origin group liability cannot
> be
> > triggered for the message content. Although the sender endeavours to
> > maintain a computer virus-free network, the sender does not warrant that
> > this transmission is virus-free and will not be liable for any damages
> > resulting from any virus transmitted.
> >
>
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> exclusif de ses destinataires. Il peut également être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin
> ne pourra être recherchée quant au contenu de ce message. Bien que les
> meilleurs efforts soient faits pour maintenir cette transmission exempte de
> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot be
> triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Textfield disabled return a null value

2010-09-21 Thread Katia Aresti Gonzalez
Do you mean after submitting ?

When a field is disabled on HTML, this field's value is not submitted.

where is this field's value coming from ?



2010/9/21 Cucchietti Denis 

> Hi everybody !
>
> I have a little problem :
>
> I want to get a value from a field which is disabled but in my page.java
> the property is null even if the textfield is not empty.
>
> The problem is that I don't want that the user modify the textfield...
>
> Thanks for your help in advance !
>
>
>
>
> 
>
> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage
> exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne
> pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin
> ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les
> meilleurs efforts soient faits pour maintenir cette transmission exempte de
> tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa
> responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot be
> triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>


Re: Alternating table rows

2010-09-14 Thread Katia Aresti Gonzalez
For java CSS logic reticent people :

Imagine you need more complex css logic depending not only on even/odd row,
but on the number of the elements you have in your table too, or even the
values of these elements, and depending on a pagination component too. How
will you TML look like ? like an old horrible JSP. Not only that, you won't
be able to do everything you did before to manage this kind of logic, as TML
are correct XML files.

I think that putting this kind "css logic" in the TML is just a bad idea.
This is the way to code JSP. JSP-s are not readable, they are a pain, and
separation between class and code is just not true in real world (In JSP, we
usually had to put java code to manage this kind of logic).
You will repeat yourself all over and over in your application, your code
won't be readable, neither cleaner, maintainable and you separation between
styles and just code won't be better.

Think in "odd" and "even" as identifiers, and let to your TML to add another
css class too, just as an example for your case like this :



If you have a look to Tapestry Grid component source code, you will see how,
for example, the generic CSS name as "t-first" or "t-last" are applied to
the first and last row. You can add your own css class too to the grid, this
class will be rendered, so within t-first and t-last, you will be able to
overload a different style just for the first or the last row in the Grid.
MCV pattern just works perfect.


2010/9/14 Gunnar Eketrapp 

> Hi John! (Still alive ?)
>
> I was also frustrated about the simplicity of the template language at the
> start.
> You can't (or couldn't even) negate a test!
>
> But the philosophy of T5 is to put all logic in java ... and after using T5
> succesfully in a big rewrite of an existing site I must say that I agree
> with this.
>
> I added following utility methods in my base class ...
>
>//
> ---
>// -- Utility methods for all our children --
>//
> ---
>
>private boolean odd = true;
>
> public String getOddOrEvenStep() {
> odd = !odd;
> return odd ? "odd" : "even";
> }
>  public String getOddOrEvenStay() {
> return odd ? "odd" : "even";
> }
>
>
> /Gunnar Eketrapp
>
> 2010/9/14 John Doe 
>
> > Yes, I could do that, but that would mean putting CSS in Java classes and
> I
> > would prefer avoiding that.
> >
> > Does Tapestry 5 have any support for conditions like "index % 2 == 0" in
> > templates?
> >
> >
> >
> >
> > 
> > From: Stephan Windmüller 
> > To: users@tapestry.apache.org
> > Sent: Tue, September 14, 2010 11:17:03 AM
> > Subject: Re: Alternating table rows
> >
> > On 14.09.2010 10:01, John Doe wrote:
> >
> > > How can I make the alternating rows?
> >
> > Use the following code:
> >
> > private boolean switch;
> >
> > public String getSwitchedClass() {
> >switch = !switch;
> >
> >return switch ? "odd" : "even";
> > }
> >
> > And in the tml:
> >
> > 
> >
> > HTH
> > Stephan
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
> >
> >
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>


Re: Deal with URL as a parameter and redirect

2010-09-08 Thread Katia Aresti Gonzalez
I don't understand what do you mean about "reverse solution".

What exactly are you trying to do ? Why do you need to pass the URL as an
url  parameter ?


2010/9/9 t5.0 

>
> Thanks but I'm looking for the "reverse" solution: handle a URL provided to
> the page.
>
> I tried with a onActivate(url) based page but it seems Tapestry prevents
> the
> URL to be passed as a parameter, since it interprets the '/' as parameter
> separator.
>
> Is there a way for *one* to prevent this interpretation and let a URL be
> specified as a parameter?
>
> (tried by replacing the '/' and ':' with their % equivalents, but the
> problem persists)
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Deal-with-URL-as-a-parameter-and-redirect-tp2807631p2826965.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: Deal with URL as a parameter and redirect

2010-09-08 Thread Katia Aresti Gonzalez
Concerning to

*"URL given as a parameter to a page"*

Be careful, as this practice is not considered a good idea at all ;)

You can read here why : http://www.owasp.org/index.php/Top_10_2010-A10

Thanks Christophe Cordenier for the tip


2010/9/8 Katia Aresti Gonzalez 

> Hi,
>
> You can return an URL object and this will perform the redirect like this
> example :
>
> public Object onActivate()
> {
>
> URL myURL= null;
>
> try
> {
> myURL= new URL("http://www.google.com";);
> }
> catch (MalformedURLException e)
> {
> //logs
> }
>
> return myURL;
> }
>
>
> 2010/9/8 t5.0 
>
>
>> What is the best strategy to deal with a URL given as a parameter to a
>> page,
>> and then perform a redirect to it, with Tapestry 5.0.x
>>
>> 1. onActivate
>>
>> @Inject
>> private Response response;
>>
>>
>> public void onActivate(String url) {
>>
>>  ...some processing with url...
>>
>>  response.sendRedirect(url);
>> }
>>
>>
>> 2. Filter
>>
>> 3. Or ??
>>
>> Thank you.
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Deal-with-URL-as-a-parameter-and-redirect-tp2807631p2807631.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: Deal with URL as a parameter and redirect

2010-09-08 Thread Katia Aresti Gonzalez
Hi,

You can return an URL object and this will perform the redirect like this
example :

public Object onActivate()
{

URL myURL= null;

try
{
myURL= new URL("http://www.google.com";);
}
catch (MalformedURLException e)
{
//logs
}

return myURL;
}


2010/9/8 t5.0 

>
> What is the best strategy to deal with a URL given as a parameter to a
> page,
> and then perform a redirect to it, with Tapestry 5.0.x
>
> 1. onActivate
>
> @Inject
> private Response response;
>
>
> public void onActivate(String url) {
>
>  ...some processing with url...
>
>  response.sendRedirect(url);
> }
>
>
> 2. Filter
>
> 3. Or ??
>
> Thank you.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Deal-with-URL-as-a-parameter-and-redirect-tp2807631p2807631.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: GSOC 2010 project is finishing

2010-08-16 Thread Katia Aresti Gonzalez
congratulations pablo !

2010/8/17 cleverpig 

> really cool~
>
> On Tue, Aug 17, 2010 at 11:32 AM, Pablo dos Reis 
> wrote:
> > Hi everyone,
> >
> > My GSOC 2010 project is finishing
> > Then I uploaded the code example in my tapestry wiki page [0]
> > There are a link called "App Example"[1] to code
> >
> > In this project I created
> >
> >   - Drag and Drop palette (component)
> >   - AutoCompleteSelect (mixin)
> >   - AutoCompleteObject and MixinAutoCompleteObject (component and mixin)
> >
> >
> > I believe that two first components will be use  in T5.2.x and the third
> > component maybe.
> >  Between what I learned from GSOC highlight the importance of the
> 'tapestry
> > list'. I think it is the good way to integrate all tapestry users and
> help
> > us with doubts and the best ways to do something.
> > I had a low participation in the list before the GSOC but now I have sure
> > that I will be more present to help and to be helped.
> > I also learned that to coding components in tapestry is very easy and can
> > help a lot in ours applications.
> > I hope I have met the expectations of the community and I can participate
> in
> > other projects.
> >
> >
> > Thank you everybody!
> >
> > [0]http://wiki.apache.org/general/PabloGSOC2010
> > [1]
> >
> http://wiki.apache.org/general/PabloGSOC2010%3Faction%3DAttachFile%26do%3Dget%26target%3DAppExample.zip
> >
> >
> > --
> > Pablo Henrique dos Reis
> >
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liu...@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: cleverpig.name/dan/
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5.1 - Problem with form submission and zone rerendering

2010-08-12 Thread Katia Aresti Gonzalez
Thabks for d'acces :)

Anyway, I'm happy to know tyou solved your problem, even if i dnd't help a
lot in the end .)

good luck with your tapestry project

2010/8/12 Josh Canfield 

> > Thank you very much!!! This is great.
> >  Now it works!
> Great!
>
> > I'm sorry for badly written question
>
> No worries, I'm just lazy and don't want to have to think too hard ;)
>
> -- Josh
>
> On Aug 12, 2010, at 3:51 AM, Tornn  wrote:
>
> > Hi Josh!
> >
> >  Thank you very much!!! This is great.
> >  Now it works!
> >
> >  I'm not sure if this is last issue on my way, but this current issue
> > is solved. Thank you again.
> >
> >  p.s. I'm sorry for badly written question. I will try harder to
> > write good questions, which will save community time.
> >
> > 2010/8/12 Josh Canfield :
> >> Hi Karpushin Sergey.
> >>
> >>>
> >> Don't use ${} notation within bound parameters. This can cause
> >> problems in other situations (casts the value to a string).
> >>
> >>>  The first problem is that tapestry cant automatically restore state
> >>> of ActivityJournalItem component. When I receive event onSuccess for
> >>> the form - fields of custom types are null.
> >>
> >> What you put in your form elements is significant so you need to show
> >> at least one of the fields that are set to null. If you use accessors
> >> like value="activity.name" then you are telling tapestry to use a
> >> property conduit and it will try to set that value when the form is
> >> submitted. If you are using value="${activity.name}" then you are
> >> passing a string to Tapestry and it will not try to update it during
> >> submit.
> >>
> >>>  The second problem and I can't find out how to solve it - tapestry
> >>> rerenders always first component instance ActivityJournalItem.
> >>
> >> As was previously mentioned you are binding to a single zone id
> >> "activityAjaxZone" which exists only once on the page for the first
> >> item rendered with that component id. You need each of your forms and
> >> zones to use a specific unique zoneId.  The zone ids generated need to
> >> be unique to the page so you don't update the wrong zone. You can
> >> figure out a naming scheme.
> >>
> >> Here is a simple example:
> >>
> >> 
> >> 
> >> id="myPageUniqueZoneIdPrefix_${loopIndex}">
> >>Hello! Click
> >> >> zone="myPageUniqueZoneIdPrefix_${loopIndex}">${now}
> >>
> >> 
> >>
> >> // support class property/methods
> >>
> >>@Property
> >>private int _loopIndex;
> >>
> >>public Block onUpdate() {
> >>return ((Zone)
> >> _resources.getEmbeddedComponent("notUsedForDOMId")).getBody();
> >>}
> >>
> >>public String getNow() {
> >>return new Date().toString();
> >>}
> >>
> >> Please consider that when you submit questions you need to break the
> >> problem down to the simplest elements. When you cut and paste
> >> incomplete or large portions of code with extraneous elements then it
> >> generates extra work for those who would like to help. I think you'll
> >> find that if you spend the time to simplify the problem you'll not
> >> only have a higher chance of solving it yourself (things jump out when
> >> you remove all the cruft) but you'll also get better help from
> >> whatever community you are asking for help.
> >>
> >> Here is your code broken down into the bare essentials, same problems
> >> but much more approachable for a fresh set of eyes:
> >>
> >> 
> >>
> >>
> >>
> >>
> >> >> t:zone="activityAjaxZone">
> >>
> >>
> >> value="Cancel"/>
> >>
> >>
> >>
> >>
> >>
> >> 
> >>
> >>
> >> Good luck!
> >>
> >> Josh
> >>
> >> On Tue, Aug 10, 2010 at 2:07 PM, Tornn 
> wrote:
> >>> Hi All! You are my last hope. I tried to resolve it by myself, I asked
> >>> (http://tinyurl.com/2btkmzk) at stackoverflow.com but with no success
> >>> yet.
> >>>
> >>>  A little background. I'm very interested in tapestry (and currently
> >>> considering using it in production) because it looks like very
> >>> efficient (in all senses) framework. And it looks like
> >>> component-oriented framework. So I'm trying to work with it in a
> >>> component way.
> >>>
> >>>  I'll try to fully describe problem.
> >>>
> >>>  I have page with loop of components, where every component have its
> >>> own loop and other component in it. Inner component has form in it.
> >>> Every component is enclosed in zone, because we want responsive UI and
> >>> going to refresh only some portions of the page.
> >>>  Within page I have following code:
> >>>  
> >>> />
> >>>  
> >>>
> >>>  By the way, page activated in some context (conversation-id).
> >>>
> >>>  Component DayJournalItem has following code:
> >>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
> >>>  
> >>>${dayHeader}
> >>>
> >>>  
> >>> >>> cacheContainer="cacheCon

Re: T5.1 - Problem with form submission and zone rerendering

2010-08-11 Thread Katia Aresti Gonzalez
I've checkout your code this afternoon in order to make it run. i didn't
have much time, i had thing to do.

can you tell me all about your development and runtime environment, please ?
you are not using maven, are you using jetty to run the project ? tomcat ?
do I need to configure something in particular to make it work ?


2010/8/11 Tornn 

> So.., no one can help to solve this problem?
>
> 2010/8/11 Tornn :
> > Hi Markus!
> >
> >  Thank you for your response!
> >  I tried to do that. But if I add id="something${counter}" where
> > counter is just a number it stops working at all.
> >  It renders ok. But buttons do nothing - they cannot submit the form.
> >
> >  If I generate ${counter} as it Tapestry does ({"", "_0", "_1", ,
> > "_n"}), that I have the same behavior as earlier - it rerenders only
> > the first "instance" of control at the page.
> >
> >  I tried to use only "id". And "id" and "t:id". Result is the same.
> > With simple counter as a number it stops working, with tapestry-like
> > counter it rerenders only the first "instance".
> >
> >  p.s. When I say "first instance" I mean "first render" of component
> > (Katia, thanks for comments).
> >
> > 2010/8/11 Markus Feindler :
> >> Each zone in a loop must have a unique id, so you have to create an id
> for
> >> example like this:
> >>
> >> ${zoneId}
> >>
> >> private int idcounter;
> >>
> >> public String getZoneId() {
> >>   return "randomtext" + idcounter++;
> >> }
> >>
> >> Otherwise only the first zone will be updated. Use id instead of t:id
> for
> >> zones.
> >>>
> >>> Hi All! You are my last hope. I tried to resolve it by myself, I asked
> >>> (http://tinyurl.com/2btkmzk) at stackoverflow.com but with no success
> >>> yet.
> >>>
> >>>  A little background. I'm very interested in tapestry (and currently
> >>> considering using it in production) because it looks like very
> >>> efficient (in all senses) framework. And it looks like
> >>> component-oriented framework. So I'm trying to work with it in a
> >>> component way.
> >>>
> >>>  I'll try to fully describe problem.
> >>>
> >>>  I have page with loop of components, where every component have its
> >>> own loop and other component in it. Inner component has form in it.
> >>> Every component is enclosed in zone, because we want responsive UI and
> >>> going to refresh only some portions of the page.
> >>>  Within page I have following code:
> >>>  
> >>> />
> >>>  
> >>>
> >>>  By the way, page activated in some context (conversation-id).
> >>>
> >>>  Component DayJournalItem has following code:
> >>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
> >>>  
> >>>${dayHeader}
> >>>
> >>>  
> >>> >>> cacheContainer="cacheContainer" />
> >>>   
> >>>
> >>>  
> >>>  
> >>>
> >>>  And component ActivityJournalItem has this code (I wiped out form
> >>> fields and markup, as it's not important now. I think):
> >>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
> >>>  
> >>>
> >>>
> >>> t:zone="activityAjaxZone">
> >>>   
> >>>  
> >>>  
> >>>
> >>>
> >>>
> >>>
> >>>viewing activity: ${activity.id}
> >>>
> >>>  
> >>>
> >>>  The first problem is that tapestry cant automatically restore state
> >>> of ActivityJournalItem component. When I receive event onSuccess for
> >>> the form - fields of custom types are null. I solved this problem with
> >>> pretty dirty work-around (I'm passing token with t:context and
> >>> restoring state from custom cache object. I'm receiving token with
> >>> onSuccess(String token)). So this problem can be considered solved,
> >>> but i think that there may be some better solution. More native for
> >>> tapestry. Like t:encoder when we using loop inside forms.)
> >>>
> >>>  The second problem and I can't find out how to solve it - tapestry
> >>> rerenders always first component instance ActivityJournalItem. If with
> >>> loop we rendered 3 times, not depending what button was pressed always
> >>> exactly first zone is rerendered. Screenshoot:
> >>> http://my.jetscreenshot.com/2672/20100808-thdx-190kb.jpg
> >>>
> >>>  So my question is: How to solve second problem and maybe there is
> >>> better solution for the first problem.
> >>>
> >>>  I have a very little understanding on how tapestry internally works,
> >>> and I think there is something wrong with ids. Every zone in rendered
> >>> html has its own unique ID, but I cant see it when injecting zone with
> >>> "@Component Zone activityAjaxZone;". The clientId is null - maybe this
> >>> is the problem. And if I specify not only t:id but also id like
> >>> 'id="activityAjaxZone${someCustomToken}"  ' it will result in other
> >>> problem - buttons do nothing - I can press it all day but no errors,
> >>> no actions - nothing.
> >>>   I tried to debug, but there are many code injected in my class at
> >>> real-time, so I can't debug it.
> >>>
> >>>  p.s. By the way - my test proj

Re: T5.1 - Problem with form submission and zone rerendering

2010-08-10 Thread Katia Aresti Gonzalez
i meant to say


...


You are redering one component instance "activityJournalItem" in your loop,
three times the same component instance. inside this component a component
zone with t:id activityAjaxZone. in the end you are rendering the same
component all the time... as t:id are uniques




2010/8/10 Katia Aresti Gonzalez 

> Hi,
>
>
> The second problem and I can't find out how to solve it - tapestry
> rerenders always first component instance ActivityJournalItem. If with
> loop we rendered 3 times, not depending what button was pressed always
> exactly first zone is rerendered.
>
> I didn't check your code google project, but I had a look to your code.
>
> Every component has an unique tapestry id (t:id). When you loop like this :
>
>
>  
> cacheContainer="
>>
>> cacheContainer" />
>>   
>
>
> where the code inside t:ActivityJournalItem is
>
>
>  
> ...
> 
>
> You are injecting the component with t:id="ActivityJournalItem" in your
> loop. So three times the same component.
>
>
>
>
>
> 2010/8/10 Tornn 
>
> Hi All! You are my last hope. I tried to resolve it by myself, I asked
>> (http://tinyurl.com/2btkmzk) at stackoverflow.com but with no success
>> yet.
>>
>>  A little background. I'm very interested in tapestry (and currently
>> considering using it in production) because it looks like very
>> efficient (in all senses) framework. And it looks like
>> component-oriented framework. So I'm trying to work with it in a
>> component way.
>>
>>  I'll try to fully describe problem.
>>
>>  I have page with loop of components, where every component have its
>> own loop and other component in it. Inner component has form in it.
>> Every component is enclosed in zone, because we want responsive UI and
>> going to refresh only some portions of the page.
>>  Within page I have following code:
>>  
>>
>>  
>>
>>  By the way, page activated in some context (conversation-id).
>>
>>  Component DayJournalItem has following code:
>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>  
>>${dayHeader}
>>
>>  
>>> cacheContainer="cacheContainer" />
>>   
>>
>>  
>>  
>>
>>  And component ActivityJournalItem has this code (I wiped out form
>> fields and markup, as it's not important now. I think):
>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>  
>>
>>
>>
>>   
>>  
>>  
>>
>>
>>
>>
>>viewing activity: ${activity.id}
>>
>>  
>>
>>  The first problem is that tapestry cant automatically restore state
>> of ActivityJournalItem component. When I receive event onSuccess for
>> the form - fields of custom types are null. I solved this problem with
>> pretty dirty work-around (I'm passing token with t:context and
>> restoring state from custom cache object. I'm receiving token with
>> onSuccess(String token)). So this problem can be considered solved,
>> but i think that there may be some better solution. More native for
>> tapestry. Like t:encoder when we using loop inside forms.)
>>
>>  The second problem and I can't find out how to solve it - tapestry
>> rerenders always first component instance ActivityJournalItem. If with
>> loop we rendered 3 times, not depending what button was pressed always
>> exactly first zone is rerendered. Screenshoot:
>> http://my.jetscreenshot.com/2672/20100808-thdx-190kb.jpg
>>
>>  So my question is: How to solve second problem and maybe there is
>> better solution for the first problem.
>>
>>  I have a very little understanding on how tapestry internally works,
>> and I think there is something wrong with ids. Every zone in rendered
>> html has its own unique ID, but I cant see it when injecting zone with
>> "@Component Zone activityAjaxZone;". The clientId is null - maybe this
>> is the problem. And if I specify not only t:id but also id like
>> 'id="activityAjaxZone${someCustomToken}"  ' it will result in other
>> problem - buttons do nothing - I can press it all day but no errors,
>> no actions - nothing.
>>   I tried to debug, but there are many code injected in my class at
>> real-time, so I can't debug it.
>>
>>  p.s. By the way - my test project is open-source and you can look at
>> full source code at google code:
>> http://code.google.com/p/tasks-journal/source/checkout
>>
>> --
>> Best regards,
>>  Karpushin Sergey.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: T5.1 - Problem with form submission and zone rerendering

2010-08-10 Thread Katia Aresti Gonzalez
Another person had the same problem (differently and more simple)

I copy the mail with a tapestry commiter answer :)

Hi!


 if if call mutliple type my component like :
>
> 
> 
>

You have two different instances (objects) of your count component.


 
>
> 
>

Now you have one instance being rendered twice.


 Is this intended or a bug ?
>

This is how Tapestry works. Static structure, dynamic behavior. ;)


2010/8/10 Katia Aresti Gonzalez 

> Hi,
>
>
> The second problem and I can't find out how to solve it - tapestry
> rerenders always first component instance ActivityJournalItem. If with
> loop we rendered 3 times, not depending what button was pressed always
> exactly first zone is rerendered.
>
> I didn't check your code google project, but I had a look to your code.
>
> Every component has an unique tapestry id (t:id). When you loop like this :
>
>
>  
> cacheContainer="
>>
>> cacheContainer" />
>>   
>
>
> where the code inside t:ActivityJournalItem is
>
>
>  
> ...
> 
>
> You are injecting the component with t:id="ActivityJournalItem" in your
> loop. So three times the same component.
>
>
>
>
>
> 2010/8/10 Tornn 
>
> Hi All! You are my last hope. I tried to resolve it by myself, I asked
>> (http://tinyurl.com/2btkmzk) at stackoverflow.com but with no success
>> yet.
>>
>>  A little background. I'm very interested in tapestry (and currently
>> considering using it in production) because it looks like very
>> efficient (in all senses) framework. And it looks like
>> component-oriented framework. So I'm trying to work with it in a
>> component way.
>>
>>  I'll try to fully describe problem.
>>
>>  I have page with loop of components, where every component have its
>> own loop and other component in it. Inner component has form in it.
>> Every component is enclosed in zone, because we want responsive UI and
>> going to refresh only some portions of the page.
>>  Within page I have following code:
>>  
>>
>>  
>>
>>  By the way, page activated in some context (conversation-id).
>>
>>  Component DayJournalItem has following code:
>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>  
>>${dayHeader}
>>
>>  
>>> cacheContainer="cacheContainer" />
>>   
>>
>>  
>>  
>>
>>  And component ActivityJournalItem has this code (I wiped out form
>> fields and markup, as it's not important now. I think):
>>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>  
>>
>>
>>
>>   
>>  
>>  
>>
>>
>>
>>
>>viewing activity: ${activity.id}
>>
>>  
>>
>>  The first problem is that tapestry cant automatically restore state
>> of ActivityJournalItem component. When I receive event onSuccess for
>> the form - fields of custom types are null. I solved this problem with
>> pretty dirty work-around (I'm passing token with t:context and
>> restoring state from custom cache object. I'm receiving token with
>> onSuccess(String token)). So this problem can be considered solved,
>> but i think that there may be some better solution. More native for
>> tapestry. Like t:encoder when we using loop inside forms.)
>>
>>  The second problem and I can't find out how to solve it - tapestry
>> rerenders always first component instance ActivityJournalItem. If with
>> loop we rendered 3 times, not depending what button was pressed always
>> exactly first zone is rerendered. Screenshoot:
>> http://my.jetscreenshot.com/2672/20100808-thdx-190kb.jpg
>>
>>  So my question is: How to solve second problem and maybe there is
>> better solution for the first problem.
>>
>>  I have a very little understanding on how tapestry internally works,
>> and I think there is something wrong with ids. Every zone in rendered
>> html has its own unique ID, but I cant see it when injecting zone with
>> "@Component Zone activityAjaxZone;". The clientId is null - maybe this
>> is the problem. And if I specify not only t:id but also id like
>> 'id="activityAjaxZone${someCustomToken}"  ' it will result in other
>> problem - buttons do nothing - I can press it all day but no errors,
>> no actions - nothing.
>>   I tried to debug, but there are many code injected in my class at
>> real-time, so I can't debug it.
>>
>>  p.s. By the way - my test project is open-source and you can look at
>> full source code at google code:
>> http://code.google.com/p/tasks-journal/source/checkout
>>
>> --
>> Best regards,
>>  Karpushin Sergey.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: T5.1 - Problem with form submission and zone rerendering

2010-08-10 Thread Katia Aresti Gonzalez
Hi,

The second problem and I can't find out how to solve it - tapestry
rerenders always first component instance ActivityJournalItem. If with
loop we rendered 3 times, not depending what button was pressed always
exactly first zone is rerendered.

I didn't check your code google project, but I had a look to your code.

Every component has an unique tapestry id (t:id). When you loop like this :

 
   
>   


where the code inside t:ActivityJournalItem is

 
...


You are injecting the component with t:id="ActivityJournalItem" in your
loop. So three times the same component.





2010/8/10 Tornn 

> Hi All! You are my last hope. I tried to resolve it by myself, I asked
> (http://tinyurl.com/2btkmzk) at stackoverflow.com but with no success
> yet.
>
>  A little background. I'm very interested in tapestry (and currently
> considering using it in production) because it looks like very
> efficient (in all senses) framework. And it looks like
> component-oriented framework. So I'm trying to work with it in a
> component way.
>
>  I'll try to fully describe problem.
>
>  I have page with loop of components, where every component have its
> own loop and other component in it. Inner component has form in it.
> Every component is enclosed in zone, because we want responsive UI and
> going to refresh only some portions of the page.
>  Within page I have following code:
>  
>
>  
>
>  By the way, page activated in some context (conversation-id).
>
>  Component DayJournalItem has following code:
>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>  
>${dayHeader}
>
>  
> cacheContainer="cacheContainer" />
>   
>
>  
>  
>
>  And component ActivityJournalItem has this code (I wiped out form
> fields and markup, as it's not important now. I think):
>  http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>  
>
>
>
>   
>  
>  
>
>
>
>
>viewing activity: ${activity.id}
>
>  
>
>  The first problem is that tapestry cant automatically restore state
> of ActivityJournalItem component. When I receive event onSuccess for
> the form - fields of custom types are null. I solved this problem with
> pretty dirty work-around (I'm passing token with t:context and
> restoring state from custom cache object. I'm receiving token with
> onSuccess(String token)). So this problem can be considered solved,
> but i think that there may be some better solution. More native for
> tapestry. Like t:encoder when we using loop inside forms.)
>
>  The second problem and I can't find out how to solve it - tapestry
> rerenders always first component instance ActivityJournalItem. If with
> loop we rendered 3 times, not depending what button was pressed always
> exactly first zone is rerendered. Screenshoot:
> http://my.jetscreenshot.com/2672/20100808-thdx-190kb.jpg
>
>  So my question is: How to solve second problem and maybe there is
> better solution for the first problem.
>
>  I have a very little understanding on how tapestry internally works,
> and I think there is something wrong with ids. Every zone in rendered
> html has its own unique ID, but I cant see it when injecting zone with
> "@Component Zone activityAjaxZone;". The clientId is null - maybe this
> is the problem. And if I specify not only t:id but also id like
> 'id="activityAjaxZone${someCustomToken}"  ' it will result in other
> problem - buttons do nothing - I can press it all day but no errors,
> no actions - nothing.
>   I tried to debug, but there are many code injected in my class at
> real-time, so I can't debug it.
>
>  p.s. By the way - my test project is open-source and you can look at
> full source code at google code:
> http://code.google.com/p/tasks-journal/source/checkout
>
> --
> Best regards,
>  Karpushin Sergey.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Upgrading from 5.1 to 5.2

2010-08-08 Thread Katia Aresti Gonzalez
Hi Andreas,
I thank you! I will definitively take some time during this week to fix and
take your advices in oout tapestwitter application.

best regards,

Katia



2010/8/7 Guerin Laurent 

> Hi Andreas,
>
> Thank you for your random choice :-)
>
> With Katia (co-author) we are planning to upgrade this little Tapestry demo
> to 5.2 version soon and add some enhanced components.
> Thank you for your advices and your pull request on GitHub.
>
> Regards,
>
> Laurent Guerin
>
> Envoyé de mon iPhone
>
> Le 7 août 2010 à 04:26, "Andreas Andreou"  a écrit :
>
> So, i picked a random 5.1 project from github (
> http://github.com/lguerin/tapestwitter )
> forked it, upgraded it to 5.2 and fixed all deprecation warnings...
> take a look /comment at the
> change logs at [1] and [2]
>
> I've found 2 small things worth noticing:
> 1) the project was building a JSONObject and outputting it INSIDE a js
> string - because by default
> the json is now pretty-printed, the newlines where causing js errors.
> The fix was to use json.toString(true)
> 2) The old renderSupport.addInit could accept a JSONArray and map the
> elements to the function's arguments
> Now you should build a JSONObject which will become the only argument
> of the function and use javaScriptSupport...
> Of course that's already documented and explained at [3] but i'm
> thinking the old way will appear more straightforward
> to some (i did spend some minutes trying to find how to send that
> second parameter before understanding that i should
> just bundle it along with the first inside a json)
>
>
> [1]
> 
> http://github.com/andyhot/tapestwitter/commit/2dd797629cd0506a9fc5625e71100170c0cde300
> [2]
> 
> http://github.com/andyhot/tapestwitter/commit/b815eb395d9e820833ebf875a310b6d440f65f46
> [3]
> 
> http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/RenderSupport.html#addInit%28java.lang.String,%20org.apache.tapestry5.json.JSONArray%29
>
>
> --
> Andreas Andreou - andy...@apache.org - 
> http://blog.andyhot.gr
> Tapestry PMC / Tacos developer
> Open Source / JEE Consulting
>
> -
> To unsubscribe, e-mail: 
> users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: 
> users-h...@tapestry.apache.org
>
>


Re: Tapestry Training: London (Oct 2010)

2010-08-05 Thread Katia Aresti Gonzalez
Yes, that's why we have to say that this backwards compatibility it's not a
problem, loud and and clear.
Other frameworks mains versions are incompatible too.

I would love to keep up staring up for more than 4 days !! :)
Sadly our project was cancelled ... no project, no formation.
more pub -> more people knows about tapestry 5.x -> more people proposes the
framework to their clients -> more projects coming -> more knowledge needed
-> more formations, :)

About localisation : Paris is the best place in France. Paris is very well
connected to the other french capitals by train(tgv) and plane. Connected to
London in 2 hours by train.


2010/8/5 Gerald Bauer 

> I think one reason people fear Tapestry is it's backward compatibility
> history. Another reason is the ugliness of Howard. I can't imagine how
> people could keep up staring that ugly man for ours during courses or
> presentation :(
>
> On Thu, Aug 5, 2010 at 11:16 PM, Katia Aresti Gonzalez <
> katiaare...@gmail.com> wrote:
>
> > Laurent and me live in Paris. We work for a big international french
> > company.
> >
> > We were aware about these formations since last year because we are
> > tapestry
> > followers.
> > Last year, in may 2009, our client wanted to migrate from struts 1.x to
> > tapestry 5.x.
> > We started to learn Tapestry by ourselves. After that, we followed an
> > external formation in June 2009 (Paris), 3 days with a similar cost.
> > Our company had no problem to send us despite of the price.
> > Later, we knew you where coming to Paris and we even thought on a second
> > formation as first one was very light. Our company was ok to send us to a
> > second formation with you. Despite of the cost again!
> > Small freelancers might see the cost as problem... but not companies.
> >
> > Migration was in standby and finally we didn't do it... (we where sad).
> We
> > where very disappointed and we had the felling that Tapestry was not
> known
> > in our company. So we coded a Tapestry Demo and we started to do an
> > internal
> > tapestry publicity. We did a presentation in order to make people know
> > Tapestry. We arrived to make somebody to choose Tapestry as the
> > presentation
> > framework on a internal project.
> > Workers making other people inside their companies to know Tapestry -
> > despite on their actual missions - it's mandatory.
> >
> > Globally speaking, we have noticed the name "Tapestry" is known by
> several
> > people in France, but in general we have checked that people don't know
> the
> > framework at all.
> > The point is that in France nobody has already done a JUG conference
> about
> > Tapestry (neither Paris JUG or a smaller JUGs). We can't say the same
> thing
> > about JSF 2 and Wicket, for example; jsf 2 and wicket people have done
> > several presentations all over France Jugs during the last couple of
> years.
> > Publicity, not only in big conferences where not everybody can go, is
> > mandatory.
> > Experts giving conferences and presentations in their countries and
> cities
> > make people's interest to grow.
> >
> > Obviously there are probably more factors. :-)
> >
> >
> > 2010/8/5 Howard Lewis Ship 
> >
> > > I'm once again partnering with SkillsMatter to teach my full Tapestry
> > > workshop. This is an expanded version of the class, which is growing
> from
> > > three days up to four; the additional day will ensure that we have time
> > for
> > > all the existing materials, and add a new section on testing using
> > TestNG,
> > > Selenium and Groovy. It will also give us more time to explore student
> > > directed ideas, such as security and meta-programming.
> > >
> > > The class will be taught at SkillsMatter's offices in London, from
> > October
> > > 5th through the 8th.
> > >
> > > I'm curious how many people are aware of this training, and how many
> > people
> > > are located geographically to take advantage of it. I've done the 3 day
> > > version of the class twice at SkillsMatter, and I'm looking forward to
> > the
> > > full 4 day class.
> > >
> > > I'd like to start a discussion about what it would take to get more
> > people
> > > to attend the class, and/or what's keeping people from attending (cost,
> > > location, etc.).
> > >
> > > Two other notes:
> > >
> > > - There will probably be another teach in Paris, in December
> > > - The workshop is normally taught on-site for a specific company (I do
> > such
> > > a teach 2 - 3 times / year)
> > >
> > > --
> > > Howard M. Lewis Ship
> > >
> > > Creator of Apache Tapestry
> > >
> > > The source for Tapestry training, mentoring and support. Contact me to
> > > learn
> > > how I can get you up and productive in Tapestry fast!
> > >
> > > (971) 678-5210
> > > http://howardlewisship.com
> > >
> >
>


Re: Tapestry Training: London (Oct 2010)

2010-08-05 Thread Katia Aresti Gonzalez
Laurent and me live in Paris. We work for a big international french
company.

We were aware about these formations since last year because we are tapestry
followers.
Last year, in may 2009, our client wanted to migrate from struts 1.x to
tapestry 5.x.
We started to learn Tapestry by ourselves. After that, we followed an
external formation in June 2009 (Paris), 3 days with a similar cost.
Our company had no problem to send us despite of the price.
Later, we knew you where coming to Paris and we even thought on a second
formation as first one was very light. Our company was ok to send us to a
second formation with you. Despite of the cost again!
Small freelancers might see the cost as problem... but not companies.

Migration was in standby and finally we didn't do it... (we where sad). We
where very disappointed and we had the felling that Tapestry was not known
in our company. So we coded a Tapestry Demo and we started to do an internal
tapestry publicity. We did a presentation in order to make people know
Tapestry. We arrived to make somebody to choose Tapestry as the presentation
framework on a internal project.
Workers making other people inside their companies to know Tapestry -
despite on their actual missions - it's mandatory.

Globally speaking, we have noticed the name "Tapestry" is known by several
people in France, but in general we have checked that people don't know the
framework at all.
The point is that in France nobody has already done a JUG conference about
Tapestry (neither Paris JUG or a smaller JUGs). We can't say the same thing
about JSF 2 and Wicket, for example; jsf 2 and wicket people have done
several presentations all over France Jugs during the last couple of years.
Publicity, not only in big conferences where not everybody can go, is
mandatory.
Experts giving conferences and presentations in their countries and cities
make people's interest to grow.

Obviously there are probably more factors. :-)


2010/8/5 Howard Lewis Ship 

> I'm once again partnering with SkillsMatter to teach my full Tapestry
> workshop. This is an expanded version of the class, which is growing from
> three days up to four; the additional day will ensure that we have time for
> all the existing materials, and add a new section on testing using TestNG,
> Selenium and Groovy. It will also give us more time to explore student
> directed ideas, such as security and meta-programming.
>
> The class will be taught at SkillsMatter's offices in London, from October
> 5th through the 8th.
>
> I'm curious how many people are aware of this training, and how many people
> are located geographically to take advantage of it. I've done the 3 day
> version of the class twice at SkillsMatter, and I'm looking forward to the
> full 4 day class.
>
> I'd like to start a discussion about what it would take to get more people
> to attend the class, and/or what's keeping people from attending (cost,
> location, etc.).
>
> Two other notes:
>
> - There will probably be another teach in Paris, in December
> - The workshop is normally taught on-site for a specific company (I do such
> a teach 2 - 3 times / year)
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn
> how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>


Re: Wanted: example of AJAX in a client-side validator

2010-06-22 Thread Katia Aresti Gonzalez
I have an example with a mixin ... it's in not very very simple, but i can
simplify the mixin for your example... ^_^


2010/6/20 Geoff Callender 

> Surely someone has an example of this?
>
> On 18/06/2010, at 12:51 PM, Geoff Callender wrote:
>
> > Thanks, Thiago, but it lacks AJAX. I'd like the validator to behave like
> any other client-side validator except that it asks the server to help, eg.
> to validate that a name has not already been used.
> >
> > Geoff
> >
> > On 18/06/2010, at 12:24 PM, Thiago H. de Paula Figueiredo wrote:
> >
> >> On Thu, 17 Jun 2010 22:20:45 -0300, Geoff Callender <
> geoff.callender.jumpst...@gmail.com> wrote:
> >>
> >>> Hi all,
> >>
> >> Hi!
> >>
> >> This is an example of a RGB string validator that I created for my
> Tapestry courses (basic and advanced):
> >>
> >> public class RGBValidator extends AbstractValidator {
> >>
> >>  final private static Pattern PATTERN =
> >>  Pattern.compile("[0-9A-Fa-f]{6}");
> >>
> >>  final private RenderSupport renderSupport;
> >>
> >>  final private Asset javascript;
> >>
> >>  public RGBValidator(
> >>  AssetSource assetSource, RenderSupport
> renderSupport) {
> >>
> >>  super(null, String.class, "rgb-validation");
> >>  this.renderSupport = renderSupport;
> >>  javascript = assetSource.getClasspathAsset(
> >>
>  "br/com/arsmachina/cursotapestry/validacao/rgb.js");
> >>
> >>  }
> >>
> >>  public void render(Field field, Void constraintValue,
> >>  MessageFormatter formatter, MarkupWriter writer,
> >>  FormSupport formSupport) {
> >>
> >>  String message = buildMessage(field, formatter);
> >>
> >>  // adds JavaScript validation
> >>  formSupport.addValidation(field, "rgb", message, null);
> >>
> >>  // includes rgb.js in the page
> >>  renderSupport.addScriptLink(javascript);
> >>
> >>  // adds a hint to the user. just an example of generating
> >>  // HTML inside a validator.
> >>  writer.element("span", "class", "hint");
> >>  writer.write("Must be filled with 6 digits or letters from
> A to F.");
> >>  writer.end();
> >>
> >>  }
> >>
> >>  @Override
> >>  public void validate(Field field, Void constraintValue,
> >>  MessageFormatter formatter, String value)
> >>  throws ValidationException {
> >>
> >>  if (PATTERN.matcher(value).matches() == false) {
> >>  String message = buildMessage(field, formatter);
> >>  throw new ValidationException(mensagem);
> >>  }
> >>
> >>  }
> >>
> >>  private String buildMesssage(Field field, MessageFormatter
> formatter) {
> >>  return formatter.format(field.getLabel());
> >>  }
> >>
> >> }
> >>
> >> rgb.js:
> >>
> >> Tapestry.Validator.rgb = function(field, message) {
> >>  var regexp = /[0-9A-F]{6}/i;
> >>  field.addValidator(function(value) {
> >>  if (regexp.test(value) == false && value.length > 0) {
> >>  throw message;
> >>  }
> >>  });
> >> };
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> >> Owner, Ars Machina Tecnologia da Informação Ltda.
> >> http://www.arsmachina.com.br
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [T5.1] Strange behaviour of component method (with lazy init). Bug ?

2010-05-05 Thread Katia Aresti Gonzalez
What I meaned to say with the perfect explanation... :)
Thank you! :)

2010/5/5 Thiago H. de Paula Figueiredo 

> On Wed, 05 May 2010 13:13:09 -0300, Nicolas Bouillon 
> wrote:
>
>  My real component takes is used to display the product price in an order
>> from the client cart (many lines, so in a loop). And as local variable I
>> had the discount so once a discount was found for a line, it was kept
>> for all the following lines... not very good for business !
>>
>
> You need to pass the discount as a parameter to your component.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [T5.1] Strange behaviour of component method (with lazy init). Bug ?

2010-05-05 Thread Katia Aresti Gonzalez
If nobody desagrees, I think SetupRender is the place to initialize the
render variables.
Anyway, your component seems very simple ;  I don't know exactly which will
be useful for You could use component parameters...
I depends on the component...

2010/5/5 Nicolas Bouillon 

> Thank you for you fast response.
>
> Very disturbing in fact, because I was using this kind of method in lot of
> place... and I don't know if the component will be used alone or in a loop.
>
> So I have to reset such local variable in a @SetupRender each time, or
> there is a better solution ?
>
> Thanks.
>
> On Wed, 5 May 2010 17:58:41 +0200, Katia Aresti Gonzalez
>  wrote:
> > Hi,
> >
> > No, there is no bug.
> >
> > In the first example you have 2 components, so two contexts.
> >
> > In the second one you have just one component, so when you loop into it,
> it
> > increases twice, as you are increasing the same component
> >
> > Katia
> >
> > 2010/5/5 Nicolas Bouillon 
> >
> >> Hello,
> >>
> >> I'm facing a strange behaviour on a component. Here if a sample
> component
> >> :
> >>
> >> package tapestry.components;
> >>
> >> import org.apache.tapestry5.MarkupWriter;
> >>
> >> public class CountComponent {
> >>
> >>private Integer count = 0;
> >>
> >>public Integer getCount() {
> >>if (count == null) {
> >>count = 1;
> >>} else {
> >>count++;
> >>}
> >>return count;
> >>}
> >>
> >>public void beginRender(MarkupWriter writer) {
> >>writer.element("span");
> >>writer.write("->" + getCount().toString());
> >>writer.end();
> >>}
> >>
> >> }
> >>
> >> if if call mutliple type my component like :
> >>
> >> 
> >> 
> >>
> >> I got the wanted behavior :
> >>
> >> -> 1
> >> -> 1
> >>
> >> But if i nest my component into a loop like :
> >>
> >> 
> >>
> >> 
> >>
> >> I got this behaviour :
> >>
> >> -> 1
> >> -> 2
> >> etc..
> >>
> >> Is this intended or a bug ?
> >>
> >> Best regards
> >>
> >> Nicolas.
> >>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [T5.1] Strange behaviour of component method (with lazy init). Bug ?

2010-05-05 Thread Katia Aresti Gonzalez
Hi,

No, there is no bug.

In the first example you have 2 components, so two contexts.

In the second one you have just one component, so when you loop into it, it
increases twice, as you are increasing the same component

Katia

2010/5/5 Nicolas Bouillon 

> Hello,
>
> I'm facing a strange behaviour on a component. Here if a sample component :
>
> package tapestry.components;
>
> import org.apache.tapestry5.MarkupWriter;
>
> public class CountComponent {
>
>private Integer count = 0;
>
>public Integer getCount() {
>if (count == null) {
>count = 1;
>} else {
>count++;
>}
>return count;
>}
>
>public void beginRender(MarkupWriter writer) {
>writer.element("span");
>writer.write("->" + getCount().toString());
>writer.end();
>}
>
> }
>
> if if call mutliple type my component like :
>
> 
> 
>
> I got the wanted behavior :
>
> -> 1
> -> 1
>
> But if i nest my component into a loop like :
>
> 
>
> 
>
> I got this behaviour :
>
> -> 1
> -> 2
> etc..
>
> Is this intended or a bug ?
>
> Best regards
>
> Nicolas.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>