Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It just stroke me that it could have to with page abbreviations.

I have problems with meeting/answers and meeting/list

I.e. MeetingAnswers.java & MeetingList.java / MeetingAnswers_sv.properties
& MeetingList_sv.properties

which both are accessed with short hand format

But it works if I skip the _sv suffix on the property files.



2012/2/23 Gunnar Eketrapp 

> MeetingAnwsers_sv.properties i mean
>
>
> 2012/2/23 Gunnar Eketrapp 
>
>> It does not have to do with the casing so it must be something else.
>>
>> E.g. page MeetingAnswers.java does not pick up texts
>> from MeetingAnwsers_sv.txt when running in Ubuntu
>>
>> The strange thing is that it only some of the pages have this problem.
>>
>> I will add a MeetingAnwsers.txt now to se if that fixes the problem.
>>
>>
>>  2012/2/22 Howard Lewis Ship 
>>
>>> There are some cases where you need to have the app.properties file
>>> for app_sv.properties to be picked up.
>>>
>>> However, when you hit a problem like this, it is most likely the case
>>> of the file name.  Windows is case-insenstive, Ubunutu is case
>>> sensitive.
>>>
>>> Thus MyPage.java means MyPage.properties, and mypage.properties will
>>> work on Windows, fail on Ubuntu.
>>>
>>>
>>> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>>>  wrote:
>>> > Hi!
>>> >
>>> > My app is current in swedish only.
>>> >
>>> > So my app module states ..
>>> >
>>> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>>> >
>>> > I have named my page property files as ..
>>> >
>>> >  _sv.properties
>>> >
>>> > .. and there are no .properties files.
>>> >
>>> > Actually dont know why I have added the _sv ending since _sv is the
>>> default
>>> > but I will remember that I had some problem that was solved by doing
>>> this
>>> >
>>> > Anyhow this has worked well during development on my windows machine.
>>> >
>>> > Now I am phasing missing-key for my properties in the released ubuntu
>>> live
>>> > version.
>>> >
>>> > I.e. T5 does not search my _sv property files.
>>> >
>>> > What have I missed? Must there by files without locale suffix and if
>>> so why
>>> > did it wor during development.
>>> >
>>> > Thanks in advance!
>>> >
>>> > /Gunnar
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
MeetingAnwsers_sv.properties i mean

2012/2/23 Gunnar Eketrapp 

> It does not have to do with the casing so it must be something else.
>
> E.g. page MeetingAnswers.java does not pick up texts
> from MeetingAnwsers_sv.txt when running in Ubuntu
>
> The strange thing is that it only some of the pages have this problem.
>
> I will add a MeetingAnwsers.txt now to se if that fixes the problem.
>
>
> 2012/2/22 Howard Lewis Ship 
>
>> There are some cases where you need to have the app.properties file
>> for app_sv.properties to be picked up.
>>
>> However, when you hit a problem like this, it is most likely the case
>> of the file name.  Windows is case-insenstive, Ubunutu is case
>> sensitive.
>>
>> Thus MyPage.java means MyPage.properties, and mypage.properties will
>> work on Windows, fail on Ubuntu.
>>
>>
>> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>>  wrote:
>> > Hi!
>> >
>> > My app is current in swedish only.
>> >
>> > So my app module states ..
>> >
>> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>> >
>> > I have named my page property files as ..
>> >
>> >  _sv.properties
>> >
>> > .. and there are no .properties files.
>> >
>> > Actually dont know why I have added the _sv ending since _sv is the
>> default
>> > but I will remember that I had some problem that was solved by doing
>> this
>> >
>> > Anyhow this has worked well during development on my windows machine.
>> >
>> > Now I am phasing missing-key for my properties in the released ubuntu
>> live
>> > version.
>> >
>> > I.e. T5 does not search my _sv property files.
>> >
>> > What have I missed? Must there by files without locale suffix and if so
>> why
>> > did it wor during development.
>> >
>> > Thanks in advance!
>> >
>> > /Gunnar
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It does not have to do with the casing so it must be something else.

E.g. page MeetingAnswers.java does not pick up texts
from MeetingAnwsers_sv.txt when running in Ubuntu

The strange thing is that it only some of the pages have this problem.

I will add a MeetingAnwsers.txt now to se if that fixes the problem.


2012/2/22 Howard Lewis Ship 

> There are some cases where you need to have the app.properties file
> for app_sv.properties to be picked up.
>
> However, when you hit a problem like this, it is most likely the case
> of the file name.  Windows is case-insenstive, Ubunutu is case
> sensitive.
>
> Thus MyPage.java means MyPage.properties, and mypage.properties will
> work on Windows, fail on Ubuntu.
>
>
> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>  wrote:
> > Hi!
> >
> > My app is current in swedish only.
> >
> > So my app module states ..
> >
> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
> >
> > I have named my page property files as ..
> >
> >  _sv.properties
> >
> > .. and there are no .properties files.
> >
> > Actually dont know why I have added the _sv ending since _sv is the
> default
> > but I will remember that I had some problem that was solved by doing this
> >
> > Anyhow this has worked well during development on my windows machine.
> >
> > Now I am phasing missing-key for my properties in the released ubuntu
> live
> > version.
> >
> > I.e. T5 does not search my _sv property files.
> >
> > What have I missed? Must there by files without locale suffix and if so
> why
> > did it wor during development.
> >
> > Thanks in advance!
> >
> > /Gunnar
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


classloader error constructing helper classes within service

2012-02-22 Thread Paul Stanton

Hi all,

I'm in the process of upgrading a project from t5.1 to t5.3.2.

I have one service which creates a bunch of helper objects and stores 
them in a map.


The helper classes save an instance of another service as a field.

public MyServiceImpl(MyOtherService service)
{
formatters.put("a-key", new HelperObject1(this, service, 
"a-parameter"));

... etc x 20 or so
formatters.put("b-key", new HelperObject2(this, service, 
"b-parameter"));

}

However, when the constructor is run, I'm hitting a classloader problem:

Here is the exception message (I have sanitised it with whitespace):

Error invoking constructor public 
package.services.MyServiceImpl(package.services.MyOtherService):

loader constraint violation: when resolving method "
package.services.HelperObject2.(
Lpackage/services/MyServiceImpl;
Lpackage/services/MyOtherService;
Ljava/lang/String;Z)V
"
the class loader (instance of 
org/apache/tapestry5/internal/plastic/PlasticClassLoader)

of the current class, package/services/MyServiceImpl,
and the class loader (instance of 
org/apache/catalina/loader/WebappClassLoader)

for resolved class, package/services/HelperObject2,
have different Class objects for the type
package.services.HelperObject2.(
Lpackage/services/MyServiceImpl;
Lpackage/services/MyOtherService;
Ljava/lang/String;Z)V
used in the signature

And here is the stack:

java.lang.RuntimeException: Exception constructing service 
'CoverageFormatService': [message above]
at 
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
at 
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54)
at 
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.eagerLoadService(JustInTimeObjectCreator.java:86)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:320)
at 
org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:80)

at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:118)
...

Both services are eager loaded.

Interesting to note that the error does not occur for the HelperObject1 
which is instantiated first. There is no structural difference between 
HelperObject's, where they are located or how they are referenced.


Any tips?

Thanks, Paul.

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



Re: Is there any way to use rows per page in loop?

2012-02-22 Thread Steve Eynon
RowsPerPage is defined in the GridPager, the Grid just publishes it up.

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/GridPager.html

The GridPager is quite independent of Grid and may be used on it's
own, well, in combination with a Loop component - sharing the same
source.

Steve.
---
"If at first you don't succeed,
   so much for skydiving!"




On 22 February 2012 22:26, George Christman  wrote:
> RowsPerPage exist within the Grid component.  See documentation.
>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Is-there-any-way-to-use-rows-per-page-in-loop-tp5504972p5505243.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
>

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



Re: Vulnerability Scanners

2012-02-22 Thread Steve Eynon
(I remember the T5.1 patch wasn't pretty, by the way - the URL parser
just threw a new RuntimeException so we decorated the service and had
to parse the exception message looking for "the character 'X' at
position X is not valid.")
--
Steve
---
"If at first you don't succeed,
   so much for skydiving!"




On 23 February 2012 10:22, Steve Eynon  wrote:
> Hiya,
>
> On these errors I usually patch T5 to return a 404 instead - that was
> with some old T5.1 apps, I'm pretty sure we've done the same with T5.3
> but I'm not near the code at the moment...
>
> Steve
> ---
> "If at first you don't succeed,
>    so much for skydiving!"
>
>
>
>
> On 22 February 2012 05:27, trsvax  wrote:
>> Thanks for the link. Something like that is pretty much what I want and I do
>> run an Apache front end but I don't control that machine. Unfortunately I
>> think my only real option is either a Tomcat filter or some Tapestry code.
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Vulnerability-Scanners-tp5503278p5503424.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
>>

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



Re: Vulnerability Scanners

2012-02-22 Thread Steve Eynon
Hiya,

On these errors I usually patch T5 to return a 404 instead - that was
with some old T5.1 apps, I'm pretty sure we've done the same with T5.3
but I'm not near the code at the moment...

Steve
---
"If at first you don't succeed,
   so much for skydiving!"




On 22 February 2012 05:27, trsvax  wrote:
> Thanks for the link. Something like that is pretty much what I want and I do
> run an Apache front end but I don't control that machine. Unfortunately I
> think my only real option is either a Tomcat filter or some Tapestry code.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Vulnerability-Scanners-tp5503278p5503424.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
>

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



Re: best way to patch tapestry?

2012-02-22 Thread Steve Eynon
Cool, I'll try this myself - for I'm also source patching the same
DateField bug (TAP5-841) in multiple projects. It just hadn't annoyed
me enough to look for a solution!

I also like the idea of a 302 for mis-versioned assets - nice thinking!

Steve.
---
"If at first you don't succeed,
   so much for skydiving!"




On 23 February 2012 08:16, Paul Stanton  wrote:
> Thanks Thiago,
>
> I managed it by decorating ComponentInstantiatorSource and overriding
> DateFieldStack.
>
> No patched jar required now!
>
>
> On 22/02/2012 8:50 PM, Thiago H. de Paula Figueiredo wrote:
>>
>> On Tue, 21 Feb 2012 22:55:30 -0200, Paul Stanton 
>> wrote:
>>
>>> Hi Thiago,
>>
>>
>> Hi, Paul!
>>
>>> I'd love to not have to patch but how can I override the DateField
>>> component (java & js) via tapestry-ioc?
>>
>>
>> Decorate or advise or override ComponentClassResolver so its
>> resolveComponentTypeToClassName() method returns your DateField class name
>> instead of the one provided by Tapestry.
>>
>
> -
> 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: Simplest way to detect change of Select component?

2012-02-22 Thread Thiago H. de Paula Figueiredo
Answering the question in the subject With JavaScript, the same way as you  
would do with static HTML.


Answering the test of the e-mail: Select has a zone parameter, just as  
Form and EventLink do.


--
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: component documentation regression

2012-02-22 Thread Howard Lewis Ship
That's a bug; the TextField component needs the @tapestrydoc JavaDoc
tag. A strange thing, since I thought I had checked all the components
to ensure that they have their @tapestrydoc tag.

On Wed, Feb 22, 2012 at 4:47 PM, Chris Mylonas  wrote:
> Hi Paul,
>
> The new bunch was to be updated.  Similar question was asked on Igor's blog: 
> http://blog.tapestry5.de/index.php/2011/11/09/javadoc-plugin-for-component-reference-documentation/
> That's why I'd like to generate my own javadocs :)
>
> See what comes out in the mvn javadoc:javadoc - but I don't know how to.
>
> Cheers
> Chris
>
> On 23/02/2012, at 11:36 AM, Paul Stanton wrote:
>
>> Hi Tapestry team,
>>
>> I'm confused as to why the 'current' documentation for tapestry components 
>> in some cases (eg textfield) does not contain information regarding 
>> parameters and example usage we used to have?
>>
>> new:
>> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/TextField.html
>> old:
>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html
>>
>> Thanks, p.
>>
>> -
>> 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
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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



Re: Demo for http://intercommitweavesdemo.intercommit.cloudbees.net/

2012-02-22 Thread ksrijith
Thanks didn't see that there..

-
--
Don't Forget to Rate
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Demo-for-http-intercommitweavesdemo-intercommit-cloudbees-net-tp5506442p5506710.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: component documentation regression

2012-02-22 Thread Chris Mylonas
Hi Paul,

The new bunch was to be updated.  Similar question was asked on Igor's blog: 
http://blog.tapestry5.de/index.php/2011/11/09/javadoc-plugin-for-component-reference-documentation/
That's why I'd like to generate my own javadocs :)

See what comes out in the mvn javadoc:javadoc - but I don't know how to.

Cheers
Chris

On 23/02/2012, at 11:36 AM, Paul Stanton wrote:

> Hi Tapestry team,
> 
> I'm confused as to why the 'current' documentation for tapestry components in 
> some cases (eg textfield) does not contain information regarding parameters 
> and example usage we used to have?
> 
> new:
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/TextField.html
> old:
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html
> 
> Thanks, p.
> 
> -
> 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



Simplest way to detect change of Select component?

2012-02-22 Thread George Ludwig
I'm trying to implement a select object to control a filter to a grid form.
For example, a drop down list box of employee first names followed by a
grid of employee data. If I select a first name from the DDLB, I'd like to
see only those employees with that first name.

I haven't found a good way to do this without having to click a button
associated with the DDLB, like "Apply Filter". And I haven't found a way to
intercept a changed event on the select without dealing with zones. Using
Ajax zones seems like overkill for this, plus, I am having a really hard
time getting it to work.

Any input is appreciated!

-George


component documentation regression

2012-02-22 Thread Paul Stanton

Hi Tapestry team,

I'm confused as to why the 'current' documentation for tapestry 
components in some cases (eg textfield) does not contain information 
regarding parameters and example usage we used to have?


new:
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/TextField.html
old:
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html

Thanks, p.

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



Re: best way to patch tapestry?

2012-02-22 Thread Paul Stanton

Thanks Thiago,

I managed it by decorating ComponentInstantiatorSource and overriding 
DateFieldStack.


No patched jar required now!

On 22/02/2012 8:50 PM, Thiago H. de Paula Figueiredo wrote:
On Tue, 21 Feb 2012 22:55:30 -0200, Paul Stanton  
wrote:



Hi Thiago,


Hi, Paul!

I'd love to not have to patch but how can I override the DateField 
component (java & js) via tapestry-ioc?


Decorate or advise or override ComponentClassResolver so its 
resolveComponentTypeToClassName() method returns your DateField class 
name instead of the one provided by Tapestry.




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



Re: Dynamic forms

2012-02-22 Thread Lenny Primak
Something ate your exception (probably Nabble) its not in your post.

On Feb 22, 2012, at 6:56 PM, Richard Frovarp wrote:

> I'm trying to create dynamic forms that will be configured from an outside 
> source. I know this question has been asked in the past, but I don't quite 
> get the answers. I've tried to create my own BeanModel, but I'm getting 
> exceptions when copying the code from here:
> 
> http://tapestry.apache.org/beaneditform-guide.html
> 
> * 
> org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47)
> 
> * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
> 
> 
> And yes, I put my own bean in there.
> 
> Any suggestions, or better yet example code would be great.
> 
> Thanks,
> Richard
> 


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



Dynamic forms

2012-02-22 Thread Richard Frovarp
I'm trying to create dynamic forms that will be configured from an 
outside source. I know this question has been asked in the past, but I 
don't quite get the answers. I've tried to create my own BeanModel, but 
I'm getting exceptions when copying the code from here:


http://tapestry.apache.org/beaneditform-guide.html

 * 
org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)

 * 
org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)

 * 
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)

 * 
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)

 * 
org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)

 * 
org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)

 * 
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)

 * 
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47)

 * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)


And yes, I put my own bean in there.

Any suggestions, or better yet example code would be great.

Thanks,
Richard



Re: Demo for http://intercommitweavesdemo.intercommit.cloudbees.net/

2012-02-22 Thread Lenny Primak
https://github.com/intercommit/Weaves
Right on the bottom of the page

On Feb 22, 2012, at 5:15 PM, ksrijith wrote:

> Hi,
> I've seen reference for the following demo on the forum quite a few times:
> http://intercommitweavesdemo.intercommit.cloudbees.net/
> 
> Can anyone tell me if I could refer to the code for the application shown in
> this demo. And if so can you please point me to the source for the same.
> 
> Thanks,
> Srijith
> 
> -
> --
> Don't Forget to Rate
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Demo-for-http-intercommitweavesdemo-intercommit-cloudbees-net-tp5506442p5506442.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
> 


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



Demo for http://intercommitweavesdemo.intercommit.cloudbees.net/

2012-02-22 Thread ksrijith
Hi,
I've seen reference for the following demo on the forum quite a few times:
http://intercommitweavesdemo.intercommit.cloudbees.net/

Can anyone tell me if I could refer to the code for the application shown in
this demo. And if so can you please point me to the source for the same.

Thanks,
Srijith

-
--
Don't Forget to Rate
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Demo-for-http-intercommitweavesdemo-intercommit-cloudbees-net-tp5506442p5506442.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: Best practise to extend tapestry 5 so http sessions are stored in db

2012-02-22 Thread Josh Canfield
If all you are after is storing your sessions in the database, have you
considered configuring it in the app server? Both Jetty and Tomcat have
solutions.

On Wed, Feb 22, 2012 at 8:07 AM, tompeter  wrote:

> Hi,
>
> I am also trying to use an alternate storage strategy but Tapestry doesn't
> load mine.
> Could you give me a hint on what I did wrong?
>
> 1. I created my own Strategy in TPGStatePersistencyStrategy.class which
> implements ApplicationStatePersistenceStrategy and extends
> SessionApplicationStatePersistenceStrategy
> 2. I added the following line to my AppModule:
> binder.bind( ApplicationStatePersistenceStrategy.class,
> TPGStatePersistencyStrategy.class);
>
> Having placed loggers in the get, set and exist methods, I don't see any
> output, neither do I see any errors.
>
> I very much appreciate your help.
>
> Thanks and best,
> Tom
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505487.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: tapestry-security w/ Remote Login

2012-02-22 Thread Kalle Korhonen
On Wed, Feb 22, 2012 at 11:50 AM, George Christman
 wrote:
> Hi Kalle, I apologize,  I misspoke in my previous post. Our remote sso
> doesn't serve as an authorization protocol, I meant to say it serves as a

Well, it's partly an authorization protocol if it returns you roles
specific to the local application.

> Authentication protocol. We are using web.xml filters to trigger
> Authentication. Once the user has been authenticated, the service returns a
> user Id and list of roles while populating the application session. Where I
> need some help is getting the user info into the Authorization Manager. The
> sso service was built custom by one of our in house developers, so would
> tynamo-federatedaccounts still be a good candidate for this?

Absolutely. Short cutting that, you could extend the ready-made
filter, and call Subject.login after the original filter has already
populated the session (I'd argue that it's doing too much, but that's
semantics) and have a corresponding realm just for authorizing the sso
users. Any solution for this you build would probably start looking
more and more like federatedaccounts. You have to study the code a
bit. The basic difference is that if you don't want your local
application to participate in the remote authentication process in
anyway (for example, if you don't have a need to ban individual users
accessing your application), you can just have an authorizing realm
and do there whatever else you need to do to transfer the role names
from the session to your authorizationInfo.

Kalle

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



Re: Localization question / problem ...

2012-02-22 Thread Howard Lewis Ship
There are some cases where you need to have the app.properties file
for app_sv.properties to be picked up.

However, when you hit a problem like this, it is most likely the case
of the file name.  Windows is case-insenstive, Ubunutu is case
sensitive.

Thus MyPage.java means MyPage.properties, and mypage.properties will
work on Windows, fail on Ubuntu.


On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
 wrote:
> Hi!
>
> My app is current in swedish only.
>
> So my app module states ..
>
>        configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>
> I have named my page property files as ..
>
>      _sv.properties
>
> .. and there are no .properties files.
>
> Actually dont know why I have added the _sv ending since _sv is the default
> but I will remember that I had some problem that was solved by doing this
>
> Anyhow this has worked well during development on my windows machine.
>
> Now I am phasing missing-key for my properties in the released ubuntu live
> version.
>
> I.e. T5 does not search my _sv property files.
>
> What have I missed? Must there by files without locale suffix and if so why
> did it wor during development.
>
> Thanks in advance!
>
> /Gunnar



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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



Re: tapestry-security w/ Remote Login

2012-02-22 Thread George Christman
Hi Kalle, I apologize,  I misspoke in my previous post. Our remote sso
doesn't serve as an authorization protocol, I meant to say it serves as a
Authentication protocol. We are using web.xml filters to trigger
Authentication. Once the user has been authenticated, the service returns a
user Id and list of roles while populating the application session. Where I
need some help is getting the user info into the Authorization Manager. The
sso service was built custom by one of our in house developers, so would
tynamo-federatedaccounts still be a good candidate for this? 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-security-w-Remote-Login-tp5505792p5506055.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: Best practise to extend tapestry 5 so http sessions are stored in db

2012-02-22 Thread tompeter
Thanks a lot for your help!

I was asuming I could add my Strategy to the configuration like this:

   public void contributeApplicationStatePers**istenceStrategySource(
   MappedConfiguration
configuration,

   @Local
   MyStatePersistenceStr**ategy sessionStategy)
   {
   configuration.add("mysession", sessionStategy);
   }


This doesn't work though. Sorry to ask, but could you give me some more
info's on how I get my Strategy added?


Thank you so much!


All best,
Tom



2012/2/22 Howard Lewis Ship [via Tapestry] <
ml-node+s1045711n5505844...@n5.nabble.com>

> There's also a symbol that defines the default strategy when @Persist
> is used without specifying a strategy; this could allow you to easily
> switch over your application to use your new strategy without editing
> existing pages and components.
>
> On Wed, Feb 22, 2012 at 9:45 AM, Thiago H. de Paula Figueiredo
> <[hidden email] >
> wrote:
>
> > On Wed, 22 Feb 2012 14:07:48 -0200, tompeter <[hidden 
> > email]>
> wrote:
> >
> >> Hi,
> >
> >
> > Hi!
> >
> >
> >> I am also trying to use an alternate storage strategy but Tapestry
> doesn't
> >> load mine.
> >> Could you give me a hint on what I did wrong?
> >>
> >> 1. I created my own Strategy in TPGStatePersistencyStrategy.class which
> >> implements ApplicationStatePersistenceStrategy and extends
> >> SessionApplicationStatePersistenceStrategy
> >> 2. I added the following line to my AppModule:
> >> binder.bind( ApplicationStatePersistenceStrategy.class,
> >> TPGStatePersistencyStrategy.class);
> >
> >
> > You've just created an implementation and declared a service. You missed
> > adding it to the ApplicationStatePersistenceStrategySource
> configuration.
> > Here's how the HttpSession-backed one is added in the Tapestry sources:
> >
> >public void contributeApplicationStatePersistenceStrategySource(
> >MappedConfiguration ApplicationStatePersistenceStrategy>
> > configuration,
> >
> >@Local
> >ApplicationStatePersistenceStrategy sessionStategy)
> >{
> >configuration.add("session", sessionStategy);
> >
> >}
> >
> > --
> > 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: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505844.html
>  To unsubscribe from Best practise to extend tapestry 5 so http sessions
> are stored in db, click 
> here
> .
> NAML
>



-- 


Tom Krause
SONGDADDY

phone: +491791324407
mail: tom.kra...@songdaddy.com
twitter: @songdaddy_
www.songdaddy.com


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505904.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: tapestry-security w/ Remote Login

2012-02-22 Thread Kalle Korhonen
Federatedaccounts (http://tynamo.org/tynamo-federatedaccounts+guide)
is exactly for these use cases. You would have to implement your own
authentication provider. It's interesting that your remote SSO service
serves as an authorization protocol as well, I'd probably handle it as
a merged local authorization. If the sso service you are using is one
of the more common ones, I'd be happy to work with you to have an
official support for it as a Tynamo federatedaccounts sub-module.

Kalle


On Wed, Feb 22, 2012 at 10:00 AM, George Christman
 wrote:
> Hello, our company has decided to build a sso service for all our
> applications. Up until now, I've always used the tapestry-security project,
> however I was just directed to add a filter to my web.xml which would handle
> authorization and role management. The remote login just redirects the user
> to an external login form and then redirects the user back to the
> application.
>
> My concerns/questions. I love the goodies provided to me by the
> tapestry-security project such as securing methods, role management etc.
> Would there be away I could continue to use the tapestry-security project
> with this custom remote login? Since I'm not managing login, I wouldn't have
> any credentials to pass into SimpleAuthenticationInfo, the only thing
> returned from the remote login is a username, roles, and whether or not they
> are authorized.
>
> This is my realm classed currently used to handle authorization
>
>    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken
> token) throws AuthenticationException {
>        UsernamePasswordToken upToken = (UsernamePasswordToken) token;
>        String email = upToken.getUsername();
>
>        ApplicationUser applicationUser = (ApplicationUser)
> session.createCriteria(ApplicationUser.class)
>                .add(Restrictions.eq("email", email))
>                .uniqueResult();
>
>        if (applicationUser == null) {
>            throw new UnknownAccountException();
>        }
>
>        return buildAuthenticationInfo(applicationUser.getId(),
> applicationUser.getPassword());
>    }
>
>    private AuthenticationInfo buildAuthenticationInfo(Long userId, String
> password) {
>        return new SimpleAuthenticationInfo(userId, password, getName());
>    }
>
> Thanks in advance.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/tapestry-security-w-Remote-Login-tp5505792p5505792.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
>

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



Re: Best practise to extend tapestry 5 so http sessions are stored in db

2012-02-22 Thread Howard Lewis Ship
There's also a symbol that defines the default strategy when @Persist
is used without specifying a strategy; this could allow you to easily
switch over your application to use your new strategy without editing
existing pages and components.

On Wed, Feb 22, 2012 at 9:45 AM, Thiago H. de Paula Figueiredo
 wrote:
> On Wed, 22 Feb 2012 14:07:48 -0200, tompeter  wrote:
>
>> Hi,
>
>
> Hi!
>
>
>> I am also trying to use an alternate storage strategy but Tapestry doesn't
>> load mine.
>> Could you give me a hint on what I did wrong?
>>
>> 1. I created my own Strategy in TPGStatePersistencyStrategy.class which
>> implements ApplicationStatePersistenceStrategy and extends
>> SessionApplicationStatePersistenceStrategy
>> 2. I added the following line to my AppModule:
>> binder.bind( ApplicationStatePersistenceStrategy.class,
>> TPGStatePersistencyStrategy.class);
>
>
> You've just created an implementation and declared a service. You missed
> adding it to the ApplicationStatePersistenceStrategySource configuration.
> Here's how the HttpSession-backed one is added in the Tapestry sources:
>
>    public void contributeApplicationStatePersistenceStrategySource(
>            MappedConfiguration
> configuration,
>
>            @Local
>            ApplicationStatePersistenceStrategy sessionStategy)
>    {
>        configuration.add("session", sessionStategy);
>
>    }
>
> --
> 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
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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



tapestry-security w/ Remote Login

2012-02-22 Thread George Christman
Hello, our company has decided to build a sso service for all our
applications. Up until now, I've always used the tapestry-security project,
however I was just directed to add a filter to my web.xml which would handle
authorization and role management. The remote login just redirects the user
to an external login form and then redirects the user back to the
application. 

My concerns/questions. I love the goodies provided to me by the
tapestry-security project such as securing methods, role management etc.
Would there be away I could continue to use the tapestry-security project
with this custom remote login? Since I'm not managing login, I wouldn't have
any credentials to pass into SimpleAuthenticationInfo, the only thing
returned from the remote login is a username, roles, and whether or not they
are authorized. 

This is my realm classed currently used to handle authorization

protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken
token) throws AuthenticationException {
UsernamePasswordToken upToken = (UsernamePasswordToken) token;
String email = upToken.getUsername();

ApplicationUser applicationUser = (ApplicationUser)
session.createCriteria(ApplicationUser.class)
.add(Restrictions.eq("email", email))
.uniqueResult();

if (applicationUser == null) {
throw new UnknownAccountException();
}

return buildAuthenticationInfo(applicationUser.getId(),
applicationUser.getPassword());
}

private AuthenticationInfo buildAuthenticationInfo(Long userId, String
password) {
return new SimpleAuthenticationInfo(userId, password, getName());
}

Thanks in advance. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-security-w-Remote-Login-tp5505792p5505792.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



RE: [T5.3] Contributing a Service Override using addInstance()

2012-02-22 Thread Blower, Andy
Yes that works! I had no idea you could do such a thing as I'd not see it 
anywhere in the documentation. 

I don't know if an addProxy() method is worth adding, our requirements seem 
quite unusual. If it would be useful to other Tapestry users then maybe.

Thanks for the reply Howard.

-Original Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com] 
Sent: 21 February 2012 19:51
To: Tapestry users
Subject: Re: [T5.3] Contributing a Service Override using addInstance()

This might work:

 @Contribute(ServiceOverride.class)

 public static void
setupApplicationServiceOverrides(MappedConfiguration
configuration, ObjectLocator locator)

 {
  SomeServiceType override = locator.proxy(SomeServiceType.class,
SomeServiceTypeOverrideImpl.class);

   configuration.add(SomeServiceType.class, override);

 }


This contributes a proxy for the override, rather than the override itself ... 
meaning that eventual construction of SomeServiceTypeOverrideImpl is deferred 
until needed, and that will be after the MasterObjectProvider and 
ServicesOverride are constructed.

Give it a try and report back!

Perhaps we need complement addInstance() methods with addProxy() methods on the 
Configuration/OrderedConfiguration/MappedConfiguration
interfaces?


On Tue, Feb 21, 2012 at 6:33 AM, Blower, Andy  
wrote:
> Thanks for the reply Steve. The two classes I mention are Tapestry IoC 
> classes, not my own.
>
> What you describe is how most of our overrides are implemented but this one 
> is conditional - we only need to override this service in a specific 
> environment and that's what causes the issue. If I define it like that if the 
> override is not applied then the IoC has two implementations bound (if you 
> don't bind it you can't have it injected into the override method) and will 
> throw errors whenever the service is injected without a specific ID. There 
> are 100's of places where we have plain injections and is not practical to 
> change them.
>
>
> -Original Message-
> From: Steve Eynon [mailto:steve.ey...@alienfactory.co.uk]
> Sent: 21 February 2012 10:36
> To: Tapestry users
> Subject: Re: [T5.3] Contributing a Service Override using 
> addInstance()
>
> Hi, I'm not really sure what's going on as the two classes you mention, 
> ValidatingMappedConfigurationWrapper & AbstractConfigurationImpl, don't 
> appear in your code snippet.
>
> If you define your overriding service as an Interface (say in the
> bind() method) then T5 will create a proxy for it.
>
> public static void bind(ServiceBinder binder) {
>        binder.bind(ToOverrideInterface.class,
> ToOverrideImpl.class).withId("anything so we don't conflict with the 
> existing ID"); }
>
> then you can inject that in the service override like this:
>
> public static void contributeServiceOverride(MappedConfiguration
> config, @Local ToOverrideInterface override) {
>        config.add(ToOverrideInterface.class, override); }
>
> The @Local is important, otherwise T5 doesn't know which serivce to inject 
> (yours or the one you're trying to override).
>
> Steve.
>
>
> On 20 February 2012 20:54, Blower, Andy  wrote:
>> I managed to get this to work by tracking down all dependencies and finding 
>> that one was being used in the services' constructor. Once I moved the 
>> initialisation code into a lazy init method I stopped getting the exceptions.
>>
>> Unfortunately, I still have an issue because when using addInstance() 
>> Tapestry is not using a proxy for the overriding service implementation, 
>> instead I'm getting a concrete reference instead which I thought never 
>> happened with Tapestry IoC. This causes problems when used in objects that 
>> are serialized to the session because it tries to serialize the service 
>> implementation rather than just the service proxy.
>>
>> My override looks like this:
>>
>>        @Contribute(ServiceOverride.class)
>>        public static void
>> setupApplicationServiceOverrides(MappedConfiguration, 
>> Object>
>> configuration)
>>        {
>>                configuration.addInstance(ProductConfig.class,
>> DynamicMultiProductConfig.class);
>>        }
>>
>> Basically the contributionType in ValidatingMappedConfigurationWrapper 
>> (AbstractConfigurationImpl) is Object which isn't an interface so a proxy 
>> isn't created. How can I change the signature of my module service override 
>> method so that contributionType is an interface and I get a service proxy 
>> like every other service?
>>
>> Can anyone help me?
>>
>>
>> -Original Message-
>> From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
>> Sent: 15 February 2012 14:51
>> To: users@tapestry.apache.org
>> Subject: [T5.3] Contributing a Service Override using addInstance()
>>
>> I've read the section below about contributing a service override. This 
>> method is exactly what I need to resolve an issue I'm having getting a 
>> conditional override implemented, but it doesn't appear to work if the 
>> service implementations' constructor

Re: Tapestry ignoring filter in web.xml

2012-02-22 Thread George Christman
Resolved, needed to use /* rather than
app

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-ignoring-filter-in-web-xml-tp5505535p5505715.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



Tapestry ignoring filter in web.xml

2012-02-22 Thread George Christman
Hello, I've added a couple filters to my web.xml and they don't seem to be
invoked. Any ideas?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-ignoring-filter-in-web-xml-tp5505535p5505535.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: Best practise to extend tapestry 5 so http sessions are stored in db

2012-02-22 Thread tompeter
Hi,

I am also trying to use an alternate storage strategy but Tapestry doesn't
load mine.
Could you give me a hint on what I did wrong?

1. I created my own Strategy in TPGStatePersistencyStrategy.class which
implements ApplicationStatePersistenceStrategy and extends
SessionApplicationStatePersistenceStrategy
2. I added the following line to my AppModule:
binder.bind( ApplicationStatePersistenceStrategy.class,
TPGStatePersistencyStrategy.class);

Having placed loggers in the get, set and exist methods, I don't see any
output, neither do I see any errors.

I very much appreciate your help.

Thanks and best,
Tom

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Best-practise-to-extend-tapestry-5-so-http-sessions-are-stored-in-db-tp2422175p5505487.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



duplicate javascript in one page with a component

2012-02-22 Thread Bo Gao
I have a page which import a.js, and I have a component in this page, 
the component also import a.js. This component is in a prograssiveDisplay.

The result is I get 2 same a.js with different url. This makes some of my 
function not work.
The urls are:

http://localhost:8080/assets/0.4.0/stack/en/a.js
http://localhost:8080/assets/0.4.0/stack/en_US/a.js

Thanks for your help.

--
Bo Gao









Tapestry 4 - Bean already defined problem

2012-02-22 Thread zeewolf
Hello,

I'm having a problem deploying a Tapestry 4 web application in Tomcat
5/Websphere community edition. The war deploys fine on the contain, but when
I attempt to access a page, I get the following:

Bean delegate has already been declared at (at Annotation
@org.apache.tapestry.annotations.Bean(value=class java.lang.Object,
initializer=, lifecycle=REQUEST) of public abstract
org.apache.tapestry.valid.ValidationDelegate
com.myapp.BaseMemberPage.getDelegate())

The bean is only declared at one place in the class (via annotations), so
I'm unsure why both containers are complaining about the application trying
to declare the bean again.

Any ideas?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-4-Bean-already-defined-problem-tp5505256p5505256.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: Is there any way to use rows per page in loop?

2012-02-22 Thread George Christman
RowsPerPage exist within the Grid component.  See documentation. 

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-there-any-way-to-use-rows-per-page-in-loop-tp5504972p5505243.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: How to pass page name with parameters in pagelink

2012-02-22 Thread karthi
Is there any other way to achieve this?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5505240.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: Html tag not get layout properly?

2012-02-22 Thread karthi
OutputRaw component solves my problem thank you...

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Html-tag-not-get-layout-properly-tp5505092p5505223.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: Html tag not get layout properly?

2012-02-22 Thread karthi
Am a bb developer but for the past two days I have been working in tapestry
full-fledged & am new to this, so sorry for my silly questions in this
forum!!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Html-tag-not-get-layout-properly-tp5505092p5505145.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: Html tag not get layout properly?

2012-02-22 Thread Thiago H. de Paula Figueiredo
On Wed, 22 Feb 2012 11:30:02 -0200, karthi   
wrote:



Hi,


Hi!

When outputting HTML from a class, you should use the OutputRaw component.  
By the way, why are you using the style attribute instead of proper CSS  
for the  elements?


--
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: Html tag not get layout properly?

2012-02-22 Thread Ditso
As the guy in the previous post said, try to read some documentation.

For images you probably should use an asset or somelike in tapestry


regards

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Html-tag-not-get-layout-properly-tp5505092p5505110.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



Html tag not get layout properly?

2012-02-22 Thread karthi
Hi,

   I have a table like below



${imageExistence}




java file:

public String getImageExistence() {
String imageTag = null;
String image = newsItems.get(currIndex).getImgUrl();
if(null != image) {
imageTag = "";
} else {
imageTag = null;
}
return imageTag;
}

The value rendered in the run time and in the UI instead of displaying the
image, it displays the tag itself


http://10.0.1.17:8080/services/img/news/100/logo.jpg 

What am missing in the code?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Html-tag-not-get-layout-properly-tp5505092p5505092.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: Is there any way to use rows per page in loop?

2012-02-22 Thread Thiago H. de Paula Figueiredo
On Wed, 22 Feb 2012 10:38:35 -0200, karthi   
wrote:



Hi,


Hi!


   How to split up the datas per page in tapestry loop like below?

   


Again, please read the documentation before posting. There isn't a  
rowsPerPage parameter, so the answer is no. ChenilleKit has a PagedLoop  
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



Is there any way to use rows per page in loop?

2012-02-22 Thread karthi
Hi,

   How to split up the datas per page in tapestry loop like below?

   

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-there-any-way-to-use-rows-per-page-in-loop-tp5504972p5504972.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: How to pass page name with parameters in pagelink

2012-02-22 Thread karthi
I hardcoded that start index & end index in my code and I just get the
context value in a string and print in OnActivate method

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504883.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: How to pass page name with parameters in pagelink

2012-02-22 Thread Ditso
My best guess is that you forgot the endIndex.
Either hardcode it in the code or make the page in a way you do not need the
end index

regards

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504872.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: How to pass page name with parameters in pagelink

2012-02-22 Thread karthi
Thank you for your reply...

I've used that context="3" & when I called topnews I retrieved that value 3
but in UI all my layout are get collpased. What would be the reason?

After revert back this changes everything works as previous? So this context
param would have caused this issue?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504843.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: How to pass page name with parameters in pagelink

2012-02-22 Thread Chris Mylonas
Hi, 

Maybe try something like this...

https://tapestry.apache.org/page-navigation.html

Read about page activation and have a look at the bottom of that page example.
When you do something like:
More News
You are passing this context into your "next page".  The next page, in your 
case TopNews.
The TopNews.java file will have an onActivation method where you have passed in 
the "context".

You can set the context to "3-11".

When TopNews is called it will receive "3-11" and you can then parse that to 
get "3" and "11" and do your logic to fetch the pages (stories) you want.


FYI - Other sources of examples are:
http://jumpstart.doublenegative.com.au/jumpstart/
https://tapestry.apache.org/tapestry-tutorial.html
The hi-lo game is a good example to try if you haven't.

Good Luck!
Chris

On 22/02/2012, at 9:34 PM, karthi wrote:

> Hi,
> 
> I have a page link like this:
> 
> More News
> It works fine here I have a page with a name TopNews - invokes a page
> http://localhost:8080/News/topnews
> 
> 
> I want to pass parameters with this page name like below:
> More News -
> here I mean I want to invoke a page like
> http://localhost:8080/News/topnews?startIndex=3;endIndex=11
> 
> How can I achieve this?
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504751.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
> 


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



Re: How to pass page name with parameters in pagelink

2012-02-22 Thread Dusko Jovanovski
tml:
More news

java:

@Inject
private PageRenderLinkSource pageRenderLinkSource;

public Link getLinkWithParameters()
{
Link link = pageRenderLinkSource.createPageRenderLink(MoreNews.class);
link.addParameter("startIndex", "3");
link.addParameter("endIndex", "11");
return link;
}

I would recommend avoiding pageLink component, mostly because it's not
refactor safe.

On Wed, Feb 22, 2012 at 11:34 AM, karthi wrote:

> Hi,
>
> I have a page link like this:
>
> More News
> It works fine here I have a page with a name TopNews - invokes a page
> http://localhost:8080/News/topnews
>
>
> I want to pass parameters with this page name like below:
> More News
> -
> here I mean I want to invoke a page like
> http://localhost:8080/News/topnews?startIndex=3;endIndex=11
>
> How can I achieve this?
>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504751.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
>
>


How to pass page name with parameters in pagelink

2012-02-22 Thread karthi
Hi,

I have a page link like this:

More News
It works fine here I have a page with a name TopNews - invokes a page
http://localhost:8080/News/topnews


I want to pass parameters with this page name like below:
More News -
here I mean I want to invoke a page like
http://localhost:8080/News/topnews?startIndex=3;endIndex=11

How can I achieve this?





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-pass-page-name-with-parameters-in-pagelink-tp5504751p5504751.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



Create local tapestry javadocs

2012-02-22 Thread Chris Mylonas
Hi Tapestry List,

How does one generate their own tapestry javadocs with maven?
I just went to my .m2/repository/org/apache/tapestry/tapestry-core/5.2.6 
directory where the pom.xml is and ran mvn javadoc:javadoc but it failed.

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



Re: best way to patch tapestry?

2012-02-22 Thread Thiago H. de Paula Figueiredo
On Tue, 21 Feb 2012 22:55:30 -0200, Paul Stanton   
wrote:



Hi Thiago,


Hi, Paul!

I'd love to not have to patch but how can I override the DateField  
component (java & js) via tapestry-ioc?


Decorate or advise or override ComponentClassResolver so its  
resolveComponentTypeToClassName() method returns your DateField class name  
instead of the one provided by Tapestry.


--
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: best way to patch tapestry?

2012-02-22 Thread Thiago H. de Paula Figueiredo
On Tue, 21 Feb 2012 20:15:52 -0200, Chris Mylonas   
wrote:



Hi Thiago


Hi!

__With respect__, and I don't know the innards of Tapestry-IoC so well  
or the problems some of you have -
Do you do this and it works, or is it more  
this-is-how-it-should-be-done-but-YMMV?


It does work. Tapestry's internal architecture is purposefully made of  
many small services in order to be easy to override them.


Knowing a bit about Tapestry's internals is not needed for writing webapps  
with Tapestry, but it's certainly a plus. In addition, you already know  
what needs to be changed (you're talking about a patch), so you already  
know what to override.


--
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: forForm with ComponentEventLinkTransformer

2012-02-22 Thread Jens Reufsteck
Sorry, but there hasn't been an answer to this question - I can't figure out, 
how to set the forForm-Parameter correctly.

Would be grateful for any hint
Jens

-- 
Jens Reufsteck

-Original Message-
From: Jens Reufsteck [mailto:jens.reufst...@staufenbiel.de] 
Sent: Friday, February 17, 2012 12:10 PM
To: 'Tapestry users'
Subject: forForm with ComponentEventLinkTransformer

Hi

 

I’m trying to upgrade from 5.1 to 5.2. This includes moving from the deprecated 
URLRewriting to LinkTransformer.

 

Igor’s blog post has mostly explained everything. But I couldn’t find out about 
the forForm parameter, when creating a Link with 
ComponentEventLinkEncoder.createComponentEventLink. I can’t get it neither from 
ComponentEventRequestParameters nor from Link.

 

This is my code:

 

  public Link transformComponentEventLink(Link link,

  ComponentEventRequestParameters parameters) {





// TODO boolean forForm not set properly

return componentEventLinkEncoder.createComponentEventLink(

new ComponentEventRequestParameters(

   activePageName,

   containingPageName == null ?
activePageName : containingPageName,

   nestedComponentId == null ? "" :
nestedComponentId,

   eventType == null ? "" : eventType,

   activationContext,

   eventContext),

???

);

  }

 

Many thanks

Jens

 

--
Jens Reufsteck



 


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