Re: Localized Translators - again

2008-10-06 Thread Ville Virtanen

The localized js validation must be there, not very serious solution if it
supports server side localization, but not client side :)

+1 too for localized translators and js validation.


Marcelo Lotif-2 wrote:
> 
> And me too.
> Here, we're using a javascript  + onToClient and onParseClient methods to
> automatically format numbers and currencies to our locale(###.###,##) and
> when the client side validation is enabled, it complains about the comma.
> 
> It's a nice feature, but it should support localization.
> 
> On Mon, Oct 6, 2008 at 2:55 PM, Maximilian Weißböck <
> [EMAIL PROTECTED]> wrote:
> 
>> Put me on the "me to" List ;-)
>>
>> We have a (very possible) project where the customer want's us to
>> use Struts2 - but we hope we can convince him to Tapestry5.
>> But if localization is still such an issue, this will be really hard...
>>
>> Max
>>
>> PS: I already voted long time ago...
>>
>>
>> > -Ursprüngliche Nachricht-
>> > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED]
>> > Gesendet: Montag, 6. Oktober 2008 16:32
>> > An: users@tapestry.apache.org
>> > Betreff: Localized Translators - again
>> >
>> > Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship:
>> > > On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]>
>> wrote:
>> > >> - localization for translators is still missing:
>> > >> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried
>> to
>> > >> bring this to your attention several times but you didn't even
>> comment
>> > >> on
>> > >> it...)
>> > >
>> > > I'm stretched a bit thin, and if I don't get 5.0.15 out today or
>> > > tomorrow its going to wait until October.
>> > >
>> > > In any case, 2457 is going to slip to release 5.1.  Your workaround
>> is
>> > > to override TranslatorSource with your own service, with your own set
>> > > of Translators.  Sorry, I'm really trying to restrict changes at this
>> > > point to things that can't be monkey patched it some way.
>> > >
>> >
>> > I tried that solution and it's just not feasible. I can overwrite the
>> > service but Tapestrys client side validation prevents me from using it.
>> In
>> > tapestry.js the format for floating point numbers is fixed and doesn't
>> > include the comma character, so it always complains about the number
>> not
>> > being a decimal number. So although my Translators could handle the
>> input
>> > I can't input any localized content.
>> >
>> > I could disable client side validation for every form where I have to
>> > input localized content but then why have that feature in the first
>> place.
>> > An alternative would be to fix the regular expression in tapestry.js to
>> > also include the comma character but then for example '1,5' and '1.5'
>> will
>> > both pass although just one is valid with the user's current locale.
>> >
>> > Either way, this is becoming more and more annoying. The workaround
>> > doesn't work and making the workaround work introduces other pitfalls.
>> >
>> > And I just can't believe that I'm the only one who wants his users to
>> be
>> > able to input numbers, currencies etc. in their respective locale.
>> >
>> > Please Howard, help!
>> >
>> > Uli
>> >
>> >
>> > -
>> > 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]
>>
>>
> 
> 
> -- 
> Atenciosamente,
> 
> Marcelo Lotif
> Programador Java e Tapestry
> FIEC - Federação das Indústrias do Estado do Ceará
> (85) 3477-5910
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Localized-Translators---again-tp19839130p19851159.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: [EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread mike
let me share my solution..  ya. using @BlockRender will work. the only problem
is if your generated html is too complicated using @blockRender is not so easy.
so what i do is, i remain my existing code and for action button, i create
another page and hidden in current page as iframe. this way, when user click on
action on current page, current page will no required to reload. it work ! i
share with with anyone of u who facing similar problem.


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



Re: [EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread sc
"Or your allProducts could call OGNL directly and  
parse the expression in your .java class."

can you explain on this.. aren't this is what i did in my example and it does't
work?


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



Re: [T5] Using Tapestry5 on Igenko, an open source cms/eCommerce project

2008-10-06 Thread Thiago H. de Paula Figueiredo

Em Mon, 06 Oct 2008 19:14:40 -0300, Bouiaw <[EMAIL PROTECTED]> escreveu:


1) RESTful URL handling

As I would like to manage RESTful urls like
(http://mywebsite.com/channel/1/content/2/ or
http://mywebsite.com/user/sdeleuze/), I need to implement my own URL
resolution and not Tapestry5 default one.


I can't see why Tapestry 5's URL resolution can manage your example URLs.  
My T5 application's URLs look exactly like the ones your provided.



2) Template storage in "database"
In order to bring the best of extensibility to the users, I would like
to allow Tapestry 5 templates (that I would store in a Widget on
instance stored in my database) to be created and modified by the
users at runtime. Is there a way to modify tapestry 5 resource
handling to dynamically load it from a database at runtime ?


Yes, you can, and it has been done. Take a look at this thread:  
http://www.nabble.com/Web-Content-Management-Systems-to14212538.html#a14221589


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

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



Re: Treating a Component Like a Form Field

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 18:03:13 -0300, Keith Bottner <[EMAIL PROTECTED]>  
escreveu:


I created a custom component for displaying a selection list of  
countries. However, I have found that the only way for me to retrieve  
what the selection is from the component is to declare a @Component to  
that particular field and then request the value directly from the  
component. Is there no way to have a custom component act like a typical  
text field and have it assign the selection to a @Property without  
having to have a @Component designator?


Have you tried adding a @Parameter to your component? This way, you could  
bind it to page property (or page property property and so on recursively).


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

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



[T5] Using Tapestry5 on Igenko, an open source cms/eCommerce project

2008-10-06 Thread Bouiaw
Hi,

I currently work on an open source cms/ecommerce project called Igenko
(http://code.google.com/p/igenko/). Its core is a java library that is
based on Spring/Jackrabbit JCR/Jboss JBPM technologies, and that is
not linked to a specific view layer.

We have currently have a simple GUI implementation in Flex for Website
and Backoffice, and I currently would like to create a Website GUI
based on Tapestry 5.

Igenko is based on RESTful principles
(http://www.theserverside.com/tt/articles/article.tss?l=ARESTfulCorePart4)
and components.

I need some help about 2 main points :
 1) RESTful URL handling
 2) Template storage in "database"


1) RESTful URL handling

As I would like to manage RESTful urls like
(http://mywebsite.com/channel/1/content/2/ or
http://mywebsite.com/user/sdeleuze/), I need to implement my own URL
resolution and not Tapestry5 default one.

I think one solution is to create a filter that will transform this
url to a tapestry5 "main" page with the resource (channel/1/content/2/
or /user/sdeleuze/) as parameter, but there is perhaps a more elegant
way to modify Tapestry5 url handling.

2) Template storage in "database"

In Igenko domain model
(http://code.google.com/p/igenko/source/browse/trunk/igenko-core/src/main/java/org/igenko/core/domain/model/),
every resource that I want to display is a RenderableResource instance
that is linked to a Widget (that I could have called Template instead)
instance.

In order to bring the best of extensibility to the users, I would like
to allow Tapestry 5 templates (that I would store in a Widget on
instance stored in my database) to be created and modified by the
users at runtime. Is there a way to modify tapestry 5 resource
handling to dynamically load it from a database at runtime ?

I hope someone will be able to help me on these questions that are
mandatory for my project.

Thanks in advance.

Bouiaw
Igenko project leader

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



RE: [EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread Jonathan Barker


What is the final result you are trying to achieve? 

Norman gave a number of good options, but it would help to know your end
objective.

Jonathan


> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of mike
> Sent: Monday, October 06, 2008 13:37
> To: users@tapestry.apache.org
> Subject: [EMAIL PROTECTED] inside [EMAIL PROTECTED]
> 
> in my html,
> ---
> 
> 
>  
> 
>   
> 
> in my java, pageValidate,
> --
> 
> setAllProducts(" value=\"message:com.test.productcode\"/>");
> 
> 
> 
> when reader on browser, i get the exact html -->
> ---
> 
> 
> 
> 
> 
> why it doesnt convert into tapestry codes...?
> 
> 
> 
> 
> 
> 
> -
> 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]



Treating a Component Like a Form Field

2008-10-06 Thread Keith Bottner
I created a custom component for displaying a selection list of  
countries. However, I have found that the only way for me to retrieve  
what the selection is from the component is to declare a @Component to  
that particular field and then request the value directly from the  
component. Is there no way to have a custom component act like a  
typical text field and have it assign the selection to a @Property  
without having to have a @Component designator?


Anyone?

Keith

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



RE: spring T5 integration on acegi security considerations

2008-10-06 Thread Jonathan Barker
Wesley,

I would rather spend two hours figuring out how to use a well thought out /
designed / tested tool that will pay off in the long haul than spend one
hour doing a one-off solution to an immediate problem.  I didn't save time
the first time I used Acegi, but I really do save time now.

Acegi is like a well equipped toolbox. 

For password encryption, Acegi provides several classes that implement the
PasswordEncoder interface.  These include PlaintextPasswordEncoder,
MessageDigestPAsswordEncoder, Md5PasswordEncoder, and a few others.  You
would pick one of these and use it to configure your UserDetailsService, and
you can also use it directly to encode a password to store for yourself.

You frequently want to use a password Salt, so there is a
SystemWideSaltSource where everyone gets the same salt, or a
ReflectionSaltSource that can read a property that you would store with your
User record.  You would configure your UserDetailsService to use a Salt
source.

For access to pages, you either configure a filter through Spring, or
through annotations, or through tapestry-ioc configuration.  The filters
will invoke the necessary authentication and authorization functions.

You don't generally override authenticate(), because you would use one of
the dozen implementations of the AuthenticationProvider interface that ship
with Acegi.  I typically use the LDAPAuthenticationProvider and the
DaoAuthenticationProvider.  Of course, each of these needs to be configured
somehow.  For example, you need to have a UserDetailsService configured for
the DaoAuthenticationProvider.

Jonathan




> -Original Message-
> From: wesley [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2008 12:54
> To: users@tapestry.apache.org
> Subject: RE: spring T5 integration on acegi security considerations
> 
> 
> hi Jon,
> 
> thanks much for the feedback, i assumed acegi will do all hard
> work/encapsulate those like password encryption login and other
> unauthorized
> access to the pages? because with normal implementation, i need to do one
> way encrypt myself to authenticate user for example. does acegi do that?,
> i
> mean the authenticate method; do i need to override it myself for
> encryption
> purposes? please advise, thanks
> 
> wesley
> 
> 
> 
> Jonathan Barker wrote:
> >
> >
> > I remember going through the Acegi documentation the first time.  It was
> > daunting.
> >
> > In hindsight, it boils down to this:
> >
> > The central object in Acegi is the SecurityContext.  You need to store
> and
> > retrieve it from your HttpSession and that is done either through a
> filter
> > configured in web.xml (for a Spring-configured scenario), or as a part
> of
> > a
> > Tapestry filter chain (for tapestry5-acegi).
> >
> > You need to configure at least one AuthenticationProvider using a
> > UserDetailsService, and pass it to the AuthenticationManager.  I like
> the
> > InMemoryDaoImpl as the UserDetailsService for initial development, and a
> > way
> > of embedding special administrative accounts.  Don't waste time reading
> > about all of the options for this service.  Know that later you can add
> > additional AuthenticationProviders to have multiple authentication
> > methods.
> >
> > The AuthenticationProvider can be invoked manually (by injecting it into
> > your page, and calling methods like authenticate()), or via a specific
> jsp
> > page.
> >
> > For example, and this can be handy for testing, you can do this:
> >
> > @Inject
> > private AuthenticationManager _authenticationManager;
> >
> > ...
> >
> > UsernamePasswordAuthenticationToken authRequest =
> > new
> > UsernamePasswordAuthenticationToken(_username,_password);
> > Authentication authResult;
> >
> > try {
> > System.out.println("username:" + _username + "
> > password: " + _password);
> > authResult =
> > _authenticationManager.authenticate(authRequest);
> > logger.info("successful login for: " + _username);
> > } catch (BadCredentialsException failed) {
> > _form.recordError(_passwordField, "Invalid username
> > or password");
> > logger.info("bad password for: " + _username);
> > return null;
> > } catch (AuthenticationException failed) {
> > _form.recordError(_passwordField, "Invalid username
> > or password");
> > logger.info("failed login for: " + _username);
> > return null;
> > }
> >
> >
> > SecurityContextHolder.getContext().setAuthentication(authResult);
> >
> >
> > Then you need to enforce security (authorize).  This can be directly, by
> > getting the SecurityContext and asking for the Authentication object,
> and
> > then getting a list of GrantedAuthorities and working with that. (Read
> the
> > code for the tapestry5-acegi IfRole component if you want to see what I
>

Re: Localized Translators - again

2008-10-06 Thread Ulrich Stärk

Thiago H. de Paula Figueiredo schrieb:
Em Mon, 06 Oct 2008 11:32:01 -0300, Ulrich Stärk <[EMAIL PROTECTED]> 
escreveu:



https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to


Voted and watching this issue. But I think its description speaks only 
of Translators, but the discussion here also deals with the Javascript 
validation. Should we open a new JIRA just for the JS part?




I think localized translators implicate localized client side validation on fields, were those 
translators are used. So there is no need for a seperate issue.


As a side note, when I first opened up the issue and patched the Translator interface, I didn't have 
issues with client side validation preventing me from entering localized values. That must have come 
later...


Uli

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



reload same page after press action

2008-10-06 Thread sc
i use this way to access my page

http://localhost:8080/MyApp/app?service=page&page=ListingStudent&studentId=ghost


there is a button in this page, after pressed the button, the following method
will be executed

public void updateThisStudent(IRequestCycle cycle){

   //do update

/***
how to use cycle.activate to reload this same page after update with
studentId=ghost so that the browser url is -->  
http://localhost:8080/MyApp/app?service=page&page=ListingStudent&studentId=ghost
 
***/
}



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



Re: Localized Translators - again

2008-10-06 Thread Borut Bolčina
+1 for locale aware Javascript validation

2008/10/6 Marcelo Lotif <[EMAIL PROTECTED]>

> And me too.
> Here, we're using a javascript  + onToClient and onParseClient methods to
> automatically format numbers and currencies to our locale(###.###,##) and
> when the client side validation is enabled, it complains about the comma.
>
> It's a nice feature, but it should support localization.
>
> On Mon, Oct 6, 2008 at 2:55 PM, Maximilian Weißböck <
> [EMAIL PROTECTED]> wrote:
>
> > Put me on the "me to" List ;-)
> >
> > We have a (very possible) project where the customer want's us to
> > use Struts2 - but we hope we can convince him to Tapestry5.
> > But if localization is still such an issue, this will be really hard...
> >
> > Max
> >
> > PS: I already voted long time ago...
> >
> >
> > > -Ursprüngliche Nachricht-
> > > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED]
> > > Gesendet: Montag, 6. Oktober 2008 16:32
> > > An: users@tapestry.apache.org
> > > Betreff: Localized Translators - again
> > >
> > > Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship:
> > > > On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]>
> > wrote:
> > > >> - localization for translators is still missing:
> > > >> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I
> tried
> > to
> > > >> bring this to your attention several times but you didn't even
> comment
> > > >> on
> > > >> it...)
> > > >
> > > > I'm stretched a bit thin, and if I don't get 5.0.15 out today or
> > > > tomorrow its going to wait until October.
> > > >
> > > > In any case, 2457 is going to slip to release 5.1.  Your workaround
> is
> > > > to override TranslatorSource with your own service, with your own set
> > > > of Translators.  Sorry, I'm really trying to restrict changes at this
> > > > point to things that can't be monkey patched it some way.
> > > >
> > >
> > > I tried that solution and it's just not feasible. I can overwrite the
> > > service but Tapestrys client side validation prevents me from using it.
> > In
> > > tapestry.js the format for floating point numbers is fixed and doesn't
> > > include the comma character, so it always complains about the number
> not
> > > being a decimal number. So although my Translators could handle the
> input
> > > I can't input any localized content.
> > >
> > > I could disable client side validation for every form where I have to
> > > input localized content but then why have that feature in the first
> > place.
> > > An alternative would be to fix the regular expression in tapestry.js to
> > > also include the comma character but then for example '1,5' and '1.5'
> > will
> > > both pass although just one is valid with the user's current locale.
> > >
> > > Either way, this is becoming more and more annoying. The workaround
> > > doesn't work and making the workaround work introduces other pitfalls.
> > >
> > > And I just can't believe that I'm the only one who wants his users to
> be
> > > able to input numbers, currencies etc. in their respective locale.
> > >
> > > Please Howard, help!
> > >
> > > Uli
> > >
> > >
> > > -
> > > 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]
> >
> >
>
>
> --
> Atenciosamente,
>
> Marcelo Lotif
> Programador Java e Tapestry
> FIEC - Federação das Indústrias do Estado do Ceará
> (85) 3477-5910
>


Re: Localized Translators - again

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 11:32:01 -0300, Ulrich Stärk <[EMAIL PROTECTED]>  
escreveu:



https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to


Voted and watching this issue. But I think its description speaks only of  
Translators, but the discussion here also deals with the Javascript  
validation. Should we open a new JIRA just for the JS part?


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

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



Re: Localized Translators - again

2008-10-06 Thread Marcelo Lotif
And me too.
Here, we're using a javascript  + onToClient and onParseClient methods to
automatically format numbers and currencies to our locale(###.###,##) and
when the client side validation is enabled, it complains about the comma.

It's a nice feature, but it should support localization.

On Mon, Oct 6, 2008 at 2:55 PM, Maximilian Weißböck <
[EMAIL PROTECTED]> wrote:

> Put me on the "me to" List ;-)
>
> We have a (very possible) project where the customer want's us to
> use Struts2 - but we hope we can convince him to Tapestry5.
> But if localization is still such an issue, this will be really hard...
>
> Max
>
> PS: I already voted long time ago...
>
>
> > -Ursprüngliche Nachricht-
> > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 6. Oktober 2008 16:32
> > An: users@tapestry.apache.org
> > Betreff: Localized Translators - again
> >
> > Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship:
> > > On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]>
> wrote:
> > >> - localization for translators is still missing:
> > >> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried
> to
> > >> bring this to your attention several times but you didn't even comment
> > >> on
> > >> it...)
> > >
> > > I'm stretched a bit thin, and if I don't get 5.0.15 out today or
> > > tomorrow its going to wait until October.
> > >
> > > In any case, 2457 is going to slip to release 5.1.  Your workaround is
> > > to override TranslatorSource with your own service, with your own set
> > > of Translators.  Sorry, I'm really trying to restrict changes at this
> > > point to things that can't be monkey patched it some way.
> > >
> >
> > I tried that solution and it's just not feasible. I can overwrite the
> > service but Tapestrys client side validation prevents me from using it.
> In
> > tapestry.js the format for floating point numbers is fixed and doesn't
> > include the comma character, so it always complains about the number not
> > being a decimal number. So although my Translators could handle the input
> > I can't input any localized content.
> >
> > I could disable client side validation for every form where I have to
> > input localized content but then why have that feature in the first
> place.
> > An alternative would be to fix the regular expression in tapestry.js to
> > also include the comma character but then for example '1,5' and '1.5'
> will
> > both pass although just one is valid with the user's current locale.
> >
> > Either way, this is becoming more and more annoying. The workaround
> > doesn't work and making the workaround work introduces other pitfalls.
> >
> > And I just can't believe that I'm the only one who wants his users to be
> > able to input numbers, currencies etc. in their respective locale.
> >
> > Please Howard, help!
> >
> > Uli
> >
> >
> > -
> > 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]
>
>


-- 
Atenciosamente,

Marcelo Lotif
Programador Java e Tapestry
FIEC - Federação das Indústrias do Estado do Ceará
(85) 3477-5910


Re: T4 XML Web Service

2008-10-06 Thread Norman Franke
Well, I never did really get much feedback. I ended up using the  
Jersey JAX-RS (JSR 311) implementation. This worked great, since it  
can directly marshal and unmarshal XML using JAXB. Works very well.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com

On Sep 8, 2008, at 11:43 PM, Norman Franke wrote:


On Sep 5, 2008, at 5:45 PM, Norman Franke wrote:

I want to create a few web services to allow importing and  
exporting of data. What's the best way to do this in a Tapestry 4.1  
world? I could write a servlet to do this, of course. Is there a  
"Tapestry Way?"


Are there some good guidelines for creating an XML-based WOA (not  
SOAP as it seems too heavy and complicated) services that folks  
reference? I'll need to do some sort of authentication, either  
inside the XML file or as parameters to the POST.


I'm just trying to get a feel for what approaches work in the real  
world, and then design something that's rather simple. I'll have  
two main data types and a few simple operations, like query and  
insert.


After some research, I think JSR-311 is attractive.

The next question, how can I integrate JSR-311 (JAX-RS) with  
HiveMind? I have my Hibernate DAO's as HiveMind services, and I'd  
like to use them from JAX-RS objects. The only thing I can think of  
is by getting a reference to the Registry object from the servlet or  
via a singleton (initialized at startup.) Any way to get HiveMind to  
inject things into my object directly?


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



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





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



Re: [EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread Norman Franke
First enabling raw will send whatever you give it out without  
conversion. Turning off raw will escape the HTML tags, not what you  
want either. I don't think that sort of thing works in Tapestry. You  
could try using a @Block / @RenderBlock pair. You could have an OGNL  
expression provide what block to render in a @RenderBlock. I do this  
somewhat frequently. Or your allProducts could call OGNL directly and  
parse the expression in your .java class.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com

On Oct 6, 2008, at 1:37 PM, mike wrote:


in my html,
---

   
raw="ognl:true" />


 

in my java, pageValidate,
--

   setAllProducts("");



when reader on browser, i get the exact html -->
---





why it doesnt convert into tapestry codes...?






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



AW: Localized Translators - again

2008-10-06 Thread Maximilian Weißböck
Put me on the "me to" List ;-)

We have a (very possible) project where the customer want's us to
use Struts2 - but we hope we can convince him to Tapestry5.
But if localization is still such an issue, this will be really hard...

Max

PS: I already voted long time ago...


> -Ursprüngliche Nachricht-
> Von: Ulrich Stärk [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 6. Oktober 2008 16:32
> An: users@tapestry.apache.org
> Betreff: Localized Translators - again
> 
> Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship:
> > On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]> wrote:
> >> - localization for translators is still missing:
> >> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to
> >> bring this to your attention several times but you didn't even comment
> >> on
> >> it...)
> >
> > I'm stretched a bit thin, and if I don't get 5.0.15 out today or
> > tomorrow its going to wait until October.
> >
> > In any case, 2457 is going to slip to release 5.1.  Your workaround is
> > to override TranslatorSource with your own service, with your own set
> > of Translators.  Sorry, I'm really trying to restrict changes at this
> > point to things that can't be monkey patched it some way.
> >
> 
> I tried that solution and it's just not feasible. I can overwrite the
> service but Tapestrys client side validation prevents me from using it. In
> tapestry.js the format for floating point numbers is fixed and doesn't
> include the comma character, so it always complains about the number not
> being a decimal number. So although my Translators could handle the input
> I can't input any localized content.
> 
> I could disable client side validation for every form where I have to
> input localized content but then why have that feature in the first place.
> An alternative would be to fix the regular expression in tapestry.js to
> also include the comma character but then for example '1,5' and '1.5' will
> both pass although just one is valid with the user's current locale.
> 
> Either way, this is becoming more and more annoying. The workaround
> doesn't work and making the workaround work introduces other pitfalls.
> 
> And I just can't believe that I'm the only one who wants his users to be
> able to input numbers, currencies etc. in their respective locale.
> 
> Please Howard, help!
> 
> Uli
> 
> 
> -
> 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: [EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread mike
i need to dynamically create jwcid tag inside @insert tag. that's the reason i
use this approach. how to make tapestry render the tags inside @insert 


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



[EMAIL PROTECTED] inside [EMAIL PROTECTED]

2008-10-06 Thread mike
in my html,
---


 
  
  

in my java, pageValidate,
--

setAllProducts("");



when reader on browser, i get the exact html -->
---





why it doesnt convert into tapestry codes...?
  





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



Re: T5: Serverpush functionality?

2008-10-06 Thread Lance Java
Use dwr's reverse ajax... it's great!
http://directwebremoting.org/dwr/reverse-ajax

If you download the sample war it has examples including a chat application.

Dwr3.0 is soon to be released with a whole lot of reverse-ajax niceness.

2008/10/6 Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]>

> Em Mon, 06 Oct 2008 09:19:57 -0300, Otho <[EMAIL PROTECTED]> escreveu:
>
>
>  Hi all!
>>
>> I am musing about a little project where there is for example a simple
>> chatserver in the background and a frontend built with tapestry where a
>> small portion of the page is used as chatwindow.
>>
>> I don't want to use Webstart or an applet but just plain T5.
>>
>> Has anyone already done serverpush with T5 and would like to share the
>> howto or could anyone direct me at some documents about how to do reverse
>> ajax
>> with Tapestry?
>>
>
> Take a look at Comet: http://cometdproject.dojotoolkit.org/. As far as I
> know, there is no ready-to-use implementation in T5, but I think it will be
> more related to Javascript than to T5.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> Consultor, desenvolvedor e instrutor em Java
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: spring T5 integration on acegi security considerations

2008-10-06 Thread wesley

hi Jon,

thanks much for the feedback, i assumed acegi will do all hard
work/encapsulate those like password encryption login and other unauthorized
access to the pages? because with normal implementation, i need to do one
way encrypt myself to authenticate user for example. does acegi do that?, i
mean the authenticate method; do i need to override it myself for encryption
purposes? please advise, thanks

wesley



Jonathan Barker wrote:
> 
> 
> I remember going through the Acegi documentation the first time.  It was
> daunting.
>  
> In hindsight, it boils down to this:
> 
> The central object in Acegi is the SecurityContext.  You need to store and
> retrieve it from your HttpSession and that is done either through a filter
> configured in web.xml (for a Spring-configured scenario), or as a part of
> a
> Tapestry filter chain (for tapestry5-acegi).
> 
> You need to configure at least one AuthenticationProvider using a
> UserDetailsService, and pass it to the AuthenticationManager.  I like the
> InMemoryDaoImpl as the UserDetailsService for initial development, and a
> way
> of embedding special administrative accounts.  Don't waste time reading
> about all of the options for this service.  Know that later you can add
> additional AuthenticationProviders to have multiple authentication
> methods.
> 
> The AuthenticationProvider can be invoked manually (by injecting it into
> your page, and calling methods like authenticate()), or via a specific jsp
> page.
> 
> For example, and this can be handy for testing, you can do this:
> 
>   @Inject
>   private AuthenticationManager _authenticationManager;
> 
> ...
> 
>   UsernamePasswordAuthenticationToken authRequest = 
>   new
> UsernamePasswordAuthenticationToken(_username,_password);
>   Authentication authResult;
>   
>   try {
>   System.out.println("username:" + _username + "
> password: " + _password);
>   authResult =
> _authenticationManager.authenticate(authRequest);
>   logger.info("successful login for: " + _username);
>   } catch (BadCredentialsException failed) {
>   _form.recordError(_passwordField, "Invalid username
> or password");
>   logger.info("bad password for: " + _username);
>   return null;
>   } catch (AuthenticationException failed) {
>   _form.recordError(_passwordField, "Invalid username
> or password");
>   logger.info("failed login for: " + _username);
>   return null;
>   }
> 
>   
> SecurityContextHolder.getContext().setAuthentication(authResult);
> 
> 
> Then you need to enforce security (authorize).  This can be directly, by
> getting the SecurityContext and asking for the Authentication object, and
> then getting a list of GrantedAuthorities and working with that. (Read the
> code for the tapestry5-acegi IfRole component if you want to see what I
> mean). Or, it can be done using Spring configured filters for URL
> patterns,
> or tapestry5-acegi filters for pages or patterns.
> 
> It's only daunting if you look at it all at once.
> 
> 
> Jonathan
>  
> 
>> -Original Message-
>> From: wesley [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, October 05, 2008 12:37
>> To: users@tapestry.apache.org
>> Subject: RE: spring T5 integration on acegi security considerations
>> 
>> 
>> hi,
>> 
>> thanks for the feedback, as long as the pages are secure and can prevent
>> unauthorized users from logging in i'm open for any options. previously
>> what
>> i did was quite traditional, implementing a one way password encryption,
>> setting keystore and config within tomcat container. to me acegi is like
>> a
>> huge topic and mass complexion to implement. so when come to the decision
>> on
>> implementing it is really a challenge to me. the tutorials are great but
>> mostly aim at T5 alone (which is normal). but within my implementation
>> where
>> it is an integrated environment, i really have no idea which one should i
>> choose.
>> 
>> 
>> Jonathan Barker wrote:
>> >
>> >
>> > It depends on your needs.  The tapestry5-acegi or tapestry-spring-
>> security
>> > (http://www.localhost.nu/java/tapestry-spring-security/index.html) are
>> > probably easier to drop in.  The Spring-configured route might be
>> better
>> > if
>> > your application includes other servlets or filters.
>> >
>> > Either way you will be able to get access to things like the
>> > AuthenticationManager if you need to from your page classes.
>> >
>> > With an older T4 app, I used Spring / Hibernate / Acegi with Acegi
>> > configured via Spring.  I also rolled a few components: Authorize and
>> > AclAuthorize.
>> >
>> > With the T5 apps I now do, I use a slightly modified tapestry5-acegi
>> > although I still use Spring for DAO's and some services.  Parts of my
>> old
>> > Authorize c

RE: T5: equivelent of c:set ?

2008-10-06 Thread Russell Brown
I get it. Thanks. 

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED] 
Sent: 06 October 2008 15:28
To: Tapestry users
Subject: Re: T5: equivelent of c:set ?

Em Mon, 06 Oct 2008 11:01:34 -0300, Russell Brown
<[EMAIL PROTECTED]>  
escreveu:

> In jsp
>
>   varStatus="counter">
>
> 
>   
> 
> 
>
> 
>
> 

You don't need to create a component from that, just stop thinking JSP  
when coding Tapestry. :)
In Tapestry, all the logic is implemented in pages classes, with no
logic  
in templates. And this is a very good thing, as the logic is easily
tested  
when implemented in classes. ;)

Not tested, but hopefully it will give you an idea on how to do that:

YourClass.java:

private ItemType item;

@Property /* so we don't need to provide the getter and setter, as they

don't have any logic */
private ItemType lastItem;

public ItemType getItem() {
return item;
}

public void ItemType setItem(ItemType item) {
lastItem = this.item;
this.item = item;
}

public List getList() {
return ...; // list to be iterated
}

public boolean isNotEmpty() {
return lastItem != null; // or any other logic
}

YourTemplate.tml:



 




If you don't get it, tell us. :)

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

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



Localized Translators - again

2008-10-06 Thread Ulrich Stärk
Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship:
> On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]> wrote:
>> - localization for translators is still missing:
>> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to
>> bring this to your attention several times but you didn't even comment
>> on
>> it...)
>
> I'm stretched a bit thin, and if I don't get 5.0.15 out today or
> tomorrow its going to wait until October.
>
> In any case, 2457 is going to slip to release 5.1.  Your workaround is
> to override TranslatorSource with your own service, with your own set
> of Translators.  Sorry, I'm really trying to restrict changes at this
> point to things that can't be monkey patched it some way.
>

I tried that solution and it's just not feasible. I can overwrite the
service but Tapestrys client side validation prevents me from using it. In
tapestry.js the format for floating point numbers is fixed and doesn't
include the comma character, so it always complains about the number not
being a decimal number. So although my Translators could handle the input
I can't input any localized content.

I could disable client side validation for every form where I have to
input localized content but then why have that feature in the first place.
An alternative would be to fix the regular expression in tapestry.js to
also include the comma character but then for example '1,5' and '1.5' will
both pass although just one is valid with the user's current locale.

Either way, this is becoming more and more annoying. The workaround
doesn't work and making the workaround work introduces other pitfalls.

And I just can't believe that I'm the only one who wants his users to be
able to input numbers, currencies etc. in their respective locale.

Please Howard, help!

Uli


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



Re: T5: equivelent of c:set ?

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 11:01:34 -0300, Russell Brown <[EMAIL PROTECTED]>  
escreveu:



In jsp













You don't need to create a component from that, just stop thinking JSP  
when coding Tapestry. :)
In Tapestry, all the logic is implemented in pages classes, with no logic  
in templates. And this is a very good thing, as the logic is easily tested  
when implemented in classes. ;)


Not tested, but hopefully it will give you an idea on how to do that:

YourClass.java:

private ItemType item;

@Property /* so we don't need to provide the getter and setter, as they  
don't have any logic */

private ItemType lastItem;

public ItemType getItem() {
return item;
}

public void ItemType setItem(ItemType item) {
lastItem = this.item;
this.item = item;
}

public List getList() {
return ...; // list to be iterated
}

public boolean isNotEmpty() {
return lastItem != null; // or any other logic
}

YourTemplate.tml:



 




If you don't get it, tell us. :)

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

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



RE: T5: equivelent of c:set ?

2008-10-06 Thread Russell Brown
Ok...an example

In jsp












So in the above example I have a variable available called "someVar"
that is set to the value of the previous myItem's myProperty value. But
with T5 and the var binding I get THIS iterations value. The SCOPE of
the VAR binding is not wide enough for me. So is there an equivalent in
Tapestry or do I have to create a component and call it like this













And then have code like 

@Component(id="someVar")
Private MySetComponentType someVar;


And the MySetComponentType is just 

Public class MySetComponentType {
@Parameter
@Property
Private String value;

}


But there just has to be a better way. Right?

Cheers for taking the time

Russell

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: 06 October 2008 14:22
To: Tapestry users
Subject: Re: T5: equivelent of c:set ?

if you use the "var:" prefix in your template you do not need a
corresponding property in your page/component. and you 
can use this variable in your template multiple times (as in the
loop example). tapestry will generate a property on the fly
during rendering for this variable.

if you declare your components purley in your template
you can also pass in the parameters it accepts as well. 
 and it should work with var: variables as well.

eg.


link



AFAIK you cannot access the value of the "var:" variables in your
pages or components.

hope this helps... maybe you can post an example... as posted by thiago

g,
kris




"Thiago H. de Paula Figueiredo" <[EMAIL PROTECTED]> 
06.10.2008 15:10
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
Re: T5: equivelent of c:set ?







Em Mon, 06 Oct 2008 09:01:48 -0300, Russell Brown
<[EMAIL PROTECTED]> 
 
escreveu:

> As far as I can see it is only of use in a loop in which case it is
set
> at the start of the iteration. How about iteration idioms that involve
> setting a value at the end of the iteration to be used by the next
> iteration? It is fairly common to see and trivial in struts, jsps,
> spring mvc etc, etc.

You can do that in Tapestry, but you just do it in a different way. 
Remember that the page class properties are always available to the 
template.

Please post a JSP example of what you're trying to accomplish so we'll
can 
 
help you better. ;)

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

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



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



Re: T5: equivelent of c:set ?

2008-10-06 Thread Kristian Marinkovic
if you use the "var:" prefix in your template you do not need a
corresponding property in your page/component. and you 
can use this variable in your template multiple times (as in the
loop example). tapestry will generate a property on the fly
during rendering for this variable.

if you declare your components purley in your template
you can also pass in the parameters it accepts as well. 
 and it should work with var: variables as well.

eg.


link



AFAIK you cannot access the value of the "var:" variables in your
pages or components.

hope this helps... maybe you can post an example... as posted by thiago

g,
kris




"Thiago H. de Paula Figueiredo" <[EMAIL PROTECTED]> 
06.10.2008 15:10
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
Re: T5: equivelent of c:set ?







Em Mon, 06 Oct 2008 09:01:48 -0300, Russell Brown <[EMAIL PROTECTED]> 
 
escreveu:

> As far as I can see it is only of use in a loop in which case it is set
> at the start of the iteration. How about iteration idioms that involve
> setting a value at the end of the iteration to be used by the next
> iteration? It is fairly common to see and trivial in struts, jsps,
> spring mvc etc, etc.

You can do that in Tapestry, but you just do it in a different way. 
Remember that the page class properties are always available to the 
template.

Please post a JSP example of what you're trying to accomplish so we'll can 
 
help you better. ;)

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

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




Re: T5: Serverpush functionality?

2008-10-06 Thread Thiago H. de Paula Figueiredo

Em Mon, 06 Oct 2008 09:19:57 -0300, Otho <[EMAIL PROTECTED]> escreveu:


Hi all!

I am musing about a little project where there is for example a simple
chatserver in the background and a frontend built with tapestry where a
small portion of the page is used as chatwindow.

I don't want to use Webstart or an applet but just plain T5.

Has anyone already done serverpush with T5 and would like to share the  
howto or could anyone direct me at some documents about how to do  
reverse ajax

with Tapestry?


Take a look at Comet: http://cometdproject.dojotoolkit.org/. As far as I  
know, there is no ready-to-use implementation in T5, but I think it will  
be more related to Javascript than to T5.


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

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



Re: T5: equivelent of c:set ?

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 09:01:48 -0300, Russell Brown <[EMAIL PROTECTED]>  
escreveu:



As far as I can see it is only of use in a loop in which case it is set
at the start of the iteration. How about iteration idioms that involve
setting a value at the end of the iteration to be used by the next
iteration? It is fairly common to see and trivial in struts, jsps,
spring mvc etc, etc.


You can do that in Tapestry, but you just do it in a different way.  
Remember that the page class properties are always available to the  
template.


Please post a JSP example of what you're trying to accomplish so we'll can  
help you better. ;)


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

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



Re: T5 blueprints application?

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 07:05:50 -0300, János Jarecsni  
<[EMAIL PROTECTED]> escreveu:



Hi,

I'm learning T5 and like it quite much. Is there something like a  
blueprints application?


The Ars Machina Project Example Application  
(www.arsmachina.com.br/project/example) was meant to be exactly like you  
need, but not just for T5, but also for its integration with Spring and  
Hibernate and the use of the Ars Machina Project  
(www.arsmachina.com.br/project/) packages.


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

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



Re: Problem injecting ApplicationStateManager into service implementing commons-upload ProgressListener

2008-10-06 Thread Pierre-Alain RIVIERE
Hello,

Maybe it's related but 5.0.14 gives me the same result here. 
But the use case seems to be the same : contributing a RequestFilter
with the ApplicationStateService thrown a NPE.

And no solution or hack for now. Too bad cause my webapp is just a
simple upload manager for my own purpose.

I've also a solution using http://swfupload.org/ for upload progress but
there's some known issues using it on Linux :/



On Mon, 2008-10-06 at 12:45 +0200, Francois Armand wrote:
> Pierre-Alain RIVIERE wrote:
> > Hello,
> >
> > [...]
> >
> > Using this code I've got a NPE when ApplicationStateManager try to get
> > the HttpSession : http://pastebin.com/m1f968817
> > In debug mode, request.getSession() throws NPE.
> >   
> 
> Hello,
> 
> I just attempt to upgrade from T5.0.14 to T5.0.15 and now, I have the 
> same problem with a code witch used to work.
> So, it seems that there is a bug here, and I'm wondering if it's not 
> link to  a previous thread: 
> http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+NPE+when+trying+to+contribute+ServletContextSymbolProvider+to+#query:list%3Aorg.apache.tapestry.users%20NPE%20when%20trying%20to%20contribute%20ServletContextSymbolProvider%20to%20+page:1+mid:hdcboxjrxkrgruyy+state:results
> 
> Pierre-Alain, did you find a solution ?
> 


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



Re: T5 blueprints application?

2008-10-06 Thread János Jarecsni
thanks, it seems this is what I was after :)

2008/10/6 Andy Huhn <[EMAIL PROTECTED]>

>
> Hi,
>
> See Jumpstart:
>
> http://files.doublenegative.com.au/jumpstart/home.html
>
> On Mon, 6 Oct 2008 12:05:50 +0200, "János Jarecsni"
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm learning T5 and like it quite much. Is there something like a
> > blueprints
> > application? I found examples which all focus on a certain aspect of
> > Tapestry, but I think it would be advantegous to have a more complex
> > example
> > with usual things a web application has to provide. Is there something
> > like
> > this?
> >
> > Thanks a lot
> > Janos
> --
> Andy
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5: Serverpush functionality?

2008-10-06 Thread Otho
Hi all!

I am musing about a little project where there is for example a simple
chatserver in the background and a frontend built with tapestry where a
small portion of the page is used as chatwindow.

I don't want to use Webstart or an applet but just plain T5.

Has anyone already done serverpush with T5 and would like to share the howto
or could anyone direct me at some documents about how to do reverse ajax
with Tapestry?

Regards,
Otho


RE: T5: equivelent of c:set ?

2008-10-06 Thread Russell Brown
Thanks. I have already.

The docs say "Allows a render variable of the component to be read or
updated." Updated how, when? What is a render variable? A variable in a
template without a corresponding property? But I want to SET a property
of my component from the template...

As far as I can see it is only of use in a loop in which case it is set
at the start of the iteration. How about iteration idioms that involve
setting a value at the end of the iteration to be used by the next
iteration? It is fairly common to see and trivial in struts, jsps,
spring mvc etc, etc.

Is there a way to do this in T5?

Cheers

Russell

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: 06 October 2008 11:57
To: Tapestry users
Subject: Re: T5: equivelent of c:set ?

hi Russell,

take a look at the "var:" binding 
http://tapestry.apache.org/tapestry5/guide/parameters.html


g,
kris




"Russell Brown" <[EMAIL PROTECTED]> 
06.10.2008 12:07
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
T5: equivelent of c:set ?






Hi,

If I want to set some property from within the component template is
that possible in Tapestry 5? Something like the c:set tag is JSP jstl?
Or do you just write a set component and have it as a property of the
containing component?

 

Cheers

 

Russell



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



Re: NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-10-06 Thread Ville Virtanen

I have no new info on this, and I think we should add ticket to get this
sorted. (If it is something we do wrong -> correct the documentation or then
it is a bug that needs a fix anyway.)

Currently I'm just fetching the values from context by hand.

The reason behind this however is likely to be the order in which the
services are started: it doesn't require much effort to create situation
where for an example symbol provider is needed to contribute an alias, but
the alias service is needed to create the symbol provider... The end result
would be exactly the message we've been receiving, and unfortunately there
is no easy way around this afaik. Also it seems that this error comes deep
from Tapestry because the services are so fundamental to Tapestry, although
the recursive cycle is due to my own services. 

I'm just happy that I have problems only reading context variables that are
very limited in number ;)

Don't know if this is the case here though.


Francois Armand wrote:
> 
> 9902468 wrote:
>> This is starting to look more and more like Jira issue? Any new info on
>> this?
>>   
> 
> Hello guys,
> 
> I encounter almost the same error when I try to access ApplicationState 
> service from a RequestFilter. Do you have any new on that topic ? Did 
> you open a ticket on the subject ?
> 
> Thanks,
> 
> -- 
> Francois Armand
> Etudes & Développements J2EE
> Groupe Linagora - http://www.linagora.com
> Tél.: +33 (0)1 58 18 68 28
> ---
> InterLDAP - http://interldap.org 
> FederID - http://www.federid.org/
> Open Source identities management and federation
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-NPE-when-trying-to-contribute-ServletContextSymbolProvider-to---SymbolSource-%28WAS%3A-Re%3A-Page-pool-hard-limit-and-page-instance-usage%29-tp19609348p19835994.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: equivelent of c:set ?

2008-10-06 Thread Kristian Marinkovic
hi Russell,

take a look at the "var:" binding 
http://tapestry.apache.org/tapestry5/guide/parameters.html


g,
kris




"Russell Brown" <[EMAIL PROTECTED]> 
06.10.2008 12:07
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
T5: equivelent of c:set ?






Hi,

If I want to set some property from within the component template is
that possible in Tapestry 5? Something like the c:set tag is JSP jstl?
Or do you just write a set component and have it as a property of the
containing component?

 

Cheers

 

Russell




Re: NPE when trying to contribute ServletContextSymbolProvider to SymbolSource (WAS: Re: Page pool hard limit and page instance usage)

2008-10-06 Thread Francois Armand

9902468 wrote:

This is starting to look more and more like Jira issue? Any new info on this?
  


Hello guys,

I encounter almost the same error when I try to access ApplicationState 
service from a RequestFilter. Do you have any new on that topic ? Did 
you open a ticket on the subject ?


Thanks,

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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



Re: T5: select list?

2008-10-06 Thread photos

Thanks!


Quoting Ulrich Stärk <[EMAIL PROTECTED]>:


Select is what you want. The HTML specs specify a size attribute for the
select HTML element which indicates how many entries should be displayed
at a time. size=1 (default) would be a dropdown list.

HTH,

Uli

Am Mo, 6.10.2008, 11:33, schrieb [EMAIL PROTECTED]:


Is there no such thing as a Select List in T5?

I see "pallete" and "select", but they aren't suitable (I have a long
list of data that I want selectable - only one selection at a time -
in a scrolling list).

thanks,
p.




-
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: Problem injecting ApplicationStateManager into service implementing commons-upload ProgressListener

2008-10-06 Thread Francois Armand

Pierre-Alain RIVIERE wrote:

Hello,

[...]

Using this code I've got a NPE when ApplicationStateManager try to get
the HttpSession : http://pastebin.com/m1f968817
In debug mode, request.getSession() throws NPE.
  


Hello,

I just attempt to upgrade from T5.0.14 to T5.0.15 and now, I have the 
same problem with a code witch used to work.
So, it seems that there is a bug here, and I'm wondering if it's not 
link to  a previous thread: 
http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+NPE+when+trying+to+contribute+ServletContextSymbolProvider+to+#query:list%3Aorg.apache.tapestry.users%20NPE%20when%20trying%20to%20contribute%20ServletContextSymbolProvider%20to%20+page:1+mid:hdcboxjrxkrgruyy+state:results


Pierre-Alain, did you find a solution ?

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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



Re: T5: select list?

2008-10-06 Thread Ulrich Stärk
Select is what you want. The HTML specs specify a size attribute for the
select HTML element which indicates how many entries should be displayed
at a time. size=1 (default) would be a dropdown list.

HTH,

Uli

Am Mo, 6.10.2008, 11:33, schrieb [EMAIL PROTECTED]:
>
> Is there no such thing as a Select List in T5?
>
> I see "pallete" and "select", but they aren't suitable (I have a long
> list of data that I want selectable - only one selection at a time -
> in a scrolling list).
>
> thanks,
> p.
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Re: T5 blueprints application?

2008-10-06 Thread Andy Huhn

Hi,

See Jumpstart:

http://files.doublenegative.com.au/jumpstart/home.html

On Mon, 6 Oct 2008 12:05:50 +0200, "János Jarecsni"
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm learning T5 and like it quite much. Is there something like a
> blueprints
> application? I found examples which all focus on a certain aspect of
> Tapestry, but I think it would be advantegous to have a more complex
> example
> with usual things a web application has to provide. Is there something
> like
> this?
> 
> Thanks a lot
> Janos
-- 
Andy



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



T5: equivelent of c:set ?

2008-10-06 Thread Russell Brown
Hi,

If I want to set some property from within the component template is
that possible in Tapestry 5? Something like the c:set tag is JSP jstl?
Or do you just write a set component and have it as a property of the
containing component?

 

Cheers

 

Russell



T5 blueprints application?

2008-10-06 Thread János Jarecsni
Hi,

I'm learning T5 and like it quite much. Is there something like a blueprints
application? I found examples which all focus on a certain aspect of
Tapestry, but I think it would be advantegous to have a more complex example
with usual things a web application has to provide. Is there something like
this?

Thanks a lot
Janos


Re: Hibernate example broken with 5.0.15

2008-10-06 Thread János Jarecsni
Hi

thanks for the info, with @CommitAfter it works :) I just included the
close() to see if something happens :) That way I got an exception at least
:)

thanks again!
Cheers,
Janos

2008/10/6 Davor Hrg <[EMAIL PROTECTED]>

> you should post the errors you get,
> and, also methods that save data should have
> @CommitAfter annotation now.
>
> ...and you need not close the session
> it will get closed automatically,
> and that is actualy the reason the exception occurs
>
> Davor Hrg
>
> On Mon, Oct 6, 2008 at 11:23 AM, János Jarecsni <[EMAIL PROTECTED]
> >wrote:
>
> > Hi again,
> >
> > I made some investigations into the matter. Here's my modified onAction
> > method from the page class HbAction:
> >
> >public void onAction() {
> >Hello h = new Hello();
> >h.setMessage("Hello World");
> >_session.save(h);
> >List list = _session.createCriteria(Hello.class).list();
> >System.out.println("Hellos stored: " + list.size());
> >_session.close();
> >}
> >
> > So I included a close(). This reveled, why the newly inserted Hello
> > entities
> > are not persisted. I get the following exception now:
> >
> > 11:20:15,889 [ WARN] PerthreadManager - Error invoking listener
> >
> [EMAIL PROTECTED]
> > :
> > Session is closed
> > org.hibernate.SessionException: Session is closed
> >at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:139)
> >at
> >
> >
> org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:217)
> >at
> >
> >
> org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
> >at
> >
> >
> org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:65)
> >at
> >
> >
> org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:86)
> >at
> >
> >
> org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:327)
> >at
> >
> >
> org.apache.tapestry5.ioc.internal.RegistryWrapper.cleanupThread(RegistryWrapper.java:36)
> >at
> > org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:185)
> >
> > So this means, that for some reason a rollback is issued after the method
> > finished. Why? Any hints are welcome :)
> >
> > Cheers
> > Janos
> >
> >
> > 2008/10/6 János Jarecsni <[EMAIL PROTECTED]>
> >
> > > Hi All,
> > >
> > > I tested the simple Hibernate example (
> > > http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate)
> > quite
> > > a while ago with T5.0.11. Now I restarted studying Tapestry, tried the
> > > application now with 5.0.15. It seems that the application can read
> from
> > > the table, but cannot insert into it. I found no exceptions. I tried
> with
> > > the 5.0.11 version, it still works. I replaced the Tapestry version
> with
> > > T5.0.15 and it breaks. Can it be that I have to upgrade Hibernate as
> > well?
> > >
> > > Thx a lot
> > > Janos
> > >
> >
>


T5: select list?

2008-10-06 Thread photos


Is there no such thing as a Select List in T5?

I see "pallete" and "select", but they aren't suitable (I have a long  
list of data that I want selectable - only one selection at a time -  
in a scrolling list).


thanks,
p.




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



Re: Hibernate example broken with 5.0.15

2008-10-06 Thread Davor Hrg
you should post the errors you get,
and, also methods that save data should have
@CommitAfter annotation now.

...and you need not close the session
it will get closed automatically,
and that is actualy the reason the exception occurs

Davor Hrg

On Mon, Oct 6, 2008 at 11:23 AM, János Jarecsni <[EMAIL PROTECTED]>wrote:

> Hi again,
>
> I made some investigations into the matter. Here's my modified onAction
> method from the page class HbAction:
>
>public void onAction() {
>Hello h = new Hello();
>h.setMessage("Hello World");
>_session.save(h);
>List list = _session.createCriteria(Hello.class).list();
>System.out.println("Hellos stored: " + list.size());
>_session.close();
>}
>
> So I included a close(). This reveled, why the newly inserted Hello
> entities
> are not persisted. I get the following exception now:
>
> 11:20:15,889 [ WARN] PerthreadManager - Error invoking listener
> [EMAIL PROTECTED]
> :
> Session is closed
> org.hibernate.SessionException: Session is closed
>at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:139)
>at
>
> org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:217)
>at
>
> org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
>at
>
> org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:65)
>at
>
> org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:86)
>at
>
> org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:327)
>at
>
> org.apache.tapestry5.ioc.internal.RegistryWrapper.cleanupThread(RegistryWrapper.java:36)
>at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:185)
>
> So this means, that for some reason a rollback is issued after the method
> finished. Why? Any hints are welcome :)
>
> Cheers
> Janos
>
>
> 2008/10/6 János Jarecsni <[EMAIL PROTECTED]>
>
> > Hi All,
> >
> > I tested the simple Hibernate example (
> > http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate)
> quite
> > a while ago with T5.0.11. Now I restarted studying Tapestry, tried the
> > application now with 5.0.15. It seems that the application can read from
> > the table, but cannot insert into it. I found no exceptions. I tried with
> > the 5.0.11 version, it still works. I replaced the Tapestry version with
> > T5.0.15 and it breaks. Can it be that I have to upgrade Hibernate as
> well?
> >
> > Thx a lot
> > Janos
> >
>


Re: Hibernate example broken with 5.0.15

2008-10-06 Thread János Jarecsni
Hi again,

I made some investigations into the matter. Here's my modified onAction
method from the page class HbAction:

public void onAction() {
Hello h = new Hello();
h.setMessage("Hello World");
_session.save(h);
List list = _session.createCriteria(Hello.class).list();
System.out.println("Hellos stored: " + list.size());
_session.close();
}

So I included a close(). This reveled, why the newly inserted Hello entities
are not persisted. I get the following exception now:

11:20:15,889 [ WARN] PerthreadManager - Error invoking listener
[EMAIL PROTECTED]:
Session is closed
org.hibernate.SessionException: Session is closed
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:139)
at
org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:217)
at
org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
at
org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:65)
at
org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:86)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:327)
at
org.apache.tapestry5.ioc.internal.RegistryWrapper.cleanupThread(RegistryWrapper.java:36)
at
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:185)

So this means, that for some reason a rollback is issued after the method
finished. Why? Any hints are welcome :)

Cheers
Janos


2008/10/6 János Jarecsni <[EMAIL PROTECTED]>

> Hi All,
>
> I tested the simple Hibernate example (
> http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate) quite
> a while ago with T5.0.11. Now I restarted studying Tapestry, tried the
> application now with 5.0.15. It seems that the application can read from
> the table, but cannot insert into it. I found no exceptions. I tried with
> the 5.0.11 version, it still works. I replaced the Tapestry version with
> T5.0.15 and it breaks. Can it be that I have to upgrade Hibernate as well?
>
> Thx a lot
> Janos
>


Hibernate example broken with 5.0.15

2008-10-06 Thread János Jarecsni
Hi All,

I tested the simple Hibernate example (
http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate) quite a
while ago with T5.0.11. Now I restarted studying Tapestry, tried the
application now with 5.0.15. It seems that the application can read from the
table, but cannot insert into it. I found no exceptions. I tried with the
5.0.11 version, it still works. I replaced the Tapestry version with T5.0.15
and it breaks. Can it be that I have to upgrade Hibernate as well?

Thx a lot
Janos


Re: [T5] Default JavaScript and CSS

2008-10-06 Thread Ken
Hi, again.

> My Tapestry (1.0.15)

oops, My Tapestry is 5.0.15.

Ken.

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