Re: ApplicationState annotation problem since 5.0.11

2008-03-18 Thread Baptiste Meurant

Hi

Thanks to everybody.

I have contributed an ApplicationStateObject for String in AppModule and it
is working well now.

code below : 

public void contributeApplicationStateManager(
MappedConfiguration
configuration) {
ApplicationStateCreator creator = new
ApplicationStateCreator() {
public String create() {
return new String();
}
};

configuration.add(String.class, new
ApplicationStateContribution("session", creator));
}

I have still few questions : 

you should not use String for ApplicationsStateObjects nor other 
primitive types at all -> Why ? I understand that a custom complete bean is
more usefull in many case but it could be sometime usefull to persist in
Application scope a Primitive type object. If we have only one information
to share in application scope in a single bean ... I don't see why it
could'nt be possible ...

Anyway, thanks for everything.

Baptiste


kristian.marinkovic wrote:
> 
> AFAIK you should not use String for ApplicationsStateObjects nor other 
> primitive types at all .. only complex types with a no arg constructor. 
> if you must use a different constructor you have to contribute to the
> ApplicationStateManager to tell the service how to create the instances
> properly
> 
> g,
> kris
> 
> 
> 
> 
> Baptiste Meurant <[EMAIL PROTECTED]> 
> 18.03.2008 12:18
> Bitte antworten an
> "Tapestry users" 
> 
> 
> An
> users@tapestry.apache.org
> Kopie
> 
> Thema
> Re: ApplicationState annotation problem since 5.0.11
> 
> 
> 
> 
> 
> 
> 
> 
> Hi
> 
> Thank you for your quick answer. 
> 
> If I understand well, I have to create a custom 
> ApplicationStateContribution
> to handle ApplicationState on String class ? Do you have some tips or
> instructions to do this ?
> 
> I will try and tell you the result.
> 
> I am just surprised that this configurations was working well before 
> 5.0.11
> version ...
> 
> Thanks,
> 
> Regards, 
> 
> 
> Alec Leamas-2 wrote:
>> 
>> Hi!
>> 
>> What are you really trying to do here? For me, this looks like a typo.
>> Have you contributed an ApplicationStateObject? Then you need to refer 
>> to this. I'm pretty sure Tapestry doen't have a String ApplicationState 
>> object in place...
>> 
>> I would expect something like
>> 
>> @ApplicationState
>> private MyClass myInstance;
>> 
>> Where MyClass is contributed to ApplicationStateManager in 
> AppModule.java.
>> 
>> Hope this helps..
>> 
>> --alec
>> 
>> Baptiste Meurant wrote:
>>> Hello,
>>> 
>>> I am currently upgrading my Tapestry version from 5.0.6 to 5.0.11 and I
>>> have
>>> a problem with @ApplicationState annotation.
>>> 
>>> Here are my files: 
>>> 
>>> Login.tml :
>>> 
>>> 
>>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>> 
>>> Login
>>> 
>>> 
>>> 
>>>
>>>
>>>  
>>>  
>>> t:type="Label" for="login" class="login_label"/>
>>> t:type="TextField" t:id="login" t:value="login"
>>> t:label="login " 
>>>  class="login_input" />
>>>
>>>
>>> t:type="Label" for="password"
>>> class="login_label"/>
>>> >> t:label="password " 
>>>  class="login_input" />
>>>   
>>>   
>>>t:id="submitform" t:type="Submit" t:value="submit"
>>> class="login_submit"/>
>>>   
>>>  
>>>  
>>>   
>>>   
>>> 
>>> 
>>> 
>>> Login.java :
>>> 
>>> package tutos.web.pages;
>>> 
>>>

Re: ApplicationState annotation problem since 5.0.11

2008-03-18 Thread Baptiste Meurant

Hi

Thank you for your quick answer. 

If I understand well, I have to create a custom ApplicationStateContribution
to handle ApplicationState on String class ? Do you have some tips or
instructions to do this ?

I will try and tell you the result.

I am just surprised that this configurations was working well before 5.0.11
version ...

Thanks,

Regards, 


Alec Leamas-2 wrote:
> 
> Hi!
> 
> What are you really trying to do here? For me, this looks like a typo.
> Have you contributed an ApplicationStateObject? Then you need to refer 
> to this. I'm pretty sure Tapestry doen't have a String ApplicationState 
> object in place...
> 
> I would expect something like
> 
> @ApplicationState
> private MyClass myInstance;
> 
> Where MyClass is contributed to ApplicationStateManager in AppModule.java.
> 
> Hope this helps..
> 
> --alec
> 
> Baptiste Meurant wrote:
>> Hello,
>> 
>> I am currently upgrading my Tapestry version from 5.0.6 to 5.0.11 and I
>> have
>> a problem with @ApplicationState annotation.
>> 
>> Here are my files: 
>> 
>> Login.tml :
>> 
>> 
>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> 
>> Login
>> 
>> 
>>
>>   
>>   
>> 
>> 
>>   > class="login_label"/>
>>   > t:value="login"
>> t:label="login " 
>>   
>> class="login_input" />
>>   
>>   
>>   > class="login_label"/>
>>   > t:id="password" t:value="password"
>> t:label="password " 
>>
>> class="login_input" />
>>  
>>  
>>  > t:value="submit"
>> class="login_submit"/>
>>  
>>  
>> 
>>  
>>  
>> 
>> 
>> 
>> Login.java :
>> 
>> package tutos.web.pages;
>> 
>> import org.apache.tapestry.annotations.ApplicationState;
>> import org.apache.tapestry.beaneditor.Validate;
>> 
>> public class Login {
>> 
>> @ApplicationState
>> private String login;
>> 
>> private String password;
>> 
>> public String getLogin() {
>> return login;
>> }
>> 
>> @Validate("required")
>> public void setLogin(String login) {
>> this.login = login;
>> }
>> 
>> public String getPassword() {
>> return password;
>> }
>> 
>> @Validate("required")
>> public void setPassword(String password) {
>> this.password = password;
>> }
>> 
>> String onSuccess() {
>> //my business coder
>> String ret = "Home";
>> return ret;
>> }
>> }
>> 
>> 
>> I get the error - no exception in stacktrace : 
>> 
>> Render queue error in BeginRender[Login:login]: Failure reading parameter
>> 'value' of component Login:login: Error invoking constructor
>> java.lang.String(byte[], int, int, int) (at null:-1) (for service
>> 'ApplicationStateManager'): No service implements the interface [B.
>> 
>> When I delete @ApplicationState annotation, everything works.
>> 
>> I have made some tests on different Tapestry versions and it seems that
>> @ApplicationState is correctly working until 5.0.10. I get the exception
>> on
>> 5.0.11 and 5.0.12-SNAPSHOT.
>> 
>> Is it a bug or @ApplicationState implementation has changed since 5.0.11
>> ?
>> In this case can someone give me the correct configuration ?
>> 
>> Thanks, regards,
>> 
>> Baptiste Meurant
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ApplicationState-annotation-problem-since-5.0.11-tp16118051p16118858.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



ApplicationState annotation problem since 5.0.11

2008-03-18 Thread Baptiste Meurant

Hello,

I am currently upgrading my Tapestry version from 5.0.6 to 5.0.11 and I have
a problem with @ApplicationState annotation.

Here are my files: 

Login.tml :


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

Login


  
 
 
   
   
 
 
 
 
 
 





   





Login.java :

package tutos.web.pages;

import org.apache.tapestry.annotations.ApplicationState;
import org.apache.tapestry.beaneditor.Validate;

public class Login {

@ApplicationState
private String login;

private String password;

public String getLogin() {
return login;
}

@Validate("required")
public void setLogin(String login) {
this.login = login;
}

public String getPassword() {
return password;
}

@Validate("required")
public void setPassword(String password) {
this.password = password;
}

String onSuccess() {
//my business coder
String ret = "Home";
return ret;
}
}


I get the error - no exception in stacktrace : 

Render queue error in BeginRender[Login:login]: Failure reading parameter
'value' of component Login:login: Error invoking constructor
java.lang.String(byte[], int, int, int) (at null:-1) (for service
'ApplicationStateManager'): No service implements the interface [B.

When I delete @ApplicationState annotation, everything works.

I have made some tests on different Tapestry versions and it seems that
@ApplicationState is correctly working until 5.0.10. I get the exception on
5.0.11 and 5.0.12-SNAPSHOT.

Is it a bug or @ApplicationState implementation has changed since 5.0.11 ?
In this case can someone give me the correct configuration ?

Thanks, regards,

Baptiste Meurant
-- 
View this message in context: 
http://www.nabble.com/ApplicationState-annotation-problem-since-5.0.11-tp16118051p16118051.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5][ANN] - Tapestry+Acegi+Spring+JDBC+Hibernate+JPA+HSQLDB all in one

2008-01-22 Thread Baptiste Meurant

Thanks for your response.

It is the solution that I decided to use. It is perfectly working but
without using T5 mechanisms. I was wondering if some "full T5" solution was
posible.

Thanks again,

Baptiste.


dalahoo wrote:
> 
> a simple idea is to change Login.tml to submit directly to acegi filter :
> 
> 
> 
> 
>
> 
>
> 
>
> 
> 
> 
> 
> 
> On Jan 22, 2008 4:43 PM, Baptiste Meurant <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> Hi,
>>
>>Thank you for this great work. It will be really useful.
>>
>>I still have a question about security T5/acegi integration : the
>> "classic" solution that you used to perform strong authentication with
>> acegi
>> through T5 is creating a T5 LinkImpl object. You give then parameters
>> (login
>> and password) to this link object to pass the request to acegi.
>>
>> The problem is that you are the able to see login and password in clear
>> in
>> your server (Apache, Tomcat, ...) logs. Indeed, T5 uses a LinkImpl object
>> to
>> perform a GET (and not a POST) to server.
>>
>> I am very annoyed with this security hole that I have encountered on my
>> own
>> implementation of T5/acegi integration. I don't know any correct and
>> elegant
>> fix to this issue for now.
>>
>> Did you experiment this issue ? Do you have an idea on it ? Or maybe you
>> found yet a solution to fix it ?
>>
>> Regards,
>>
>> Baptiste
>>
>>
>>
>> dalahoo wrote:
>> >
>> > Hi all,
>> >
>> > latest release of my phone book application is available now,
>> >
>> > In this release i used :
>> >
>> >- Tapestry 5.0.7 as a Web MVC framework.
>> >- Acegi 1.0.5 as a Security System.
>> >- Spring 2.5 as a Application framework.
>> >- Spring JDBC for Data Access Layer.
>> >- Hibernate 3.2.4 an alternative for Data Access Layer.
>> >- JPA (Hibernate Implementation) another alternative for Data Access
>> >Layer.
>> >- HSQLDB 1.8.0.7 for application database.
>> >
>> > read more about application configuration at
>> > http://code.google.com/p/shams/wiki/TASJHJ
>> >
>> > you can download source code for this release and previous releases
>> from
>> > http://code.google.com/p/shams/
>> >
>> >
>> > --
>> > sincerely yours
>> > M. H. Shamsi
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-T5--ANNTapestry%2BAcegi%2BSpring%2BJDBC%2BHibernate%2BJPA%2BHSQLDB-all-in-one-tp15017544p15018441.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> sincerely yours
> M. H. Shamsi
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--ANNTapestry%2BAcegi%2BSpring%2BJDBC%2BHibernate%2BJPA%2BHSQLDB-all-in-one-tp15017544p15019005.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5][ANN] - Tapestry+Acegi+Spring+JDBC+Hibernate+JPA+HSQLDB all in one

2008-01-22 Thread Baptiste Meurant

Hi, 

Thank you for this great work. It will be really useful. 

I still have a question about security T5/acegi integration : the
"classic" solution that you used to perform strong authentication with acegi
through T5 is creating a T5 LinkImpl object. You give then parameters (login
and password) to this link object to pass the request to acegi. 

The problem is that you are the able to see login and password in clear in
your server (Apache, Tomcat, ...) logs. Indeed, T5 uses a LinkImpl object to
perform a GET (and not a POST) to server. 

I am very annoyed with this security hole that I have encountered on my own
implementation of T5/acegi integration. I don't know any correct and elegant
fix to this issue for now. 

Did you experiment this issue ? Do you have an idea on it ? Or maybe you
found yet a solution to fix it ? 

Regards, 

Baptiste



dalahoo wrote:
> 
> Hi all,
> 
> latest release of my phone book application is available now,
> 
> In this release i used :
> 
>- Tapestry 5.0.7 as a Web MVC framework.
>- Acegi 1.0.5 as a Security System.
>- Spring 2.5 as a Application framework.
>- Spring JDBC for Data Access Layer.
>- Hibernate 3.2.4 an alternative for Data Access Layer.
>- JPA (Hibernate Implementation) another alternative for Data Access
>Layer.
>- HSQLDB 1.8.0.7 for application database.
> 
> read more about application configuration at
> http://code.google.com/p/shams/wiki/TASJHJ
> 
> you can download source code for this release and previous releases from
> http://code.google.com/p/shams/
> 
> 
> -- 
> sincerely yours
> M. H. Shamsi
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--ANNTapestry%2BAcegi%2BSpring%2BJDBC%2BHibernate%2BJPA%2BHSQLDB-all-in-one-tp15017544p15018441.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: 3 new French Tapestry5 tutorials

2007-11-06 Thread Baptiste Meurant

j'autorise la traduction bien sur et je suis disposé à faire une relecture
des tutoriels une fois traduits.
Merci.

I allow you translating my tutorials. I can read them once translated if you
need.
Thanks.


Michael Courcy wrote:
> 
> Si vous m'y autorisez je peux faire la traduction en anglais et la 
> poster sur le wiki, comme je découvre Tapestry 5 mais que je connais 
> Spring et hibernate (ainsi que wtp) ça ne devrait pas poser de souci.
> 
> If you allow me I would translate it and post  on the wiki. As I 'm a 
> newbie in tapestry 5 but already used to Spring and hibernate it should 
> not be a problem.
> 
> Michael.
> 
> #Cyrille37# a écrit :
>> Howard Lewis Ship a écrit :
>>> Thanks, looks like a great effort.  Sorry I've been so swamped about
>>> getting your translations on the main web site.
>>>   
>> Thanks Howard :
>>
>> Here is translation, done with my poor english :
>>
>> [fr] Premier projet avec Tapestry5, Spring et Hibernate :
>> [en] First project with Tapestry5, Spring and Hibernate :
>> http://baptiste-meurant.developpez.com/tutoriaux/tapestry5-spring-hibernate/ 
>>
>>
>> [fr] Intégration simple et élégante d'AJAX avec DWR:
>> [en] A nice integration of Ajax with DWR into Tapestry5 :
>> http://baptiste-meurant.developpez.com/tutoriaux/dwr-tapestry5-spring-hibernate/
>>  
>>
>>
>> [fr] Sécurisation d'une application Web avec Acegi Security:
>> [en] Securising a web application with ACEGI
>> http://baptiste-meurant.developpez.com/tutoriaux/acegi-dwr-tapestry5-spring-hibernate/
>>  
>>
>>
>> All of those 3 tutorials have Tapestry5 as Front view
>>
>>> On Nov 5, 2007 3:48 AM, #Cyrille37# <[EMAIL PROTECTED]> wrote:
>>>  
>>>> Hello, Bonjour,
>>>>
>>>> There are 3 new tutorials for Tapestry5 in French.
>>>> Il y a 3 nouveaux tutoriels en français pour Tapestry5.
>>>>
>>>> Thanks to Baptiste Meurant !
>>>> Merci à Baptiste Meurant !
>>>>
>>>> Premier projet avec Tapestry5, Spring et Hibernate :
>>>> http://baptiste-meurant.developpez.com/tutoriaux/tapestry5-spring-hibernate/
>>>>  
>>>>
>>>>
>>>> Intégration simple et élégante d'AJAX avec DWR:
>>>> http://baptiste-meurant.developpez.com/tutoriaux/dwr-tapestry5-spring-hibernate/
>>>>  
>>>>
>>>>
>>>> Sécurisation d'une application Web avec Acegi Security:
>>>> http://baptiste-meurant.developpez.com/tutoriaux/acegi-dwr-tapestry5-spring-hibernate/
>>>>  
>>>>
>>>>
>>>> I've added them on http://wiki.apache.org/tapestry/TapestryTutorials 
>>>> but
>>>> it should be nice to add them to 
>>>> http://tapestry.apache.org/articles.html
>>>>
>>>> Bye, Salut
>>>> Cyrille.
>>>>
>>>> 
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/3-new-French-Tapestry5-tutorials-tf4751143.html#a13603298
Sent from the Tapestry - User mailing list archive at Nabble.com.


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