Re: Exception while loading the page in Tapestry

2016-08-31 Thread mailingl...@j-b-s.de
Maybe a lower/upper case issue in your packege (directories) or filenames, so 
tml and classes do not match?

Jens

Von meinem iPhone gesendet

> Am 01.09.2016 um 06:03 schrieb Kiran Govind :
> 
> Hi,
> 
> When I configured Tapestry and tried to run, I am getting the following
> error:
> 
> org.apache.tapestry5.ioc.internal.OperationException: Page Home did not
> generate any markup when rendered. This could be because its template file
> could not be located, or because a render phase method in the page
> prevented rendering.
> 
> 
> I have checked the Layout page,Layout java file, Home java file, Home page
> all exist and at the right place. Still I am getting the above error.
> 
> I configured Tapestry earlier also successfully but never face this error.
> Can any one through some light if you faces this kind of exception.
> 
> Thanks,
> Kiran


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



Re: Dynamic Security Role Value - Tynamo Security

2016-06-28 Thread mailingl...@j-b-s.de
Maybe use a  and move the role related code to your java page?

Von meinem iPhone gesendet

> Am 29.06.2016 um 08:24 schrieb Matthew Bush 
> :
> 
> I want to dynamically set required roles at runtime dynamically rather than 
> have them statically coded.  Is this possible?
> 
> Taken from the tynamo-security page 
> (http://www.tynamo.org/tapestry-security+guide/ 
> )
> 
> 
>  delete user
> 
> What I would like to be able to do is set the required role or role list 
> based on a bound parameter, is that possible?
> 
> Example syntax -
> 
> 
>  delete user
> 
> 
> 
> Cheers,
> Matthew Bush
> 
> 


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



Re: Page redirect in tapestry5

2016-03-03 Thread mailingl...@j-b-s.de
You can just return the string and tapestry locates the page on its own

return cookieVal;

Just make sure the cookieval is a valid page name (class name without package)

Jens

Von meinem iPhone gesendet

> Am 04.03.2016 um 07:12 schrieb Anbazhagan.G :
> 
> Hi All,
> 
> I am working in web application using tapestry framework. I have following 
> pages a,b,c,d and Index in my application. In Index page, check some 
> condition and redirect to a particular page. My code,
> 
> |if(null!=cookieVal){if(cookieVal.equalsIgnoreCase("a")){returnA.class;}elseif(cookieVal.equalsIgnoreCase("b")){returnB.class;}elseif(cookieVal.equalsIgnoreCase("c")){returnC.class;}elseif(cookieVal.equalsIgnoreCase("d")){returnD.class;}}|
> 
> Here conditions are increased if pages are increased. How can I optimize this 
> condition check and redirect to particular page.
> 
> -- 
> Best Regards,
> Anbazhagan.G
> 

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



Re: Loading templates at run-time in Tapestry 5.4

2016-02-29 Thread mailingl...@j-b-s.de
Well, Freemarker, Velocity. Tapestry Offline all require some dev knowledge. 
And I did not say you give your users a standard dataset, I said give them a 
standard way to describe it like json or xml. Thus transformation is like:

array --> T5 loop (table, ol, ul)
elements --> div's or whatever
attributes --> maybe bootstrap col serrings aso

There are even json to html form conversion tools which do a great job like 
jeremydorn.com/json-editor

Jens

But if freemarker solves it: fine!

Jens

Von meinem iPhone gesendet

> Am 01.03.2016 um 02:25 schrieb David Diaz :
> 
> Hi Jens,
> 
> Yes, not all users will have software development backgrounds (of course).
> However, our users will not be the ones developing these renderer
> classes/templates, and thus it's fine if doing this requires some SDLC and
> Tapestry knowledge. I know it sounds a bit outlandish, but requirements are
> requirements.
> 
> It would be nice we could get our users to give us standardized data sets
> that matched the same data each time, but it's just not realistic in this
> case.
> 
> Thiago's suggestion of Freemarker seems like it can do the job for me just
> fine, and although having two templating systems isn't ideal, it's a lot
> better than the current system that is in place.
> 
> Thanks,
> David.
> 
> On Tue, Mar 1, 2016 at 12:05 PM, mailingl...@j-b-s.de 
> wrote:
> 
>> Hi David!
>> 
>> Thanks for the explanation. Unfortunately I doubt your approach is the way
>> to go. You are forcing all your users to get familiar with Tapestry, so
>> they are all really aware of software development, java, Testing, the dev
>> pipeline and everything? Who makes sure the tml and fictious jave class
>> works smoothly together?
>> 
>> I believe either they have to provide valid static html (no dynamic part,
>> but renderable by tapestry via outputraw). Or you provide base classes and
>> tmls and they send back derived version (tml / java inheritance, see T5
>> website), but again there must be some awareness for software dev and the
>> toolchain, which is not worth the effort as you still need to know all
>> dynamic parts in advance.
>> 
>> What about accepting e.g  xml / json and render the data in a generic way
>> on your side? Based an certain elements or attributes you should be able
>> even to render complex layouts and your users only need to know which
>> elements/attributes you support? Yes I know this sounds like the early
>> 80ies jsp tag libs or good old xml-dynamic-swing-ui systems-frameworks.
>> 
>> Jens
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 01.03.2016 um 00:03 schrieb David Diaz :
>>> 
>>> Hi all,
>>> 
>>> Thanks for the replies! I checked out your link Barry - it doesn't seem
>> to
>>> be exactly what I want. (I'll explain later in the reply... I'm still new
>>> to mailing lists).
>>> 
>>> Thiago & Jens:
>>> How I'm doing fetching-code-outside is someone writes a .java file that
>>> implements an interface. Say it has function a, b and c they have to
>>> implement. They then compile this into a class, put it into a program and
>>> link it to the set of data they want to render. Then, when using the web
>>> interface the application will detect when its loading the set of data
>> and
>>> load it into its own class (not overwriting), create a new instance and
>>> then use functions a, b and c to render the data into the webpage. This
>> is
>>> already working - but currently how it is done is that the user has to
>>> hardcode their HTML into the .class file and do things like \"" +
>>> escapeHTML(data) + "";\ instead of it having a template system
>> where
>>> they could go ${data} and then the application would use the
>>> tapestry template/component system.
>>> 
>>> An example usage for this would be, for example, a library that wants to
>>> digitize its pages and then have it available online to be viewed through
>>> the application. The library could store the files in an XML format like
>>> so: http://da.viddiaz.com/example.xml and then use the following
>>> hypothetical code and .tml to render it: http://da.viddiaz.com/code.txt
>>> http://da.viddiaz.com/code.tml
>>> 
>>> Then this library could have different sets of data that wouldn't match
>>> this exact set of data - it might have sets of emails (so then you could
>>> write an email renderer), MARC data and so on. These examples are basic -
>

Re: Loading templates at run-time in Tapestry 5.4

2016-02-29 Thread mailingl...@j-b-s.de
Hi David!

Thanks for the explanation. Unfortunately I doubt your approach is the way to 
go. You are forcing all your users to get familiar with Tapestry, so they are 
all really aware of software development, java, Testing, the dev pipeline and 
everything? Who makes sure the tml and fictious jave class works smoothly 
together? 

I believe either they have to provide valid static html (no dynamic part, but 
renderable by tapestry via outputraw). Or you provide base classes and tmls and 
they send back derived version (tml / java inheritance, see T5 website), but 
again there must be some awareness for software dev and the toolchain, which is 
not worth the effort as you still need to know all dynamic parts in advance. 

What about accepting e.g  xml / json and render the data in a generic way on 
your side? Based an certain elements or attributes you should be able even to 
render complex layouts and your users only need to know which 
elements/attributes you support? Yes I know this sounds like the early 80ies 
jsp tag libs or good old xml-dynamic-swing-ui systems-frameworks.

Jens

Von meinem iPhone gesendet

> Am 01.03.2016 um 00:03 schrieb David Diaz :
> 
> Hi all,
> 
> Thanks for the replies! I checked out your link Barry - it doesn't seem to
> be exactly what I want. (I'll explain later in the reply... I'm still new
> to mailing lists).
> 
> Thiago & Jens:
> How I'm doing fetching-code-outside is someone writes a .java file that
> implements an interface. Say it has function a, b and c they have to
> implement. They then compile this into a class, put it into a program and
> link it to the set of data they want to render. Then, when using the web
> interface the application will detect when its loading the set of data and
> load it into its own class (not overwriting), create a new instance and
> then use functions a, b and c to render the data into the webpage. This is
> already working - but currently how it is done is that the user has to
> hardcode their HTML into the .class file and do things like \"" +
> escapeHTML(data) + "";\ instead of it having a template system where
> they could go ${data} and then the application would use the
> tapestry template/component system.
> 
> An example usage for this would be, for example, a library that wants to
> digitize its pages and then have it available online to be viewed through
> the application. The library could store the files in an XML format like
> so: http://da.viddiaz.com/example.xml and then use the following
> hypothetical code and .tml to render it: http://da.viddiaz.com/code.txt
> http://da.viddiaz.com/code.tml
> 
> Then this library could have different sets of data that wouldn't match
> this exact set of data - it might have sets of emails (so then you could
> write an email renderer), MARC data and so on. These examples are basic -
> in the real world the data is a lot more complex! I hope this makes a bit
> more sense why I would need to take this approach.
> 
> In regards to the Dynamic component, I must have messed up using it. Still
> though, the problem would be getting it linked up to the .class file that
> is loaded so that the user could then use tapestry in there (otherwise the
> ComponentResources would be the .tml file that loaded it, not the
> dynamically loaded one).
> 
> The stack trace I was getting is here, although I don't think it's really
> useful: http://da.viddiaz.com/stacktrace.txt
> 
> Thanks,
> David.
> 
> On Tue, Mar 1, 2016 at 9:09 AM, mailingl...@j-b-s.de 
> wrote:
> 
>> I see. So a tapestry TML without a JAVA class is not considerably dynamic
>> as it has no business logic at all. Either your 3rd party delivers
>> TML+CLASS (only components from my point of view) than you can integrate it
>> as module. But this is far away from "dynamic". If you provide the logic,
>> the TML can not change anything nor add something new, so its about
>> rearanging HTML or changing the style, but this is not what you want
>> either, right? Because this might be a pure CSS related topic.
>> 
>> Can you give us a real piece of code you get from your 3rd party for
>> integration? Maybe it's really an iframe, an external template engine (to
>> render raw output) or something completely different like angular...
>> I am still confused about the requirements...
>> 
>> Sorry
>> 
>> Jens
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 29.02.2016 um 09:05 schrieb David Diaz :
>>> 
>>> Hi Jens,
>>> 
>>> Yes I have external pages that I need to integrate. And by code I mean
>> the
>>> actual .java page that would (hopefully) power the .tm

Re: Loading templates at run-time in Tapestry 5.4

2016-02-29 Thread mailingl...@j-b-s.de
I see. So a tapestry TML without a JAVA class is not considerably dynamic as it 
has no business logic at all. Either your 3rd party delivers TML+CLASS (only 
components from my point of view) than you can integrate it as module. But this 
is far away from "dynamic". If you provide the logic, the TML can not change 
anything nor add something new, so its about rearanging HTML or changing the 
style, but this is not what you want either, right? Because this might be a 
pure CSS related topic. 

Can you give us a real piece of code you get from your 3rd party for 
integration? Maybe it's really an iframe, an external template engine (to 
render raw output) or something completely different like angular... 
I am still confused about the requirements...

Sorry 

Jens

Von meinem iPhone gesendet

> Am 29.02.2016 um 09:05 schrieb David Diaz :
> 
> Hi Jens,
> 
> Yes I have external pages that I need to integrate. And by code I mean the
> actual .java page that would (hopefully) power the .tml.
> 
> The problem I have is that I need to (obviously) render content in a
> specific way, but the application I am writing needs to load the templates
> dynamically.
> 
> Thanks,
> David.
> 
> On Mon, Feb 29, 2016 at 6:37 PM, mailingl...@j-b-s.de 
> wrote:
> 
>> Hi David!
>> 
>> What do you mean by "external code"? Are you talking about external
>> Tapestry pages/components and tml's you need to integrate? Because you
>> mentiond HTML not TML? Does "code" refer to Javascript? Is the external
>> code self contained? What about an ugly but simple "iframe"?
>> 
>> Jens
>> 
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 29.02.2016 um 05:18 schrieb David Diaz :
>>> 
>>> Hi all,
>>> 
>>> I have been using Tapestry for a little bit now and I have run into one
>>> problem that I can't figure out how to solve.
>>> 
>>> In my application I need to be able to load external code & HTML to
>> display
>>> to the user from a trusted source at run-time. Currently I have gotten
>> code
>>> to load fine and I am using outputraw to render the result from the code.
>>> This is pretty bad though since I have to code the HTML within the Java
>>> file instead of having it templated.
>>> 
>>> I saw that Tapestry has a "Dynamic" component that allows loading
>> templates
>>> from an external source but I tried using it - it tries loading a file
>> from
>>> the file system at page creation time... this is not suitable for my use
>>> case since I need to load it from a String and I need to do it at render
>>> time.
>>> 
>>> I also tried messing around with DynamicTemplateParser & MarkupWriter
>> but I
>>> couldn't get it to bind to my properties/functions since the code is
>> loaded
>>> at runtime and is not defined at compile time (I would hit a NPE when the
>>> PropBindingFactory would try and locate the component).
>>> 
>>> If anyone could suggest any way of accomplishing this (or if it's futile
>>> and I'm wasting my time), it would be really appreciated.
>>> 
>>> Thanks,
>>> David.
>> 
>> -
>> 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: Loading templates at run-time in Tapestry 5.4

2016-02-28 Thread mailingl...@j-b-s.de
Hi David!

What do you mean by "external code"? Are you talking about external Tapestry 
pages/components and tml's you need to integrate? Because you mentiond HTML not 
TML? Does "code" refer to Javascript? Is the external code self contained? What 
about an ugly but simple "iframe"?

Jens


Von meinem iPhone gesendet

> Am 29.02.2016 um 05:18 schrieb David Diaz :
> 
> Hi all,
> 
> I have been using Tapestry for a little bit now and I have run into one
> problem that I can't figure out how to solve.
> 
> In my application I need to be able to load external code & HTML to display
> to the user from a trusted source at run-time. Currently I have gotten code
> to load fine and I am using outputraw to render the result from the code.
> This is pretty bad though since I have to code the HTML within the Java
> file instead of having it templated.
> 
> I saw that Tapestry has a "Dynamic" component that allows loading templates
> from an external source but I tried using it - it tries loading a file from
> the file system at page creation time... this is not suitable for my use
> case since I need to load it from a String and I need to do it at render
> time.
> 
> I also tried messing around with DynamicTemplateParser & MarkupWriter but I
> couldn't get it to bind to my properties/functions since the code is loaded
> at runtime and is not defined at compile time (I would hit a NPE when the
> PropBindingFactory would try and locate the component).
> 
> If anyone could suggest any way of accomplishing this (or if it's futile
> and I'm wasting my time), it would be really appreciated.
> 
> Thanks,
> David.

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



Re: Tapestry is a sinking Ship

2016-02-13 Thread mailingl...@j-b-s.de
JT please try to make some facebook friends and stop polluting our inbox with 
non-technical questions about something you do not use or understand at all. If 
something in T5 is not working, is to complicated feel free to give us samples 
and the members of the T5 sect will pick it up and improve the framework. This 
is how open source and democracy usually works. T5 is "code by convention", try 
"complain with substance" and we will listen, even to you.

Thanks

Jens

Von meinem iPhone gesendet

> Am 13.02.2016 um 17:39 schrieb JT :
> 
> Just hit delete or better unsub. Lol
>> On Feb 13, 2016 11:36 AM, "Andreas Fink"  wrote:
>> 
>> I would rephrase it to: Everybody should be allowed to raise his voice but
>> let me choose if i want to listen...
>> There are filter rules for 'He-Who-Must-Not-Be-Named in my mail client ;-)
>> 
>> Cheers,
>> Andi.
>> 
>>> On 13 Feb 2016, at 13:17 , JT  wrote:
>>> 
>>> Shitty idea. All voice should be heard. Not just the one you like to
>> hear.
 On Feb 13, 2016 3:19 AM, "Ilya Obshadko" 
>>> wrote:
>>> 
 Thiago, I have an idea.
 
 Why don't we ban this poor excuse of an idiot from a mailing list and
 address real problems latest release has?
 
 On Fri, Feb 12, 2016 at 10:53 PM, Thiago H de Paula Figueiredo <
 thiag...@gmail.com> wrote:
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 

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



Re: T5.3.8 ClassNotFound error ONLY when running on a virtualized server?!

2016-01-17 Thread mailingl...@j-b-s.de
Hi Georg!

I doubt we are facing a real class loading issue. Do you have initialization 
code in your pages a static member or something similar?

I might be entirely wrong but from a quick look at the stacktrace the trouble 
starts here

> com.sixbuilder.ui.base.MyPage.getLastMaintenanceCompletionDate(MyPage.java:913)

and you are trying to create an ArrayList passing a Collection having null 
Elements. Can you share the Code of MyPage and your ExceptionPage? Whats the 
difference between your working env and the failing one? A different DB, 
different Data? Can you reproduce it on your machine by using the db from the 
failing env?

Jens


Von meinem iPhone gesendet

> Am 18.01.2016 um 02:06 schrieb George Ludwig :
> 
> I'm trying to move a Tapestry app to the cloud, and came across this
> confounding error. I'm running Tomcat 7 and JDK 7 on CentOS. The war file
> works fine in my lab running on a bare metal CentOS 6.5 box, but when I run
> it in the cloud (RackSpace) on CentOS 6.7 or 7.2 (my only CentOS options),
> it blows up, showing me this error in the browser:
> 
>   type Exception report
>   message Unable to locate class file for
> 'com.sixbuilder.ui.pages.ExceptionReport' in class load
>   org.apache.tapestry5.internal.plastic.PlasticClassLoader@25f5298.
> 
> What's weird is that during Tapestry boot-up, it lists the ExceptionReport
> as being an available resource, so obviously it can find the class. The
> ExceptionReport is a special page to be displayed when an un-handled
> exception is thrown in the UI.
> 
> Which brings me to the other weird thing, which is that Tapestry was trying
> to display the ExceptionReport page as a result of a null pointer
> exception, which should never have been thrown in the first place. At that
> time it's trying to convert a Set of files to a List of files, and I can
> see that the directory that is being listed clearly has files, so the NPE
> should never have been thrown. Other parts of the app were able to access
> the local file system before this exception is thrown, so it's not a simple
> file permissions issue.
> 
> At this point the only thing I can think of is that Tapestry is somehow not
> liking the virtualized server. Has anyone encountered this?
> 
> The entire stack trace:
> 
> [ERROR] pages.Home Render queue error in Expansion[PropBinding[expansion
> Home(LastMaintenanceCompletionDate)]]:
> org.apache.tapestry5.ioc.internal.util.TapestryException
> org.apache.tapestry5.ioc.internal.util.TapestryException [at
> classpath:com/sixbuilder/ui/pages/Home.tml, line 375]
> at
> org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:65)
> at
> org.apache.tapestry5.internal.structure.ExpansionPageElement.render(ExpansionPageElement.java:45)
> at
> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
> at
> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
> at $PageRenderQueue_96598da390b9.render(Unknown Source)
> at $PageRenderQueue_96598da390b8.render(Unknown Source)
> at
> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
> at com.sixbuilder.ui.services.AppModule$2.renderMarkup(AppModule.java:171)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1977)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1959)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1944)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1930)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> com.trsvax.bootstrap.services.BootstrapModule$2.renderMarkup(BootstrapModule.java:197)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1912)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1893)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at
> com.trsvax.bootstrap.services.BootstrapModule$1.renderMarkup(BootstrapModule.java:188)
> at $MarkupRenderer_96598da390bf.renderMarkup(Unknown Source)
> at $MarkupRenderer_96598da390b7.renderMarkup(Unknown Source)
> at
> org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
> at $PageMarkupRenderer_96598da390b5.renderPageMarkup(Unknown Source)
> at
> org.apac

Re: Is tapestry plastic incompatible with JEE specs?

2015-12-12 Thread mailingl...@j-b-s.de
Understood. Than I would try to declare the scope of your core dependencies as 
"provided" in the war's pom.xml.  This is to me similar to a tomcat having 
shared jars in the lib folder like jdbc drivers but not including them into the 
war itself.

Jens



Von meinem iPhone gesendet

> Am 12.12.2015 um 15:08 schrieb Luca Arzeni :
> 
> Hi Jens,
> core module contains some EJBs: I'm using JPA for the persistence and SLSB as 
> facade to achieve a transactional demarcation strategy. So I could roughly 
> say that the core module contains the persistence layer and the business 
> logic, which is used by different client application, few of them are 
> webapps, while other are desktop apps.
> 
> I use this strategy in the web app and in a desktop GUI app:
> - the web apps use the SLSB approach, looking up the beans in the webapp 
> module, and allowing them to be injected  the pages ad T5 services;
> - the desktop and command line apps use directly the IOC of T5 to inject 
> services when I need them
> 
> So, an EAR usually contains three or more war module and a EJB module, while 
> desktop and command line apps are usually a GUI around some services.
> 
> As you can undestand, the real app is more complex than the simple project 
> that I used for test, and replicating EJB and T5 jars every where could make 
> my EAR to explode for size and complexity.
> 
> Anyway the testcase, that I used to pinpoint the problem, should be simple 
> enough to demonstrate the issue. 
> 
> I often see that people is deploy t5 as war inside tomcat or jetty. 
> 
> I'm wondering if there is someone around that is usually deploying EARs with 
> jboss and glassfish that has found similar issues...
> 
> Thanks,
> Luca
> 
> 
> 
>> Sent: Saturday, December 12, 2015 at 2:02 PM
>> From: "mailingl...@j-b-s.de" 
>> To: "Tapestry users" 
>> Subject: Re: Is tapestry plastic incompatible with JEE specs?
>> 
>> What is in your core Module? Services using T5 IOC? Why is the core Module 
>> not part of the war?
>> To me it looks more like a structural / serup problem than a real Tapestry 
>> issue, to be honest. But I can be entirely wrong because I do not know the 
>> requirements of your project and why it is structured this way.
>> 
>> If you need these libs in different classloaders not belonging to same 
>> hiererchy, you can't share them. The same class loaded from different 
>> classloaders will cause trouble anyway, too. Maybe you only need it on 
>> compile time and "maven provided" on your war pom.xml is the solution?
>> 
>> Jens
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 11.12.2015 um 22:20 schrieb Luca Arzeni :
>>> 
>>> Hi Jens,
>>> the point is that I need them in the lib since I use them also in the core 
>>> module.
>>> 
>>> I can place them in the lib AND in the war, but I cannot place them ONLY in 
>>> the war.
>>> 
>>> Also, I ask about compatibility because if I have properly spotted the 
>>> issue, some kind of problem could arise also in the core (read: ejb.jar) 
>>> module.
>>> 
>>> The real showstopper is the pervasive usage that I'm doing of tapestry IOC.
>>> 
>>> I like it, but if these problems cannot be solved, it may be better for me 
>>> to migrate to Guice or Spring.
>>> 
>>> Thanks,
>>> larzeni
>>> 
>>> 
>>>> Sent: Friday, December 11, 2015 at 8:00 PM
>>>> From: "mailingl...@j-b-s.de" 
>>>> To: "Tapestry users" 
>>>> Subject: Re: Is tapestry plastic incompatible with JEE specs?
>>>> 
>>>> Hi!
>>>> 
>>>> IWhy not having all T5 related jars in your war? Any particular reason why 
>>>> they are located in your ear?
>>>> 
>>>> Jens
>>>> 
>>>> 
>>>> 
>>>> Von meinem iPhone gesendet
>>>> 
>>>>> Am 11.12.2015 um 19:05 schrieb Luca Arzeni :
>>>>> 
>>>>> Hi there, 
>>>>> my environment is:
>>>>> JBoss 7.2+  (actually 6.1.1.GA) or Wildfly 8.0 Final
>>>>> Tapestry5 5.3.7
>>>>> 
>>>>> I'm developing a little ear, which has the following structure
>>>>> 
>>>>> myear.ear
>>>>> |  core-1.1.jar
>>>>> |  webclient-1.1.war
>>>>> |  lib/
>>>>> |  plastic-5.3.7.jar
>>>>> |  tapestry5-annotations-5.3.7.jar
>>>

Re: Is tapestry plastic incompatible with JEE specs?

2015-12-12 Thread mailingl...@j-b-s.de
What is in your core Module? Services using T5 IOC? Why is the core Module not 
part of the war?
To me it looks more like a structural / serup problem than a real Tapestry 
issue, to be honest. But I can be entirely wrong because I do not know the 
requirements of your project and why it is structured this way.

If you need these libs in different classloaders not belonging to same 
hiererchy, you can't share them. The same class loaded from different 
classloaders will cause trouble anyway, too. Maybe you only need it on compile 
time and "maven provided" on your war pom.xml is the solution?

Jens

Von meinem iPhone gesendet

> Am 11.12.2015 um 22:20 schrieb Luca Arzeni :
> 
> Hi Jens,
> the point is that I need them in the lib since I use them also in the core 
> module.
> 
> I can place them in the lib AND in the war, but I cannot place them ONLY in 
> the war.
> 
> Also, I ask about compatibility because if I have properly spotted the issue, 
> some kind of problem could arise also in the core (read: ejb.jar) module.
> 
> The real showstopper is the pervasive usage that I'm doing of tapestry IOC.
> 
> I like it, but if these problems cannot be solved, it may be better for me to 
> migrate to Guice or Spring.
> 
> Thanks,
> larzeni
> 
> 
>> Sent: Friday, December 11, 2015 at 8:00 PM
>> From: "mailingl...@j-b-s.de" 
>> To: "Tapestry users" 
>> Subject: Re: Is tapestry plastic incompatible with JEE specs?
>> 
>> Hi!
>> 
>> IWhy not having all T5 related jars in your war? Any particular reason why 
>> they are located in your ear?
>> 
>> Jens
>> 
>> 
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 11.12.2015 um 19:05 schrieb Luca Arzeni :
>>> 
>>> Hi there, 
>>> my environment is:
>>> JBoss 7.2+  (actually 6.1.1.GA) or Wildfly 8.0 Final
>>> Tapestry5 5.3.7
>>> 
>>> I'm developing a little ear, which has the following structure
>>> 
>>> myear.ear
>>> |  core-1.1.jar
>>> |  webclient-1.1.war
>>> |  lib/
>>>  |  plastic-5.3.7.jar
>>>  |  tapestry5-annotations-5.3.7.jar
>>>  |  tapestry-core-5.3.7.jar
>>>  |  tapestry-func-5.3.7.jar
>>>  |  tapestry-ioc-5.3.7.jar
>>>  |  tapestry-json-5.3.7.jar
>>>  |  tapestry-upload-5.3.7.jar
>>>  |  ... omissis ...
>>> 
>>> the core-1.1.jar module contains few EJBs,
>>> the webclient-1.1.war module contains my t5 app (pages, components and so 
>>> on)
>>> 
>>> I routinely use and appreciate t5 IOC, so I used it also in the core 
>>> module; at this point I need to have the t5 jars available to the core AND 
>>> to the webclient, so I put them in the shared "lib" folder of the EAR.
>>> 
>>> So far, so good: the app worked and I had no problem.
>>> 
>>> Today I was needing to place an object (a simple bean with 3 strings 
>>> attributes and their getters and setters) and serialize/deserialize it into 
>>> a file.
>>> 
>>> The bean is needed only in the webclient (I need to place it in session), 
>>> so I placed it in the webclient.war.
>>> 
>>> Now my webapp crashed when I try to instantiate a page that refers to the 
>>> bean.
>>> 
>>> Looking at the problem, it seems to be caused by plastic that tries to 
>>> reach the class by using the jboss classloader.
>>> 
>>> This is the relevant part of the stack:
>>> 
>>> ---
>>> org.apache.tapestry5.internal.plastic.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1588)
>>> org.apache.tapestry5.internal.plastic.asm.ClassWriter.getMergedType(ClassWriter.java:1559)
>>> org.apache.tapestry5.internal.plastic.asm.Frame.merge(Frame.java:1406)
>>> org.apache.tapestry5.internal.plastic.asm.Frame.merge(Frame.java:1308)
>>> org.apache.tapestry5.internal.plastic.asm.MethodWriter.visitMaxs(MethodWriter.java:1353)
>>> org.apache.tapestry5.internal.plastic.asm.tree.MethodNode.accept(MethodNode.java:635)
>>> org.apache.tapestry5.internal.plastic.asm.tree.MethodNode.accept(MethodNode.java:557)
>>> org.apache.tapestry5.internal.plastic.asm.tree.ClassNode.accept(ClassNode.java:361)
>>> org.apache.tapestry5.internal.plastic.PlasticClassPool.toBytecode(PlasticClassPool.java:187)
>>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
>>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
>>> org.apache.tapestry5.int

Re: Is tapestry plastic incompatible with JEE specs?

2015-12-11 Thread mailingl...@j-b-s.de
Hi!

IWhy not having all T5 related jars in your war? Any particular reason why they 
are located in your ear?

Jens



Von meinem iPhone gesendet

> Am 11.12.2015 um 19:05 schrieb Luca Arzeni :
> 
> Hi there, 
> my environment is:
> JBoss 7.2+  (actually 6.1.1.GA) or Wildfly 8.0 Final
> Tapestry5 5.3.7
> 
> I'm developing a little ear, which has the following structure
> 
> myear.ear
> |  core-1.1.jar
> |  webclient-1.1.war
> |  lib/
>   |  plastic-5.3.7.jar
>   |  tapestry5-annotations-5.3.7.jar
>   |  tapestry-core-5.3.7.jar
>   |  tapestry-func-5.3.7.jar
>   |  tapestry-ioc-5.3.7.jar
>   |  tapestry-json-5.3.7.jar
>   |  tapestry-upload-5.3.7.jar
>   |  ... omissis ...
> 
> the core-1.1.jar module contains few EJBs,
> the webclient-1.1.war module contains my t5 app (pages, components and so on)
> 
> I routinely use and appreciate t5 IOC, so I used it also in the core module; 
> at this point I need to have the t5 jars available to the core AND to the 
> webclient, so I put them in the shared "lib" folder of the EAR.
> 
> So far, so good: the app worked and I had no problem.
> 
> Today I was needing to place an object (a simple bean with 3 strings 
> attributes and their getters and setters) and serialize/deserialize it into a 
> file.
> 
> The bean is needed only in the webclient (I need to place it in session), so 
> I placed it in the webclient.war.
> 
> Now my webapp crashed when I try to instantiate a page that refers to the 
> bean.
> 
> Looking at the problem, it seems to be caused by plastic that tries to reach 
> the class by using the jboss classloader.
> 
> This is the relevant part of the stack:
> 
> ---
> org.apache.tapestry5.internal.plastic.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1588)
> org.apache.tapestry5.internal.plastic.asm.ClassWriter.getMergedType(ClassWriter.java:1559)
> org.apache.tapestry5.internal.plastic.asm.Frame.merge(Frame.java:1406)
> org.apache.tapestry5.internal.plastic.asm.Frame.merge(Frame.java:1308)
> org.apache.tapestry5.internal.plastic.asm.MethodWriter.visitMaxs(MethodWriter.java:1353)
> org.apache.tapestry5.internal.plastic.asm.tree.MethodNode.accept(MethodNode.java:635)
> org.apache.tapestry5.internal.plastic.asm.tree.MethodNode.accept(MethodNode.java:557)
> org.apache.tapestry5.internal.plastic.asm.tree.ClassNode.accept(ClassNode.java:361)
> org.apache.tapestry5.internal.plastic.PlasticClassPool.toBytecode(PlasticClassPool.java:187)
> org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
> org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
> org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:358)
> org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:350)
> org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
> java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> java.lang.Class.getDeclaredFields0(Native Method)
> java.lang.Class.privateGetDeclaredFields(Class.java:2509)
> java.lang.Class.getDeclaredField(Class.java:1959)
> ---
> 
> In the JEE spec it is written that the war classloader must be isolated from 
> the EAR classloader.
> 
> In my understanding this means that t5 plastic (which lives in the EAR 
> classloader) cannot reach the classes that are in the war (separate 
> classloader).
> 
> I could place the jars in the war/lib folder, but at this point the core 
> module cannot see them.
> 
> The only viable solution that I found is to place the bean classes in the 
> shared lib folder, by extracting them from the war, but this is only a 
> temporary patch.
> 
> In the past I developed another ear and I had a similar issue trying to 
> instantiate a page from another page. I solved it by avoiding the link 
> between the two pages; but now I'm starting to think that it was another 
> "face" of the same problem.
> 
> Now, since these issues are becoming too frequent to work around them, and 
> I'm wandering if there is a real solution or there's a real compatibility 
> issue between T5 and JEE specs.
> 
> Is there anyone that can help me?
> 
> Thanks,
> larzeni
> 
> 
> 
> 
> 
> -
> 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: Make Tapestry add an id to the tag of the grid

2015-09-18 Thread mailingl...@j-b-s.de
Hi!

You asked for a workaround...why not using a css class temporarily until this 
issue is properly resolved?

class="your-id-1"

You can use a placeholder to dynamically provide different id's (well, css 
classes) per grid.

At least a jquery selector will now be able to pick it up and I am aware of the 
fact using class to mimique ID's is generally wrong...

Jens



Von meinem iPhone gesendet

> Am 18.09.2015 um 09:58 schrieb Davide Vecchi :
> 
> Hi everybody,
> 
> I have the same need described in the thread at 
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/How-to-add-table-id-into-the-Grid-td2417082.html
>  : although in my .tml I do have a t:id attribute in the  tag, the 
> resulting HTML does not have an id attribute in the corresponding  
> tag, so I cannot select the table through jQuery or retrieve it through 
> JavaScript; I cannot assume that the page has only one grid so I need the 
>  tag to have an id.
> 
> I am using Tapestry 5.3.7. In the above mentioned thread the guy asked how to 
> report a bug about this issue but he got no reply. Is that fix already 
> implemented in some newer version or is it planned to be implemented in 
> future ? Or is there some known workaround to get the  tag to have an 
> id attribute in other ways ?

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



Re: Localized messages based on property value

2015-08-10 Thread mailingl...@j-b-s.de
Sorry Nathan I do not understand: do you want to spread properties belonging to 
one particular page accross multiple property files?

Jens

Von meinem iPhone gesendet

> Am 10.08.2015 um 09:08 schrieb Nathan Quirynen :
> 
> Hi,
> 
> I have in some pages/components in my Tapestry (5.3.7) application the need 
> to have localized messages based on some property value.
> 
> Simplified example:
> 
> Class SomeClass {
>String code;
> }
> 
> In the page I have then a property of type SomeClass and based on this value 
> I need different localized messages. So I was wondering if message catalog 
> files like following would be possible:
> [name-of-page-or-component]_[some_class_code]_[locale].properties --> 
> Index_123_en.properties
> 
> Can I implement some kind of message provider or would it be possible by 
> implementing a binding prefix "SomeClassBinding" that i use instead of 
> "message:" for these cases? What is the way to go and some pointers on how to 
> implement it are appreciated.
> 
> Nathan
> 
> -
> 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: Filling some filed of a form selecting a row from a grid

2015-08-03 Thread mailingl...@j-b-s.de
Hi Luca,

we are using T5.3.8 right now but  there are no plans on our side to upgrade to 
T5.4 yet, so unfortunately I can not answer this question.

For Datatables I can tell you integration is easy, filtering works per column 
or multiple columns ("and" condition) or regex. Ok, regex ist not considerably 
end user compatible but you can set regex expression by JS internally. Just 
check it out, for our requirements it simply works without any issues. Our 
Dataset is small (less than 1000 entries) so we do not use Ajax, but we tested 
up to 50k entries without problems. 50k+ slows down, 80k creates serious issues 
depending on browser used. I guess you have to start with Ajax / Paging right 
from the start.

Jens

Von meinem iPhone gesendet

> Am 03.08.2015 um 18:23 schrieb Luca Arzeni :
> 
> Thanks Jens,
> I will take a look.
> 
> I was hoping that there was already a "tapestry-zed" solution since to me it 
> seems a common need...
> 
> Do you know if tapestry 5.4 has some native support for jquery tables?
> 
> Thanks,
> larzeni
> 
> 
> 
>> Sent: Monday, August 03, 2015 at 7:03 PM
>> From: "mailingl...@j-b-s.de" 
>> To: "Tapestry users" 
>> Subject: Re: Filling some filed of a form selecting a row from a grid
>> 
>> Maybe you have a look at jquery tables + ajax? 
>> 
>> https://www.datatables.net/examples/data_sources/server_side.html
>> 
>> Jens
>> 
>> 
>> Von meinem iPhone gesendet
>> 
>>> Am 03.08.2015 um 17:55 schrieb Luca Arzeni :
>>> 
>>> Thanks Kalle,
>>> I appreciate your hint and I already used a solution like this for a 
>>> shorter list of items.
>>> 
>>> The point here is that the list needs to be shown in a grid since it has 
>>> more than 100.000 items, and I need to allow the user to filter it 
>>> according to few criteria (that I've already implemented in the page that 
>>> contains the grid).
>>> 
>>> If you have used a ERP application you will recognize here a recurrent 
>>> pattern: user needs to fill some fields, hit a lookup button, the button 
>>> open a new page containing a list of items. The user select one of these 
>>> item and fills the fields of the originating form.
>>> 
>>> By the way: the user needs to see a list of customers since many users have 
>>> similar values (same name, same city...) so he needs to examinate more than 
>>> one field to choose the right one (which is the reason why a show a list of 
>>> customers in a grid).
>>> 
>>> Thanks again for your help, but I need a different solution here!
>>> larzeni
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> Sent: Monday, August 03, 2015 at 6:37 PM
>>>> From: "Kalle Korhonen" 
>>>> To: "Tapestry users" 
>>>> Subject: Re: Filling some filed of a form selecting a row from a grid
>>>> 
>>>>> On Mon, Aug 3, 2015 at 7:58 AM, Luca Arzeni  wrote:
>>>>> 
>>>>> Hi,
>>>>> I'm using tapestry 5.3.7 unde jboss6 (java6).
>>>>> I'm developing an invoice form.
>>>>> I already have a customer list, built with a grid.
>>>>> While filling the invoice form, I need to show the customer grid, select
>>>>> one of the customers, and retrieve his data (first and last name, 
>>>>> addreess,
>>>>> city, zip code phone numbers and so on...), to fill some fields of the
>>>>> invoice form.
>>>>> I would not like to use a select on the invoice data, since I have a large
>>>>> list of customers.
>>>>> What is the best practise to face this issue?
>>>> The typical solution is to use some type of autocomplete field, where the
>>>> user can start typing on a field and the system makes a lookup on the
>>>> background and provides a list of matches based on the input. There's an
>>>> autocomplete mixins available for a regular input field, see
>>>> http://tapestry.apache.org/component-mixins.html. It may or may not work
>>>> out-of-the-box but at least it'll give you ideas on how to build yours.
>>>> 
>>>> Kalle
>>> 
>>> -
>>> 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
> 
> -
> 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: Filling some filed of a form selecting a row from a grid

2015-08-03 Thread mailingl...@j-b-s.de
Maybe you have a look at jquery tables + ajax? 

https://www.datatables.net/examples/data_sources/server_side.html

Jens


Von meinem iPhone gesendet

> Am 03.08.2015 um 17:55 schrieb Luca Arzeni :
> 
> Thanks Kalle,
> I appreciate your hint and I already used a solution like this for a shorter 
> list of items.
> 
> The point here is that the list needs to be shown in a grid since it has more 
> than 100.000 items, and I need to allow the user to filter it according to 
> few criteria (that I've already implemented in the page that contains the 
> grid).
> 
> If you have used a ERP application you will recognize here a recurrent 
> pattern: user needs to fill some fields, hit a lookup button, the button open 
> a new page containing a list of items. The user select one of these item and 
> fills the fields of the originating form.
> 
> By the way: the user needs to see a list of customers since many users have 
> similar values (same name, same city...) so he needs to examinate more than 
> one field to choose the right one (which is the reason why a show a list of 
> customers in a grid).
> 
> Thanks again for your help, but I need a different solution here!
> larzeni
> 
> 
> 
> 
> 
>> Sent: Monday, August 03, 2015 at 6:37 PM
>> From: "Kalle Korhonen" 
>> To: "Tapestry users" 
>> Subject: Re: Filling some filed of a form selecting a row from a grid
>> 
>>> On Mon, Aug 3, 2015 at 7:58 AM, Luca Arzeni  wrote:
>>> 
>>> Hi,
>>> I'm using tapestry 5.3.7 unde jboss6 (java6).
>>> I'm developing an invoice form.
>>> I already have a customer list, built with a grid.
>>> While filling the invoice form, I need to show the customer grid, select
>>> one of the customers, and retrieve his data (first and last name, addreess,
>>> city, zip code phone numbers and so on...), to fill some fields of the
>>> invoice form.
>>> I would not like to use a select on the invoice data, since I have a large
>>> list of customers.
>>> What is the best practise to face this issue?
>>> 
>>> 
>> The typical solution is to use some type of autocomplete field, where the
>> user can start typing on a field and the system makes a lookup on the
>> background and provides a list of matches based on the input. There's an
>> autocomplete mixins available for a regular input field, see
>> http://tapestry.apache.org/component-mixins.html. It may or may not work
>> out-of-the-box but at least it'll give you ideas on how to build yours.
>> 
>> Kalle
>> 
> 
> -
> 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: decoupling business logic and frontend

2015-07-28 Thread mailingl...@j-b-s.de
I go with Thiago.

We use different maven modules for our business logic and persistence classes 
so both maven modules are standalone using their own tests. There is no 
relation to Tapestry at all for these modules.

We use Tapestry services and Tapestry IOC to tie it together in our webapps

We even use these budinesslogic in non Tapestry war's e.g to support cron based 
jobs in parallel or reuse the backend services in different Tapestry Apps. I do 
not see any reason to use a remote connection, beside you have different life 
cycles for these modules and deployment is out of your control

Jens

Von meinem iPhone gesendet

> Am 27.07.2015 um 14:56 schrieb Thiago H de Paula Figueiredo 
> :
> 
> Hi!
> 
>> On Sat, 25 Jul 2015 09:16:30 -0300, Ilya Obshadko  
>> wrote:
>> 
>> 
>> However, there is one particular issue: when the whole thing is built on
>> Tapestry, any person involved should understand the framework, and it's not 
>> possible to isolate frontend tasks from backend ones (because all the
>> Tapestry "endpoints" are in fact event handlers and all AJAX requests are
>> handled through usual event processing chain).
> 
> I'm not sure I can agree with you. Business logic is supposed to be written 
> inside Tapestry-IoC services, so people working on them only need to know 
> T-IoC basics, which are very simple, so you can easily create tasks that 
> don't need any knowledge at all on Tapestry-core (the web framework).
> 
> -- 
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

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



Re: [T5.4 build 22] Exception in ExceptionReport.tml

2015-07-18 Thread mailingl...@j-b-s.de
What exactly are you doing on your exception page? This error looks like a new 
thread is created which is "not possible" in GAE

Jens



Von meinem iPhone gesendet

> Am 18.07.2015 um 10:47 schrieb Michał Więckowski 
> :
> 
> Hello everyone,
> 
> I've got a question regarding tapestry 5.4. I try to integrate my
> application with tynamo tapestry security and Google App Engine.  After
> some development I started to get these exception when "something" in
> application is not working. I have written "something" because problem
> concerns ExceptionPage (as you can see on stacktrace attached below).
> Has anybody faced such a problem?
> 
> Of course I can post some configuration files, but since I have no idea
> what can cause this exception of error page, I not posing any at the
> moment.
> 
> 
>HTTP ERROR 500
> 
>Problem accessing /. Reason:
> 
>org.apache.tapestry5.internal.services.RenderQueueException: Render
> queue error in SetupRender[core/ExceptionReport:loop_0]: Failure reading
> parameter 'source' of component core/ExceptionReport:loop_0: access denied
> ("java.lang.RuntimePermission" "modifyThreadGroup") [at
> classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml, line 110]
>Caused by:
> 
>org.apache.shiro.subject.ExecutionException:
> org.apache.tapestry5.internal.services.RenderQueueException: Render queue
> error in SetupRender[core/ExceptionReport:loop_0]: Failure reading
> parameter 'source' of component core/ExceptionReport:loop_0: access denied
> ("java.lang.RuntimePermission" "modifyThreadGroup") [at
> classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml, line 110]
>at
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:385)
>at
> org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:54)
>at $HttpServletRequestFilter_12a67d391b5c.service(Unknown Source)
>at $HttpServletRequestHandler_12a67d391b5f.service(Unknown Source)
>at
> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
>at $HttpServletRequestHandler_12a67d391b5f.service(Unknown Source)
>at
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>at $HttpServletRequestFilter_12a67d391b59.service(Unknown Source)
>at $HttpServletRequestHandler_12a67d391b5f.service(Unknown Source)
>at
> org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:804)
>at $HttpServletRequestHandler_12a67d391b5f.service(Unknown Source)
>at $HttpServletRequestHandler_12a67d391b58.service(Unknown Source)
>at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
>at
> com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
>at
> com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>at
> com.google.appengine.tools.development.DevAppEngineWeb

Re: JumpStart Edit example - prepareForSubmit event handler

2015-05-11 Thread mailingl...@j-b-s.de
Hi Daniel,

Do you use Hibernate? Maybe your instance is stored in the Hibernate Session 
Cache thus you get the same object? I had a similar issue when working with 
HSQL/Hibernate...

Jens

Von meinem iPhone gesendet

> Am 08.05.2015 um 15:55 schrieb Poggenpohl, Daniel 
> :
> 
> Hi,
> 
> http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1
> 
> describes an example where a BeanEditForm is used to edit some object and 
> update the database.
> 
> The example uses the following code:
> 
>// Form bubbles up the PREPARE_FOR_SUBMIT event during form submission.
> 
>void onPrepareForSubmit() throws Exception {
>// Get objects for the form fields to overlay.
>person = findPerson(personId);
>}
> 
> When I implement the example and set a few breakpoints, every time this event 
> handler is called, the person object already is the same as is found by 
> findPerson(personId). I can't seem to find the reason that the handler 
> retrieves the same object from the database once again.
> 
> Is this done because of detached objects? Or is there some other reasoning 
> behind this?
> 
> Regards,
> Daniel 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



Re: SV: Generate link to Tapestry page from another program

2015-05-10 Thread mailingl...@j-b-s.de
Hi Jacob,

You can use "/" to seperate your id's, for example:

http://yourserver/tapestrypage/1/2/3/4

Will call the onActivate method in your tapestry page class named 
"TapestryPage". All params are passed via EventContext and you can access the 
values by index. In case your id's may be of type string and contain the "/" 
character you have to "quote" it because "/" is the natural tapestry url 
parameter delimiter. 

Does this help?

Jens

Von meinem iPhone gesendet

> Am 09.05.2015 um 22:00 schrieb Poder, Jacob :
> 
> That topic has nothing to do with Tapestry... Tapestry is rejecting my 
> (comma) delimited list. The only thing I get from that topic is using another 
> delimiter than comma. I can do that of course and that was definitely the 
> point of my question, but what delimiter is allowed by Tapestry?
> 
> 
> 
> Fra: Chris Poulsen [mailingl...@nesluop.dk]
> Sendt: 9. maj 2015 19:30
> Til: Tapestry users
> Emne: Re: Generate link to Tapestry page from another program
> 
> Something like this answer: http://stackoverflow.com/a/15849972
> 
> On Sat, May 9, 2015 at 5:38 PM, Poder, Jacob 
> wrote:
> 
>> Sorry, I don't follow, how can I "pass the list of ids as a single
>> multivalue parameter"?
>> 
>> 
>> Fra: Chris Poulsen [mailingl...@nesluop.dk]
>> Sendt: 9. maj 2015 16:52
>> Til: Tapestry users
>> Emne: Re: Generate link to Tapestry page from another program
>> 
>> I was thinking that you could pass the list of ids as a single multivalue
>> parameter and then use request.getParameterValues to retrieve the values
>> for the parameter (so url encoding of "," would not be an issue)
>> 
>> On Wed, May 6, 2015 at 5:00 PM, Poder, Jacob > wrote:
>> 
>>> I'll consider overriding the URLEncoder service, but I'm not too keen on
>>> that as it will require me to check for changes in the std implementation
>>> on each Tapestry upgrade.
>>> Maybe the most reliable solution is to use context segments after all...
>>> 
>>> Thank you for your input.
>>> 
>>> -Original Message-
>>> From: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com]
>>> Sent: 6. maj 2015 16:39
>>> To: Tapestry users
>>> Subject: Re: Generate link to Tapestry page from another program
>>> 
>>> On Wed, 06 May 2015 10:24:01 -0300, Poder, Jacob <
>>> jacob.po...@thermofisher.com> wrote:
>>> 
 Tapestry will throw an exception in URLEncoderImpl.decode before even
 getting to onActivate in my page, so I can't do that.
>>> 
>>> You can override the URLEncoder service with your own implementation if
>>> you really want to use commas. Or you could even do some URL rewriting.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>>> -
>>> 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
> -
> 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: Are component parameters shared between sessions?

2014-09-18 Thread mailingl...@j-b-s.de
Hi Boris,
can you share the real code because I am confused by "filter" and 
"selectedFilter". Both are of type "Filter", but assigned using "new"?
Can you show the filter impl? Are you using a filter cache somewhere? Or a 
service class which is not created on a per request base but only once? And 
just shouting: are you sure you have different users, different sessions? Don't 
get me wrong, by asking these silly questions, but personally I doubt it's a 
Tapestry issue... 

Jens

Von meinem iPhone gesendet

> Am 18.09.2014 um 00:09 schrieb Boris Horvat :
> 
> I have never tried to initialize Filter in the field so I don't have such
> problem. Here is my code
> 
> In the page I have
> 
>@Property
>@Persist
>private Filter filter;
> 
> this field is null at the begining, and it is always passed to the
> hibernate in order to apply data filtering, if it is null, no need to do
> any filtering.
> 
> I have a component that is called FilterData
> 
>
> 
> In that component I have
> 
>@Parameter
>private Filter filter;
>@Property
>@Persist
>private Filter selectedFilter;
> 
> The property selectedFilter is used for the display and manipulation by the
> component (probably I could live without this), and once all of the fields
> are selected and a run button is pressed I execute something like
> 
> filter = new Filter(selectedFilter)
> 
> For the user that has done this I can see new object been passed, however
> if the same page is refreshed by another user (using a different browser,
> or even different machine) I can see that it also has the same object in
> the filter property.
> 
> I will try to clear code a bit and remove selectedFilter if possible and
> see if that helps. But all in all I think I got my answer, still if anyone
> has any idea why do I see this problem, feel free to shout :)
> 
> Thanks
> 
> PS removing @Persist from selectedFilter did not help
> 
> 
> 
> On Tue, Sep 16, 2014 at 2:56 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>> On Mon, 15 Sep 2014 19:25:21 -0300, Boris Horvat 
>> wrote:
>> 
>> Reading a tapestry documentation I get that page only has one instance,
>>> so does this mean that once I place something in the component's parameter
>>> it is unable to determine in which session it should be place?
>> 
>> No. Tapestry itself never persists parameter values in the session.
>> Parameters are completely independent from the session. In addition,
>> Tapestry uses a single page instance for all requests, but the page state
>> (non-annotated fields) is actually stored in a per-request (per-thread)
>> map, all this done transparently and automatically, so the state of one
>> request doesn't affect other requests at all.
>> 
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> -- 
> Sincerely
> *Boris Horvat*

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



Re: QName::=(NCName':')?NCName error when tml is parsed

2014-05-15 Thread mailingl...@j-b-s.de
It looks like the library mapping name is causing this effect: in case the name 
begins with a digit as first character like "1st" component rendering fails. 
Using "first" instead fixes the problem and everything works as expected.

To me it looks like bug, but if it is expected behaviour I would prefer an 
"Illegal libray mapping name" exception. What do you think?

Jens







Von meinem iPhone gesendet

> Am 06.05.2014 um 00:42 schrieb Jens Breitenstein :
> 
> Hi T5 Users!
> 
> I am struggling with an strange error in T5.3.7 and hopefully one of you can 
> give me a hint how to track it down..
> 
> I wrote a "Icon" component to show bootstrap glyphicons:
> 
> public class Icon
> {
>@Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
>@Property private String _name;
> 
>boolean beginRender(final MarkupWriter writer)
>{
>// 
>writer.element("span", "class", "glyphicon glyphicon-" + _name);
>writer.end();
>return true;
>}
> }
> 
> 
> So it's possible to show a glyphicon in a page by
> 
> 
> 
> Everthing worked fine until I moved to component to a "common library 
> package". After starting Jetty and accessing a page which uses this component 
> I get:
> 
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure 
> parsing template classpath:de/xyz/application/client/pages/DataManaging.tml: 
> Element or attribute do not match QName production: 
> QName::=(NCName':')?NCName.  [at 
> classpath:de/xyz/application/pages/DataManaging.tml, line 9]
>at 
> org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:173)
>at 
> org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:61)
>at 
> org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:58)
>at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>... 98 more
> Caused by: org.xml.sax.SAXParseException: Element or attribute do not match 
> QName production: QName::=(NCName':')?NCName.
>at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>at 
> org.apache.tapestry5.internal.services.XMLTokenStream.parse(XMLTokenStream.java:317)
>at 
> org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:163)
> 
> 
> Even more confusing is the fact the error never appears again it only occurs 
> on first access.
> 
> 
> Thanks in advance
> 
> 
> Jens
> 
> 

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



Fwd: QName::=(NCName':')?NCName error when tml is parsed

2014-05-11 Thread mailingl...@j-b-s.de
Hi Andi, hi Kristian!

We solved the puzzle several days ago, but unfortunately the mail never 
appeared in the mailing list even my phone tells me it is sent :-(
See below

Thanks Jens

Von meinem iPhone gesendet

Anfang der weitergeleiteten E‑Mail:

> Von: "mailingl...@j-b-s.de" 
> Datum: 7. Mai 2014 08:51:12 MESZ
> An: Tapestry users 
> Betreff: Re: QName::=(NCName':')?NCName error when tml is parsed
> 
> It looks like the library mapping name is causing this effect: in case the 
> name begins with a digit as first character like "1st" component rendering 
> fails. Using "first" instead fixes the problem and everything works as 
> expected.
> 
> To me it looks like bug, but if it is expected behaviour I would prefer an 
> "Illegal libray mapping name" exception. What do you think?
> 
> Jens
> 
> 
> 
> 
> 
> 
> 
> Von meinem iPhone gesendet
> 
>> Am 06.05.2014 um 00:42 schrieb Jens Breitenstein :
>> 
>> Hi T5 Users!
>> 
>> I am struggling with an strange error in T5.3.7 and hopefully one of you can 
>> give me a hint how to track it down..
>> 
>> I wrote a "Icon" component to show bootstrap glyphicons:
>> 
>> public class Icon
>> {
>>   @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
>>   @Property private String _name;
>> 
>>   boolean beginRender(final MarkupWriter writer)
>>   {
>>   // 
>>   writer.element("span", "class", "glyphicon glyphicon-" + _name);
>>   writer.end();
>>   return true;
>>   }
>> }
>> 
>> 
>> So it's possible to show a glyphicon in a page by
>> 
>> 
>> 
>> Everthing worked fine until I moved to component to a "common library 
>> package". After starting Jetty and accessing a page which uses this 
>> component I get:
>> 
>> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure 
>> parsing template classpath:de/xyz/application/client/pages/DataManaging.tml: 
>> Element or attribute do not match QName production: 
>> QName::=(NCName':')?NCName.  [at 
>> classpath:de/xyz/application/pages/DataManaging.tml, line 9]
>>   at 
>> org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:173)
>>   at 
>> org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:61)
>>   at 
>> org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:58)
>>   at 
>> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>>   ... 98 more
>> Caused by: org.xml.sax.SAXParseException: Element or attribute do not match 
>> QName production: QName::=(NCName':')?NCName.
>>   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>>   at 
>> org.apache.tapestry5.internal.services.XMLTokenStream.parse(XMLTokenStream.java:317)
>>   at 
>> org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:163)
>> 
>> 
>> Even more confusing is the fact the error never appears again it only occurs 
>> on first access.
>> 
>> 
>> Thanks in advance
>> 
>> 
>> Jens
>> 
>> 


Re: T5.3: per page context session storage?

2013-11-07 Thread mailingl...@j-b-s.de
I think it strongly depends...
Overuse of session when parameters will do is as wrong as trying to avoid 
session at all by making the rest complicated and unmaintainable. 

If you need security / permission there is no decision you can make. For 
writing stateful wizard like dialogs it depends on complexity of your dialog(s).

Concerning the initial question, maybe a dispatcher will do? You know the 
request and you can access the sessionstate. If session objects follow a page 
like naming scheme you can wipe objects you no longer need because the user 
went to a different page (hierarchy) for example.  

Jens



Von meinem iPhone gesendet

> Am 07.11.2013 um 12:44 schrieb "John" :
> 
> Hi,
> 
> I worked on a monster of an e-commerce package called Blue Martini. Their 
> consultants also liked to build the system where all the data was put in 
> hidden page fields and not use the session. This burdens the network with 
> sending data that is not required on the client and you cannot use get method 
> because of practical limitations on request lengths. But then again you 
> preserve server memory and retain some more server scalability. I can't 
> recall how things were with using back buttons, of course when stat eis in 
> the page you effectively get back to the previous state which is good, but I 
> think there may of been other issues? I think memory is more scalable 
> reliable and secure vs network resourcing, there is big memory. It seems to 
> be about finding the right balance and I think technical developments and 
> limitations favour server memory.
> 
> Having said that ,I tend to just keep the bare minimum in session such as the 
> users ID and permissions. I am using Tapestry FLASH property persistence 
> where possible, this seems to be a good compromise.
> 
> I'm interested to hear more about approaches on this topic.
> 
> 
>  - Original Message - 
>  From: Lance Java 
>  To: Tapestry users 
>  Sent: Wednesday, November 06, 2013 8:37 PM
>  Subject: Re: T5.3: per page context session storage?
> 
> 
>  Any time someone wants to use the session, I always ask why. I avoid
>  session usage wherever possible. If there's no real need for it, I suggest
>  you keep your app stateless and use the page activation context / event
>  context to pass parameters.

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



Re: Fun with Enums - suggestion wanted for edit subset of enum types (netmask)

2013-10-31 Thread mailingl...@j-b-s.de
Well, the values shown solely depends on your model. Just filter / sort it 
accordingly? By default Tapestry adds all enum values to options (see 
EnumSelectModel). Unfortunately you can not derive from EnumSelectModel, so I 
would try to start from AbstractSelectModel copy and paste a few lines from 
EnumSelectModel and provide a filter predicate which filters results in 
"getOptions" according to your requirements (retrieve all, filter and return 
the filtered list) 

Jens

Von meinem iPhone gesendet

> Am 31.10.2013 um 11:51 schrieb Chris Mylonas :
> 
> Hi Tapestry Users!
> 
> I am positive we've all had fun with enums (and netmasks) at some point!!!
> I got through the afternoon accomplishing my page rendering *[1]
> 
> 
> I now have my entity class with an enum saved.
> It is a netmask for an ip address.
> So if an IP address belongs in a /24 subnet, I'd like to be able to assign
> it to a /32 subnet.
> 
> I would like the t:select component to only display this option (or perhaps
> a /31 & /32), but not the whole range of available netmasks in my app (/24
> /25 /26./32)
> 
> 
> How would I go about doing this (displaying certain enum values from the
> type)?
> 
> Cheers for any awesome suggestions, ditto for reading!
> Chris
> 
> 
> 
> [1]
> The t:select component reads the message catalog, however rendering in a
> table (not a grid) seemed to ignore it.  I progressed with it by calling a
> helper method from the template with something like
> ${convertEnum(passedEnum)}
> 
> page class has this method
> 
> public String convertEnum(EnumType n){
>switch(n){
>   case EnumType.ONE: return "Hooray One";
>   case EnumType.TWO: return "Hooray Two";
>   default: return "Not Set";
>}
> }

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



Re: grid if eventlink

2013-10-28 Thread mailingl...@j-b-s.de
Hi Andreas!

If you make use of @Property annotation tapestry creates get and set methods 
for you. if you mix it with self-written methods you have to set "read" and 
"write" annotation params to "false" accordingly to avoid creation. Just have a 
look at the @Property documentation.

Jens

Von meinem iPhone gesendet

> Am 28.10.2013 um 12:27 schrieb Andreas Ernst :
> 
> Hi Nathan,
> 
> Am 28.10.13 11:07, schrieb Nathan Quirynen:
>> Hi,
>> 
>> the If component doesn't have a parameter "context". What you need to do
>> is the following:
>> 
>> 1) set parameter "row" in your grid component (which you probably
>> already did with property "bestellung"):
>> 
>> 
>> 
>> @Property
>> private Bestellung bestellung;
> 
> This did not work: Unable to create new accessor method public 
> java.lang.Boolean getGebucht() on class de.aeits.extranet.pages.Bestellungen 
> as the method is already implemented.
> 
> So, just do it by hand:
> 
>  public Boolean getGebucht() {
>return tachyonbestellung.getStatus().equals(100);
>  }
>  public void setGebucht (Boolean bool) {
>  }
> 
>> 
>> 2) create a property in your page class:
>> 
>> public boolean isGebucht() {
>> return bestellung.getBestNr().equals(100);
>> }
>> 
>> 3) Use the if component like this:
>> 
>> 
>> 
>> > t:context="tachyonbestellung.bestnr">buchen
>> 
>> 
>> 
>> 
>> I hope this is what you were asking for.
> 
> Yes, i did.
> 
> Thanks.
> Andreas
> -- 
> ae | Andreas Ernst | IT Spektrum
> Postfach 5, 65612 Beselich
> Schupbacher Str. 32, 65614 Beselich, Germany
> Tel: +49-6484-91002 Fax: +49-6484-91003
> a...@ae-online.de | www.ae-online.de
> www.tachyon-online.de
> 
> -
> 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: onActivate not called / Ajax / Shiro

2013-10-27 Thread mailingl...@j-b-s.de
Hi Lenny

Thanks for your answer. I guess my description was somehow incomplete...

OnActivate from the "unauthorized" page is not called, that's surprising to me. 

The user has permission to view the page in general but misses certain 
functionality permissions triggered  by event callback methods. My initial 
failure was to show such event links at all, but that's a different story... 

Nevertheless its still possible to enter such a link URL directly in the 
browser, but luckily in this case everything works as expected (redirect to 
"unauthorized" page and onActivate from the unauthorized page gets called)

As the only difference is "zone/ajax" related, I guess shiro does not handle 
XHR requests correctly when rendering/redirecting, but this just an assumption. 
I have to dig deeper in the shiro source

Jens

Von meinem iPhone gesendet

> Am 27.10.2013 um 14:44 schrieb Lenny Primak :
> 
> I don't think Tapestry-Security works for Ajax requests.
> I think it's geared more of blocking access to pages for initial load.  
> How can you have AJAX requests for a page that's not authorized?
> Also, in Tapestry 5.4, this should be handled properly by way T5.4 handles 
> JavaScript.
> 
> onActivate isn't getting called because Tapestry-Security / Shiro intercepts 
> it (and denies it's permission)
> before onActivate ever gets called.
> 
>> On Oct 27, 2013, at 8:55 AM, Jens Breitenstein wrote:
>> 
>> Hi all!
>> 
>> I have a strange problem and maybe one of you can give me a hint...
>> 
>> Basically I have a table and each individual  forms it's own zone and 
>> can be replaced independently from each other by an eventlink (works 
>> perfectly).
>> Next I added @RequiresPermissions("MyPermission:modify") on the 
>> event-callback method to limit access. In case an user does not have the 
>> required permissions Shiro correctly identfies it and throws an 
>> OperationException("Subject does not have permission"), perfect too. 
>> Unfortunately there is no redirect to the "Unauthorized" page but instead 
>> the page is rendered in the "ajax dialog box" (which tapestry shows in case 
>> of problems/errors).
>> 
>> From the stacktrace I see 
>> "SecurityExceptionHandlerAssistant.handleRequestException" is called to 
>> retrieve the page name to show ("Unauthorized"). Unfortunately there is no 
>> redirect to the page but instead "renderer.renderPageResponse(page)" is 
>> called and surprisingly "onActivate" of my "Unauthorized" page is not called 
>> at all.
>> 
>> Any idea what happens and how to solve it?
>> 
>> 
>> Jens
>> 
>> 
>> 
>> -
>> 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
> 

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



Re: Embedding a file on a page using StreamResponse from another component.

2013-10-24 Thread mailingl...@j-b-s.de
Hi Steve!

Why not simply use the session? If the user has to authenticate anyway?

In case you want avoid a session you can create onetime tokens. Unfortunately 
checking token validity or detecting outdated tokens requires persistence 
somehow...

Jens

Von meinem iPhone gesendet

> Am 24.10.2013 um 17:44 schrieb Steve :
> 
> On a side note, both of my options (using the User object and using a
> persisted field) will result in only being able to show one
> StreamResponse at a time (otherwise they would both show the same). I
> could extend this by having some kind of data structure (hashmap?) in
> the User object and passing a token which is valid only to that user
> as a parameter, but I think i'm so far off the mark.. there must be an
> easier way.
> 
>> On 24 October 2013 16:32, Steve  wrote:
>> Hi,
>> 
>> I think I am doing something very, very wrong. What I have currently
>> works - but I get a feeling that it's not the best way of doing it.
>> I'm hoping for a little bit of advice again (sorry to ask so many
>> questions recently, and sorry this is a long one).
>> 
>> This is the issue:
>> I have some dynamic files with file paths which depend on the user.
>> Previously, all of those files existed on the context which was bad
>> news because it meant if a user knew the URL, they could download any
>> file. Without going into S3 servers for now (I can't unfortunately as
>> I have a monstrously huge pile of ethics forms to fill out if I want
>> to do that), I want to be able to embed these files on the page for a
>> user to see once they have logged in.
>> 
>> My solution has been to create a page named "FileStreamResponse" which
>> returns a StreamResponse from the onActivate method. I then can do the
>> following from another page class to get a link to that file.
>> 
>> @Inject ComponentResources resources;
>> public Link getStaticFileLink() {
>>return resources.createPageLink("util/FileStreamResponse", true);
>> }
>> 
>> In the TML, I can use that link to embed it. This works for one file,
>> which I have tested as "C:/file.xml" for now, but of course if anyone
>> visits the link for /util/FileStreamResponse they get the same file.
>> However, what I should be able to do is pass a parameter containing
>> information about which file to show to the FileStreamResponse page.
>> 
>> For my first attempt is to pass a parameter, I tried this:
>> return resources.createPageLink("util/FileStreamResponse", true, 
>> "C:/file.xml");
>> 
>> This creates a link like this:
>> http://localhost:8080/xyz/util/filestreamresponse/C:$002ffile.xml
>> 
>> If I pick that up in the onActivate for the page it works.
>> 
>> However, this isn't good because the the param is passed in the URL
>> which again means anyone can view that link, unless I put a lot of
>> permissions logic in that filestreamresponse class which already
>> exists elsewhere then i'm a little stuck.
>> 
>> So I know of one more solution to passing this parameter but it seems
>> like a bit too much of a "hack" for even me.
>> I create a setup method in the filestreamresponse page which takes in
>> a filename and sets it. It persists the property. Then I just use the
>> link to that page and it should show the correct file. Like this:
>> 
>> @InjectPage
>> private FileStreamResponse fsr;
>> @Inject ComponentResources resources;
>> 
>> public Link getStaticFileLink() {
>>fsr.setup("C:/file.xml");
>>return resources.createPageLink("util/FileStreamResponse", true);
>> }
>> 
>> I believe that now the user cannot change that parameter so it should
>> be safe. However, this doesn't seem right to me. It seems very.. very
>> bad and i'm sure someone will tell me exactly that. Another option is
>> to have the file which is requested stored in the User object which I
>> have in the sessionstate but again I don't think that is a good way to
>> do it.
>> 
>> If I put the logic for testing permissions in to the page class, I
>> still need to pass something to that page class to tell it which file
>> to show, and i'd rather that not show in the URL.
>> 
>> I'm sure others have had a similar problem and there is a standard way
>> to do this which I am missing, I would really appreciate any guidance.
>> Perhaps what I am doing is perfectly OK, but I suspect not as it leads
>> to issues such as, even if the user logs out, if the value is
>> persisted then they would see that file if re-visiting the link.
>> (Unless it is indeed stored in the User object).
>> 
>> 
>> Thanks,
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

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



Re: [T5.4] BeanEditor and Friends don't look as good as in Tap 5.3

2013-10-16 Thread mailingl...@j-b-s.de
Hi, 

just my two cents: In general coupling bean editor (and friends) tightly to 
bootstrap is strange even I am aware its the de facto standard. Furthermore I 
can not believe it will ever produce a layout which makes all of us happy. Is 
it not possible to add a additional, optional parameter to support "row 
building" or "field grouping" (eg List of List of field names forming 
rows/groups) and retrieve/provide css for each field and row/group by 
callbacks? Means: by default Tapestry does not care about rows/groups and may 
solely set col-xyz-whatever on each field's class to provide a default 
responsive layout. Nevertheless by a callback solution its now possible to 
easily override "that default css" for a group/row or even individual field. 
Due to the fact everything is optional it won't break old code, too.
I can not see how a mixin is able to easily modify css across elements without 
any structural hint (rows/groups), but correct me if I am wrong.


Jens



Von meinem iPhone gesendet

> Am 15.10.2013 um 12:46 schrieb Barry Books :
> 
> If you are building sites that work on mobile the default is correct. If
> you are starting from scratch it's OK also but converting an existing site
> can be a problem. I do have one non mobile site I'm converting so I looked
> at my old 2.3 mixin and the at the example
> 
> http://getbootstrap.com/css/#forms-horizontal
> 
> I'm not really sure how to support this because each property can have
> different col settings. My first thought is the mixin needs a map of
> propertyName/columnWidth. It might be possible to do this with the message
> catalogue also.
> 
> 
> On Mon, Oct 14, 2013 at 9:43 PM, Lenny Primak wrote:
> 
>> I know of its existence but didn't really use it.  I can do it with a
>> visitor, but
>> all of these approaches are clunky.  It should be implemented in Tapestry
>> itself.
>> 
>> I really don't understand why Bootstrap people didn't make horizontal form
>> the default.
>> I guess because it's harder to get right :)
>> 
 On Oct 14, 2013, at 10:28 PM, Thiago H de Paula Figueiredo wrote:
 
 On Mon, 14 Oct 2013 22:29:57 -0300, Lenny Primak 
>>> wrote:
>>> 
 I have tried to implement this using a mixin, but it gets too
>> complicated for my taste.
 
 The problem is that the each label and component has to be surrounded
>> with  (for example)
 which requires really digging around elements with MarkupWriter (error
>> prone)
>>> 
>>> Have you checked Tapestry-XPath? It helps so much in finding elements
>> which I think it could be part of Tapestry-core itself.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
>> -
>> 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: Select onChange with a context value

2013-06-26 Thread mailingl...@j-b-s.de
Hi Ben!

AFAIR you can pass a context but this value remains constant and is independent 
from the selection made. So at the very end I used bind like you did. Same 
problem applies to Checkboxes, so I do not know if Tapestry generally misses 
something or we simply did not find it yet...

Why did you think there is a "dramatic" performance impact?

Jens

Sent from my iPhone

On 26.06.2013, at 19:14, Ben Titmarsh  wrote:

> Hi All,
> 
> I am generating ~100 select items in a loop and would like to listen for the 
> ajax onChange event for each of these.  I am getting the event successfully 
> using the following:
> 
> 
> ...
>  t:value="cubeCard.colourCombinationOverride" t:zone="gridZone">
> ...
> 
> 
> public Object onChangeFromColourProfileOverride() {
> ...
> return gridZone.getBody();
> }
> 
> The value is set as expected on the cubeCard.colourCombinationOverride 
> object, however in order to know which select was updated I need some sort of 
> context value.  
> 
> I have played around with the jquery/bind mixin and can get it to do what I 
> would like but it involves setting  bind.callback="function(event,ui,url) { 
> url.addContext(event.target.value); } on each of my select components.  This 
> significantly reduces client side performance.
> 
> So I'd like to know if anyone has figured out a way to pass a context value 
> in onChange Ajax requests from select components?  My ideal situation would 
> be to end up with something along these lines:
> 
>  t:value="cubeCard.colourCombinationOverride" t:context="myId" 
> t:zone="gridZone">
> 
> public Object onChangeFromColourProfileOverride(Integer myId) {
> ...
> }
> 
> Thanks,
> Ben.
> 

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



Re: Sessions getting mixed up

2013-06-17 Thread mailingl...@j-b-s.de
Maybe I do net get it, but why can't you make use of a service having "Request 
Scope"? So Tapestry creates a new Instance per Request and you attach / inject 
yor session here?

Jens

Sent from my iPhone

On 17.06.2013, at 15:50, Michael Gentry  wrote:

> Could Tapestry throw an exception if you use @SessionState in a service?
> 
> Thanks,
> 
> mrg
> 
> 
> 
> On Mon, Jun 17, 2013 at 9:25 AM, Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>> On Mon, Jun 17, 2013 at 8:36 AM, Nathan Quirynen <
>> nat...@pensionarchitects.be> wrote:
>> 
>>> Hi,
>>> 
>> 
>> Hello!
>> 
>> 
>>> 
>>> I think the problem is that I use the @SessionState in a injected
>> service.
>>> And the service being a singleton, explains the behaviour. I guess
>>> @SessionState can only be used in pages and components? Have to test this
>>> though.
>>> 
>> 
>> @SessionState is ignored in services. It's meant to be used only in pages,
>> components and mixins i.e. classes that are transformed by Tapestry. As you
>> already said, if you want to deal with the session in a service, use
>> ApplicationStateManager instead.
>> 
>> Thiago
>> 

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



Re: best way of incorporating static pages?

2013-06-16 Thread mailingl...@j-b-s.de
Hi Magnus!

I tend to believe a CMS is way to slow to combine it with Tapestry.  
Furthermore if you serve pages by a CMS link you will notice a difference in 
Look and Feel and linking back to the T5 app may be difficult. CMS is perfect 
to allow a user (non dev) to edit pages like "about us", "we hire" aso without 
the need of a deployment (tml change) for example. And you get versioning and a 
wysiwyg editor for free. I would integrate parts of the CMS pages by streaming 
fragments, which keeps the webapp conscise and allows caching. Just my 2 
cents...

Jens

Sent from my iPhone

On 15.06.2013, at 20:42, BÃ¥rd Magnus Kvalheim  wrote:

> Maybe it's just me and I didn't see the problem, but can't you just link to
> the cms content?
> The cms content has a link so why should tapestry service it?
> 
> Is it on the same base domain? Then use request services to generate an
> absolute url.
> 
> -magnus
> 
> HTC one
> Den 12. juni 2013 13:07 skrev "John"  følgende:
> 
>> Hi,
>> 
>> I have a need to link to some static HTML generated by a CMS app. Assuming
>> this content is in a directory outside my Tapestry app, what would be the
>> best way of linking/serving it via Tapestry?
>> 
>> Perhaps I should just configure a seperate Jetty context and provide
>> absolute URLs in someway?
>> 
>> I'd also consider the static content being part of the projects Java
>> resources, not so keen though.
>> 
>> John

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



Re: best way of incorporating static pages?

2013-06-12 Thread mailingl...@j-b-s.de
Hi John

I use (basically) OutputRaw for something similar. You can either try to use a 
regex to strip all unwanted elements from the CMS html or mark a div or 
introduce a new element (easier to exactly find the content and drop the rest). 
Unfortunately most work is related to "links": you have to make CMS links 
compatible to the Tapestry way.

So write a component which accepts the url/name/id of your CMS content as 
parameter and when rendering load the page, strip unwanted content and uses 
OutputRaw to stream the CMS data in your page. Furthermore I propose you cache 
the stripped content (use guava cache for example) to avoid accesing a slow CMS 
on each request.

Jens


Sent from my iPhone

On 12.06.2013, at 12:08, "John"  wrote:

> Hi,
> 
> I have a need to link to some static HTML generated by a CMS app. Assuming 
> this content is in a directory outside my Tapestry app, what would be the 
> best way of linking/serving it via Tapestry?
> 
> Perhaps I should just configure a seperate Jetty context and provide absolute 
> URLs in someway?
> 
> I'd also consider the static content being part of the projects Java 
> resources, not so keen though.
> 
> John

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



Re: Embedding content from separate modules (a.k.a plugins)

2013-06-10 Thread mailingl...@j-b-s.de
And I forgot:
Try to make the enum static and/or set a serialuid in your page class, maybe 
this helps too...

Sent from my iPhone

On 11.06.2013, at 08:23, "mailingl...@j-b-s.de"  wrote:

> Hi Ilya
> 
> I make a shot into the dark: you are using persist therefore an instance of 
> your enum is stored in the session. When you recompile a new class is loaded 
> and the two enums belong to different classes/classloaders now, thus you get 
> a CCE. If you move it out of your page it should work.
> 
> Jens
> 
> Sent from my iPhone
> 
> On 11.06.2013, at 07:14, Ilya Obshadko  wrote:
> 
>> I actually encounter the same problem:
>> 
>> x.y.z.Login$EnumType cannot be cast to x.y.z.Login$EnumType
>> 
>> EnumType is a simple enum embedded in a page class:
>> 
>>   @Property @Persist
>>   private EnumType something;
>>   enum EnumType { ONE, TWO };
>> 
>> What is this? Happens every time container reloads modified page/component
>> classes. I have to stop and start container again. Very disturbing
>> actually. I don't want to put such simple types outside of page classes
>> because it pollutes source tree for no reason. Could you elaborate? Thanks
>> in advance!
>> 
>> 
>> 
>> On Sat, Jun 8, 2013 at 5:58 AM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>> 
>>> On Fri, 07 Jun 2013 12:50:46 -0300, Zsombor  wrote:
>>> 
>>> Hi,
>>>> 
>>> 
>>> Hi!
>>> 
>>> 
>>> 1, MyPluginTab tab = (MyPluginTab) page.getRootComponent();
>>>>tab.init(...);
>>>> This creates a nice exception: *java.lang.ClassCastException:
>>>> x.y.z.MyPluginTab cannot be cast to x.y.z.MyPluginTab *
>>>> Clearly a class loader issue
>>>> 
>>> 
>>> Yep. Did you put the MyPluginTab interface in a controlled package (base,
>>> components, pages or mixins)? If yes, put it somewhere else.
>>> 
>>> 
>>> This seem to be work ... For the first request. On the subsequent AJAX
>>>> requests, the parent component rendering is not called,
>>>> 
>>> 
>>> This is expected. @BeginRender, @SetupRender are only invoked when the
>>> page is rendered, not when just a piece of it is.
>>> 
>>> Have you tried pushing stuff into the Environment in the AJAX even handler
>>> method you're using in addition to setupRender()?
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> 
>>> --**--**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@tapestry.**apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>> 
>> 
>> -- 
>> Ilya Obshadko
> 
> -
> 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: Embedding content from separate modules (a.k.a plugins)

2013-06-10 Thread mailingl...@j-b-s.de
Hi Ilya

I make a shot into the dark: you are using persist therefore an instance of 
your enum is stored in the session. When you recompile a new class is loaded 
and the two enums belong to different classes/classloaders now, thus you get a 
CCE. If you move it out of your page it should work.

Jens

Sent from my iPhone

On 11.06.2013, at 07:14, Ilya Obshadko  wrote:

> I actually encounter the same problem:
> 
> x.y.z.Login$EnumType cannot be cast to x.y.z.Login$EnumType
> 
> EnumType is a simple enum embedded in a page class:
> 
>@Property @Persist
>private EnumType something;
>enum EnumType { ONE, TWO };
> 
> What is this? Happens every time container reloads modified page/component
> classes. I have to stop and start container again. Very disturbing
> actually. I don't want to put such simple types outside of page classes
> because it pollutes source tree for no reason. Could you elaborate? Thanks
> in advance!
> 
> 
> 
> On Sat, Jun 8, 2013 at 5:58 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>> On Fri, 07 Jun 2013 12:50:46 -0300, Zsombor  wrote:
>> 
>> Hi,
>>> 
>> 
>> Hi!
>> 
>> 
>>  1, MyPluginTab tab = (MyPluginTab) page.getRootComponent();
>>> tab.init(...);
>>>  This creates a nice exception: *java.lang.ClassCastException:
>>> x.y.z.MyPluginTab cannot be cast to x.y.z.MyPluginTab *
>>>  Clearly a class loader issue
>>> 
>> 
>> Yep. Did you put the MyPluginTab interface in a controlled package (base,
>> components, pages or mixins)? If yes, put it somewhere else.
>> 
>> 
>> This seem to be work ... For the first request. On the subsequent AJAX
>>> requests, the parent component rendering is not called,
>>> 
>> 
>> This is expected. @BeginRender, @SetupRender are only invoked when the
>> page is rendered, not when just a piece of it is.
>> 
>> Have you tried pushing stuff into the Environment in the AJAX even handler
>> method you're using in addition to setupRender()?
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> 
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@tapestry.**apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Ilya Obshadko

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



Re: PageURL Rewriting, pulling name instead of id

2013-06-10 Thread mailingl...@j-b-s.de
Be carefull with article names...make sure a name is unique in all supported 
languages similar to the PK-ID you are using right now. From experience a name 
is usually not sufficient to guarantee this, thus attributes like color or size 
are required as well in your final name or as part of your ActivationContext. 
But this depends on your product catalogue of course and is not a Tapestry 
topic any longer :-)

I believe URL rewriting is the only solution to even remove the pagename.


Jens

Sent from my iPhone

On 10.06.2013, at 23:38, "Thiago H de Paula Figueiredo"  
wrote:

> Just use the name of the article as the page activation context instead. No 
> URL rewriting needed.
> 
> On Mon, 10 Jun 2013 17:59:42 -0300, Nomen Nomanum  
> wrote:
> 
>> Hi. I have an issue with the following: Lets say I click on my article, and 
>> it directs me to that specific page
>> 
>> localhost:8080/FullArticle/3
>> where 3 denotes id of article, however I don't want, what I want is to be 
>> something like
>> 
>> localhost:8080/FullArticle/NameOfArticle
>> 
>> or even better
>> 
>> 
>> localhost:8080/nameOfArticle
>> 
>> Any tips how to achieve this?
>>   
> 
> 
> -- 
> Thiago H. de Paula Figueiredo
> 
> -
> 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 add a link to a file stored in directory?

2013-06-04 Thread mailingl...@j-b-s.de
Hi Petr!

You are really refering to a file in your src directory? When you use maven to 
build it the file is copied to target/ and you access it simply by "return.txt" 
using the classloader because target/resources is stripped when building the 
jar/war.

Set a break point and check if you really got an inputstream. You can also try 
to get the URL first which is null in case nothing found.

Jens

Sent from my iPhone

On 05.06.2013, at 00:01, Petr Janata  wrote:

> Hi,
> 
> thanks for links with ideas. I am new in Tapestry I use Example
> App
> from
> Jumpstart tutorial . I added File
> Upload
> to
> Example App and HSQL table for uploaded file names. In Example App is
> used Protecting
> Pages
> and
> I can not download uploaded file by simple href even if I am logged in as a
> admin user.
> 
> How to allow to download file from upload-path?
> 
> I use simple link in  tml file
> 
> download
> 
> and I also added  onReturnStreamResponse into java file from jumpstart
> tutorial from this link.
> 
> StreamResponse onReturnStreamResponse() {
>return new StreamResponse() {
>InputStream inputStream;
> 
>@Override
>public void prepareResponse(Response response) {
>ClassLoader classLoader =
> Thread.currentThread().getContextClassLoader();
>inputStream =
> classLoader.getResourceAsStream("regoznapp/enterprise/src/main/resources/return.txt");
> 
>// Set content length to prevent chunking - see
>//
> http://tapestry-users.832.n2.nabble.com/Disable-Transfer-Encoding-chunked-from-StreamResponse-td5269662.html#a5269662
> 
>try {
>response.setHeader("Content-Length", "" +
> inputStream.available());
>}
>catch (IOException e) {
>// Ignore the exception in this simple example.
>}
>}
> 
>@Override
>public String getContentType() {
>return "text/plain";
>}
> 
>@Override
>public InputStream getStream() throws IOException {
>return inputStream;
>}
>};
> }
> 
> Petr

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



Re: How to add a link to a file stored in directory?

2013-05-30 Thread mailingl...@j-b-s.de
Hi Petr!

Have a look at:
http://tawus.wordpress.com/2011/07/30/tapestry-jfreechart-integration/

Here you can see how to stream any kind of data.


StreamResponse was discussed here before:
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-1-Return-a-file-as-response-of-a-ActionLink-event-td2437679.html


And you can find more here:
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/StreamResponse.html

or on JumpStart which is a great source to start from anyway

http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/returntypes1



Jens

Sent from my iPhone

On 30.05.2013, at 16:06, Petr Janata  wrote:

> Hi I have table with file names. I need to add link for files stored in 
> directory to download them.
> 
> Any idea?
> 
> Petr
> 
> -
> 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 use HibernateEntityValueEncoder

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken!

Just a shot in the dark:
Are you sure the PKs of your hibernate  beans are not null (maybe you have a  
newly created bean instance which is not persited yet)? Afair the 
HibernateValueEncoder requires properly filled PK fields otherwise 
pk.toString() fails. Unfortunately the stacktrace is difficult to read...

Jens

Sent from my iPhone

On 13.05.2013, at 21:00, Ken in Nashua  wrote:

> thanks guys... but I keep gettign an NPE
> 
>@Persist
>@Property
>HibernateEntityValueEncoder yearValueEncoder;
> 
>@Inject
>private ValueEncoderSource valueEncoderSource;
> 
>@Inject
>private SelectModelFactory selectModelFactory;
> 
>private ArrayList years;
> 
>@SetupRender
>void setupRender() {
>years = new 
> ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class));
>yearSelectModel = selectModelFactory.create(years, "year");
> }
> 
> my selectModelFactory fails
> 
> Any ideas ?
> 
> An unexpected application exception has 
> occurred.org.apache.tapestry5.internal.services.RenderQueueExceptionRender 
> queue error in SetupRender[pphl/Query]: 
> org.apache.tapestry5.ioc.internal.util.TapestryExceptionactiveComponentspphl/Query
>  (class 
> org.tynamo.examples.pphl.pages.Query)org.apache.tapestry5.ioc.internal.util.TapestryExceptionjava.lang.NullPointerExceptionFilter
>  stack frames
> Stack trace
> 
> org.apache.tapestry5.internal.services.SelectModelFactoryImpl.create(SelectModelFactoryImpl.java:55)
> 
> org.tynamo.examples.pphl.pages.Query.setupRender(Query.java:200)
> 
> org.tynamo.examples.pphl.pages.Query.advised$setupRender_844d26137ccc(Query.java)
> 
> org.tynamo.examples.pphl.pages.Query$Invocation_setupRender_844d26137ccb.proceedToAdvisedMethod(Unknown
>  Source)
> 
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
> 
> org.got5.tapestry5.jquery.services.ImportJQueryUIWorker$2.advise(ImportJQueryUIWorker.java:94)
> 
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
> 
> org.tynamo.examples.pphl.pages.Query.setupRender(Query.java)
> 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
> 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
> 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
> 
> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
> 
> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
> 
> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
> 
> 
> 

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



Re: hover pop show image widget

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken!

I use bootstrap / tapestry-jquery for this. See:
http://tapestry5-jquery.com/mixins/docstooltip

Sent from my iPhone

On 13.05.2013, at 04:29, nhhockeyplayer nashua  
wrote:

> Hi Folks,
> 
> Is there a hover show widget? Something like what netflix does when you hover 
> over a movie, it produces a dialogue with image and details ?
> 
> I would like to add something like this to my grid items when a user hovers 
> over an id or a photo.
> 
> Best regards 
> and thanks... KEN 

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



Re: How to stay on same page

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken!

Can you paste your onPassivate method? Maybe you always return Team.class as 
context parameter instead of beanType member? I expect  you want to see the 
selection in the URL like: query/team right?
Than you need an proper on activate, too. So if you use your enum ReportType in 
onPassivate you can use it in onActivate(ReportType rt) later and load the list 
here?

Jens


Jens

Sent from my iPhone

On 13.05.2013, at 05:42, nhhockeyplayer nashua  
wrote:

> Hi Folks,
> 
> I created a page called Query.
> 
> 
> 
> http://powerplayhockey.noip.us:9011/pphl/query
> 
> 
> It offers two things to the user... a select component and a grid.
> 
> My select has two options... TEAM or PLAYER.
> 
> So I toggle my beanType to Team.class or Player.class and render a grid based 
> on the collection I pull out of the database.
> 
> I am having an issue though. On the submit form method, it currently returns 
> nothing.
> 
>@OnEvent(value = "go")
>void submit() {
>logger.debug("In submit : ");
> 
>switch (reportType) {
>case TEAM:
>beanType = Team.class;
>break;
>case PLAYER:
>beanType = Team.class;
>break;
>default:
>}
>collection = loadCollection(beanType);
>}
> 
> 
> Maybe I can return THIS... Currently it seems to be taking me to 
> http://powerplayhockey.noip.us:9011/team
> 
> Thanks for any tips.
> 
> Best regards 
> and thanks... KEN 

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



Re: [T5 5.3.6] Dead Lock while initializing tapestry

2013-04-20 Thread mailingl...@j-b-s.de
Sorry I do not understand your response. From the stacktrace T5 is building 
your service. In the constructor of the service currently created you are 
spawning a new thread which again needs services from the T5 app in the run 
method, right?

Can't you defer thread creation to a method in your module class annotated by 
@Startup
?

Jens

Sent from my iPhone

On 18.04.2013, at 19:02, Arunas F  wrote:

> No, not at all. New Thread is spawned at some moment while initializing T5 
> app. And there is nothing special about a code:
> 
> 
> new Thread(new Runnable() {
> 
>@Override
>public void run() {
>if (logger.isDebugEnabled()) logger.debug(etlName + " 
> initializing... ");
> 
>try {
> 
>for (EtlAbstractJob job : jobs.getJobs()) {
>job.initialize();
>}
> 
>} catch (EtlJobException e) {
>logger.error(e.toString());
>e.printStackTrace();
>}
> 
>if (logger.isDebugEnabled()) logger.debug(etlName + " finished 
> initialization... ");
>}
> 
>}).start();
> 
> 
> And in the code  at line "job.initialize();" the var job are T5 IOC services 
> and these services depend on MongoDB service at some deeper level.
> 
> public class ReportStorageImpl implements ReportStorage {
> 
> .
> 
>private MongoDB mongoDB;
> 
>public ReportStorageImpl(MongoDB mongoDB) {
>this.mongoDB = mongoDB;
>}
> 
> ..
> 
>@Override
>public MongoDB getMongoDB() {
>return mongoDB;
>}
> }
> 
> About MongoDB also nothing special. The module is taken from 
> https://github.com/mlusetti/tapestry-mongodb-core (look at earlier revisions).
> 
> 
> BR,
> Arunas
> 
> 
> On 18/04/2013 18:53, mailingl...@j-b-s.de wrote:
>> Are you spawning a new thread in your MongoDBImpl.java:30 which makes use of 
>> T5 services, too? From the Stacktrace you are (well T5 IOC is) building the 
>> mongodb service right now. What happens in the ctor of your class? Can you 
>> paste some code??
>> 
>> Jens
>> 
>> Sent from my iPhone
>> 
>> On 18.04.2013, at 17:31, Arunas F  wrote:
>> 
>>> Hi,
>>> 
>>> We are using T5 version 5.3.6. I found that Tapestry runs into a dead lock 
>>> while building registry (initializing) if I start a new Thread what uses 
>>> some T5 services.
>>> Right now we have disabled multi threading while initializing app. But I 
>>> would like to know, is it a T5 bug and I should file it into JIRA or this 
>>> is an expected behavior and it is a T5 limitation.
>>> 
>>> 
>>> Problem description: If the T5 registry and new Thread tries to create same 
>>> service (from proxy) simultaneously sometimes you can run into deadlock and 
>>> T5 app wont initialize. In the stacktrace dump below, you can find that  
>>> both threads tried to create MongoDB instance and ran into a deadlock.
>>> 
>>> 
>>> Found one Java-level deadlock:
>>> =
>>> "Thread-10":
>>>  waiting for ownable synchronizer 0x0007c27e65f0, (a 
>>> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync),
>>>  which is held by "Thread-4"
>>> "Thread-4":
>>>  waiting to lock monitor 0x7fdf5b91c658 (object 0x0007eda35c20, a 
>>> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator),
>>>  which is held by "Thread-10"
>>> 
>>> Java stack information for the threads listed above:
>>> ===
>>> "Thread-10":
>>>at sun.misc.Unsafe.park(Native Method)
>>>- parking to wait for  <0x0007c27e65f0> (a 
>>> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
>>>at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
>>>at 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
>>>at 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:964)
>>>at 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
>>>at 
>>> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:73

Re: [T5 5.3.6] Dead Lock while initializing tapestry

2013-04-18 Thread mailingl...@j-b-s.de

Are you spawning a new thread in your MongoDBImpl.java:30 which makes use of T5 
services, too? From the Stacktrace you are (well T5 IOC is) building the 
mongodb service right now. What happens in the ctor of your class? Can you 
paste some code??

Jens

Sent from my iPhone

On 18.04.2013, at 17:31, Arunas F  wrote:

> Hi,
> 
> We are using T5 version 5.3.6. I found that Tapestry runs into a dead lock 
> while building registry (initializing) if I start a new Thread what uses some 
> T5 services.
> Right now we have disabled multi threading while initializing app. But I 
> would like to know, is it a T5 bug and I should file it into JIRA or this is 
> an expected behavior and it is a T5 limitation.
> 
> 
> Problem description: If the T5 registry and new Thread tries to create same 
> service (from proxy) simultaneously sometimes you can run into deadlock and 
> T5 app wont initialize. In the stacktrace dump below, you can find that  both 
> threads tried to create MongoDB instance and ran into a deadlock.
> 
> 
> Found one Java-level deadlock:
> =
> "Thread-10":
>  waiting for ownable synchronizer 0x0007c27e65f0, (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync),
>  which is held by "Thread-4"
> "Thread-4":
>  waiting to lock monitor 0x7fdf5b91c658 (object 0x0007eda35c20, a 
> org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator),
>  which is held by "Thread-10"
> 
> Java stack information for the threads listed above:
> ===
> "Thread-10":
>at sun.misc.Unsafe.park(Native Method)
>- parking to wait for  <0x0007c27e65f0> (a 
> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
>at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
>at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
>at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:964)
>at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
>at 
> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:731)
>at 
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
>at 
> org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:213)
>at 
> org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:109)
>at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:421)
>at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:868)
>at 
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:57)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:257)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:50)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils$4.invoke(InternalUtils.java:289)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils$4.invoke(InternalUtils.java:286)
>at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>at 
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:293)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils$23.invoke(InternalUtils.java:1488)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils$23.invoke(InternalUtils.java:1483)
>at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>at 
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils.createConstructorConstructionPlan(InternalUtils.java:1480)
>at 
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.getPlan(ConstructorServiceCreator.java:52)
>at 
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:61)
>at 
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
>at 
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>at 
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>at 
> org.apache.tapestry5.ioc.interna

Re: Nested Form Support

2013-01-17 Thread mailingl...@j-b-s.de
To me it sounds like you need dividing all your form parts into components and 
on a per page basis you have only one form containing 1..n of your components. 
I do not see the point why all your components have to be forms. The form is 
just enclosing/surrounding your components. That's at least the way we deal 
with "complex" forms.

Jens

Sent from my iPhone

On 17.01.2013, at 17:22, sthomps  wrote:

> I don't have an existing public site I can point to - all my examples are
> internal.
> 
> In essence it's fairly simple - componentize a form that can act on it's own
> on a page or be nested within a parent form on page.
> 
> Again not a huge deal but something that Wicket developers would need to be
> aware of.
> 
> Wicket Nested Forms   
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719362.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: Component that displays additional "containing Page" markup

2012-12-13 Thread mailingl...@j-b-s.de
We use GridDataSource for paging large sets too. 

getAvailableRows is the total number of entries

prepare tells you the slice to be rendered depending on grids "rows per page" 
setting. Simply  load the whole slice in prepare

and return the single row entity by getRowValue  

Jens



Sent from my iPhone

On 13.12.2012, at 19:12, bogdan_cm  wrote:

> I will have a closer look at the Grid component. Thanks very much for the
> reply. 
> 
> Bogdan. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622p5718688.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: Component that displays additional "containing Page" markup

2012-12-12 Thread mailingl...@j-b-s.de
Hi Bogdan!

Any reason why you can not use tapestry's grid component?

Jens 

Sent from my iPhone

On 12.12.2012, at 15:43, bogdan_cm  wrote:

> Thank you both for replying. 
> 
> Now that I read it after a day, my question is not very clear. Here is a
> more to the point explanation. 
> 
> My custom component will take care of pagination. This means I need my
> component to wrap around a Loop in the main page. The Loop will be iterating
> over a List of results. 
> 
> The code I am hoping for is: 
> 
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>  -->
> tapestry Page 
> 
>  component params) >
>   
>   html that displays list entries 
>   
> 
> 
> 
> 
> 
> 
> I will explore the  suggestion. 
> 
> Thanks very much,
> Bogdan. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622p5718645.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: Component that displays additional "containing Page" markup

2012-12-12 Thread mailingl...@j-b-s.de
Hi!

From an Object oriented aspect you are coupling components to particular pages, 
when I understand you correctly. This is for my personal opinion a wrong 
design. Can't you not just pass the additional info as parameter from your page 
to your component (as Taha suggested it)?
Or are you displaying commen/shared info? Maybe tapestry's "layout" might be a 
solution for you?

Jens

Sent from my iPhone

On 12.12.2012, at 06:00, Taha Siddiqi  wrote:

> Hi Bogdan
> 
> No sure if I understand you question correctly. From what I understand you 
> can use block parameters or 
> 
> regards
> Taha
> 
> On Dec 12, 2012, at 10:22 AM, bogdan_cm wrote:
> 
>> Hello everyone, 
>>  How can I allow "Page" information to be part of the component markup
>> output? Take for example the zone component: 
>>--> component 
>> this is the time on day ${timeOfDay}  -> this value comes from the Page
>> containing the component
>> 
>> 
>> When I write my own component, how can I pass additional "data" to be
>> included in the rendering of this component?
>> 
>> I would like to write:
>> 
>> maybe a loop here that would read a list in the Page containing the
>> component, and display it. 
>> 
>> 
>> 
>> Thank you, 
>> Bogdan. 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Component-that-displays-additional-containing-Page-markup-tp5718622.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: Bean Editor class cast issue method access issue

2012-12-10 Thread mailingl...@j-b-s.de
Hi Ken,

I really wonder what happens to your coach instance. Are you sure its a coach? 
As I see java.lang.Object as class name I doubt it is still your coach or ever 
was. Even if you assign a coach to an object variable it remains coach. Can you 
check/debug what happens to your instance?

Jens

Sent from my iPhone

On 10.12.2012, at 07:56, Ken in Nashua  wrote:

> 
> Hi Folks,
> 
> I have a taxonomy...
> 
> PERSON
>   /\
>|
>|
> COACH
> 
> person has a method firstName
> 
> But in my tml file I am using the following code...
> 
>
> 
>
>
>The Description
>
>
>
> 
> bean happens to be the COACH... but it seems to be interpretted as Object
> 
> and I keep getting this error
> 
> java.lang.RuntimeExceptionException
> assembling root component of page Edit: Could not convert 
> 'bean.firstName' into a component parameter binding: Exception 
> generating conduit for expression 'bean.firstName': Class 
> java.lang.Object does not contain a property (or public field) named 
> 'firstName'.
> Is there a way around this ?
> 
> 
> 
> kcola...@live.com
> 
> 
> 

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



Re: Referencing files from a jar

2012-11-28 Thread mailingl...@j-b-s.de
Hi!

When looking at: 
http://tapestry.apache.org/assets.html
Section "Assets in Templates"
its "asset:" instead of "classpath:"

So give this a try (untested)?

Jens


Sent from my iPhone

On 28.11.2012, at 18:05, mwrohde  wrote:

> Ok, thanks for the replies so far.
> 
> In the tml I've got:
> <${classpath:/com/navicure/ui/components/images/exit2.png}> 
> 
> When I attempt to render the page in the browser I get:
> Could not convert 'classpath:/com/navicure/ui/components/images/exit2.png'
> into a component parameter binding: Error parsing property expression
> 'classpath:/com/navicure/ui/components/images/exit2.png': Unable to parse
> input at character position 11.
> 
> What have I got wrong?
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Referencing-files-from-a-jar-tp5718355p5718359.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 onActivate () will be called automatically

2012-10-23 Thread mailingl...@j-b-s.de
Try 

@Inject YourService service;

In the class and call whatever method you need from 

onActivate() {
   service.whatEver();
}

?

Or do you want a service instance passed due to some magic url parameter? like 
corsion from number to a db pojo for example?

Jens


Sent from my iPhone

On 23.10.2012, at 07:37, yaswanthbs  wrote:

> Hi All,
> I have gone through a lot of portals, on how onActivate() will be called
> automatically and how it takes the arguments. I found one i.e.,
> *It allows the page to restore its internal state from data encoded into the
> URL*
> But I am not clear about this. 
> 
> I have one scenario
> If I have two pages i.e., I am going from One.java to Two.java and when I am
> in Two.java, I need to call onActivate() and it should access the argument
> like one service class or some class.
> Basically like this.
> onActivate(MyOwnService service) {
> // Here I need to access my service object
> }
> 
> Regards,
> Sai.
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-onActivate-will-be-called-automatically-tp5717158.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: cannot output table tags in outputraw compnnent

2012-09-29 Thread mailingl...@j-b-s.de
I do not understand what you are trying to achieve
> 
in a template is identically to  right? There is no need to wrap html 
elements inside outputraw within a template. Use output raw to stream html from 
your page class, for example assume you have a preformated product description 
Incl bold, underline, whatever as a string object than:

In java page
public String getProductDescription() {
   return "headertext text text...";
}

In your tml:


Jens

Von meinem iPad gesendet

Am 29.09.2012 um 07:00 schrieb Ken in Nashua :

> 
> Folks,
> 
> If the output and outputraw components cannot contain a left angel bracket <
> 
> or other angle brackets
> 
> ex. 
> 
> Then I am left with doing this...
> 
>  
> 
> But if yeilds the following exception
> 
> java.lang.RuntimeExceptionError parsing property expression '': 
> Unable to parse input at character position 1.
> Does anyone know how to output table tags in my template ?
> 
> Thanks
> 
> kcola...@live.com
> 
> 
> 

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



Re: My little problem with Tap listing

2012-09-17 Thread mailingl...@j-b-s.de
I gues you want to use the foreign key pointing from comment to blog, but you 
are using the "id" (autoinc pk of comment?) instead.

session.createCriteria(Comment.class).add(Restrictions.eq("id",blog)).list();
  return l;

Jens

Sent from my iPhone

On 18.09.2012, at 03:02, Taha Siddiqi  wrote:

> 
> Should Restrictions.eq("id",blog) be Restrictions.eq("blog",blog)
> 
> Also I would use blog as activation context in the second page. @Persist 
> should be avoided if possible.
> 
> 
> On Sep 15, 2012, at 9:57 PM, JeffersON wrote:
> 
>> Restrictions.eq("id",blog)
> 


Re: Sevice State / Stateless

2012-09-14 Thread mailingl...@j-b-s.de
I'll guess the question is how to use services at all...
As IOC services are usually singletons changing state via setters will affect 
all threads which deal with this service thus data may creep from one session 
to another and will introduce concurrency problems immediately. In case a 
service is thread or request based I'll consider it to be more like a cache 
class which is accessible as long the thread is running / the request is 
processed and mentains state in this period of time. To me usage of a per 
thread scope class is more elegant as using threadlocal attributes because its 
simply more obvious in which context it is used. If this is not an answer to 
the initial question just ignore me

Jens


Von meinem iPad gesendet

Am 14.09.2012 um 22:42 schrieb "Thiago H de Paula Figueiredo" 
:

> On Fri, 14 Sep 2012 16:59:44 -0300, George Christman 
>  wrote:
> 
>> My bad, I meant modifier. I was setting the modifier with a set method then 
>> accessing the data within the modifer from other methods.
> 
> I still don't know what you're talking about. Are you saying modifier as 
> meaning the same as setter? As you may have noticed, I don't like helping 
> unless I know what's being talked about. :)
> 
> -- 
> Thiago H. de Paula Figueiredo
> 
> -
> 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: Downloading content from tapestry.apache.org

2012-09-11 Thread mailingl...@j-b-s.de
wget ?

http://www.gnu.org/software/wget/

Sent from my iPhone

On 12.09.2012, at 01:32, Jay Ginete  wrote:

> On 9/12/2012 7:07 AM, ZiciuM wrote:
>> How to download all tutorials, references, docs from apache.tapestry.org so
>> that I can work in offline mode?
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Downloading-content-from-tapestry-apache-org-tp5716215.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
>> 
> I think you can "download" the site using httrack (http://www.httrack.com/). 
> Httrack is a free software offline browser.
> 
> -
> 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: Submitting a form from another page

2012-09-03 Thread mailingl...@j-b-s.de
What about placecing the login form in your layout page/class and surround it 
by a  in your layout tml and implement a "boolean 
isUserLoggedIn()" method in your layout class?

See T5 doc: 

Api docs/corelib/components/if 

User Guide/Layout Component


Jens



Sent from my iPhone

On 03.09.2012, at 11:11, fabs  wrote:

> Hello all.
> 
> My website has a login page, with a username and password field. However, I
> wish to show an inline login form on all pages when the user is not logged
> in, and submit the login request from any page to the main login page (to
> allow errors to be displayed in case login is unsuccessful). I am having
> trouble finding how to fit this use case into tapestry5.
> 
> Thank you for any advice. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Submitting-a-form-from-another-page-tp5715999.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: Iterating a map in template

2012-08-02 Thread mailingl...@j-b-s.de
I expect count to be of type MapEntry or in case getCounts() returns 
cnts.values() instead it has to be of type string?

Jens

Sent from my iPhone

On 03.08.2012, at 02:40, "Angelo C."  wrote:

> Hi,
> 
> I'm trying to iterate a map in template with following code, but, it turns
> out that the entire map is only one row, I'm sure I have made something
> wrong, can anybody point it out? Thanks,
> 
> template:
> 
>  
>${count}
>
> code:
> 
> @Property
> private Map count;
> 
> @Cached
> public Map getCounts() {
>  return cnts;
> }
> 
> private static TreeMap cnts = new TreeMap String>();
> static {
>  cnts.put(1, "ITEM1");
>  cnts.put(2, "ITEM2");
> }
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Iterating-a-map-in-template-tp5715010.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: Creating a linked list of pages for easy backward navigation?

2012-08-01 Thread mailingl...@j-b-s.de
Hi Ludwig

Am I right you are always using the same page for your refinement selection? Or 
is it more like a wizzard containing multiple pages?

For the first I wonder if this is really a T5 problem.. Can't you just use a 
stack like object and push/pop the values you need to create/recreate the 
activation context for your page (to store the selection a user made on each 
"continue")?

Jens

Sent from my iPhone

On 02.08.2012, at 01:46, George Ludwig  wrote:

> I'm building a page that iteratively refines a data set. After selecting
> filter criteria, they can either click Continue or Back.
> 
> The Continue part is no problem, it's working. But I want them to be able
> to click Back and return to the page with the state it had when they
> clicked Continue. Essentially, I want a backwards-facing linked list of
> pages.
> 
> My current implementation doesn't work, as it appears that each
> previousPage is the same object. What's the best way to do this?
> 
> Current implementation:
> 
> Before the next iteration of the page is loaded, I set it up:
> 
> @Persist
> 
> private Object previousPage;
> void setup(Object previousPage) {
>   this.previousPage=previousPage;
> }
> 
> Then when the user clicks back:
> 
>  Object onBack() {
> 
>   return previousPage;
> 
> }

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



Re: #again #strange No service implements the interface tap.execounting.dal.mediators.TeacherMedImpl

2012-07-31 Thread mailingl...@j-b-s.de
Can you provide the tapestry page, class and interface sources?

Jens

Sent from my iPhone

On 31.07.2012, at 15:21, bigcache1  wrote:

> http://pastebin.com/s8g87ZtC Startup log 
> 
> Addition: Other injects are fine.
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/again-strange-No-service-implements-the-interface-tap-execounting-dal-mediators-TeacherMedImpl-tp5714888p5714918.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