Re: Hide menu items

2008-03-10 Thread Davor Hrg
such construct is not yet possible, OGNL is not used, checkout http://wiki.apache.org/tapestry/Tapestry5HowTos for code snippets there you have: http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix that way you can create a binding prefix checkAuth: and use it: try it out you'l

Re: T5: TransformationException

2008-03-10 Thread Howard Lewis Ship
http://www.catb.org/~esr/faqs/smart-questions.html On Mon, Mar 10, 2008 at 7:54 PM, osamuo <[EMAIL PROTECTED]> wrote: > > Hi, > > I got the following error when I defined '@ApplicationState'. > What's wrong? I can't find anything wrong. > > > ---

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Hide menu items

2008-03-10 Thread petros
I have a menu with the following items MyDetails UsersList I want the MyDetails item to be shown all the time and the UsersList to show only when the user has the roles admin and manager. I am assuming I have a method called checkAuthorisation(String[]). I know the syntax below is incorrect but I

Re: T5: Chinese in form submission(5.0.11)

2008-03-10 Thread yuan gogo
Maybe you can try this http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding 2008/3/11, Angelo Chen <[EMAIL PROTECTED]>: > > > Hi Yuan, > > I'm not using Spring, will this work too? > > > > yuan gogo wrote: > > > > I use spring. > > And config it in web.xml > > > > > > SetCharacterEnc

Re: T5: Chinese in form submission(5.0.11)

2008-03-10 Thread Yoshikazu Kuramochi
The same problem occurs by using japanese characters. org.apache.tapestry.upload.internal.services.MultipartServletRequestFilt er is executed before the Utf8Filter written in the wiki page. So request.getCharacterEncoding() returns null in org.apache.tapestry.upload.internal.services.MultipartD

Re: JumpStart 3.3.1 now available - fixes 3.3.0 bugs

2008-03-10 Thread Julian Wood
It's not really the code organization per se, but the build process. The main difference is that with quickstart, you can build, deploy and run with one command from source - 'mvn jetty:run' You can also build a war (or ear) - 'mvn package', which you can then deploy into any container (ie

T5: TransformationException

2008-03-10 Thread osamuo
Hi, I got the following error when I defined '@ApplicationState'. What's wrong? I can't find anything wrong. - # java.lang.RuntimeException java.lang.ClassNotFoundException: caught an exception while obtaining a class file for test.pages.Index

Re: T4 "cancel" momentarily shows val errrors

2008-03-10 Thread Heath Nielson
I create a simple page with a form i.e.: TestPage.html: Value: TestPage.java: public abstract class TestPage extends BasePage { private static Log log = LogFactory.getLog(TestPage.class); @Bean(ValidationDelegate.class) public abstract IValidationDelegate getVal

Re: tapestry-acegi example app question (solved)

2008-03-10 Thread Julian Wood
Hate to answer my own question, but I think the proper relation for: @OneToMany @Cascade(CascadeType.ALL) public Collection getGrantedAuthorities() { return grantedAuthorities; } is: @ManyToMany( cascade={CascadeType.PERSIST, CascadeType.MERGE} ) You then need to persist your GrantedA

Re: T5: Chinese in form submission(5.0.11)

2008-03-10 Thread Angelo Chen
Hi Yuan, I'm not using Spring, will this work too? yuan gogo wrote: > > I use spring. > And config it in web.xml > > > SetCharacterEncoding > > org.springframework.web.filter.CharacterEncodingFilter > > > encoding > utf-8 > >

Re: T5: Chinese in form submission(5.0.11)

2008-03-10 Thread yuan gogo
I use spring. And config it in web.xml SetCharacterEncoding org.springframework.web.filter.CharacterEncodingFilter encoding utf-8 SetCharacterEncoding /* This makes the text fields with file-upload work

Re: t5: refreshing page inside a javascript

2008-03-10 Thread Angelo Chen
Hi Josh, would like to try this out, but how to pass parameters ? here is my code, updateProc is action link jQuery(".drop").droppable({ accept: ".block", activeClass: 'droppable-active', hoverClass: 'droppable-hover', drop: function(ev, ui) {

Re: t5: refreshing page inside a javascript

2008-03-10 Thread Josh Canfield
Hi Angelo, If you aren't using a form, then it sounds like you have an actionlink that you invoke from the drop handler using AJAX? Why not just point window.location at the actionlink url instead and only do the request to the server once? Josh On Mon, Mar 10, 2008 at 4:33 PM, Angelo Chen <[EMA

Re: t5: refreshing page inside a javascript

2008-03-10 Thread Angelo Chen
Hi Chris, It's part of drag and drop operation, when item was dropped, jQuery triggers a call, inside the call I updated the display order of items in the page, then refresh the page to reflect the changes made, there is no form. Chris Lewis-6 wrote: > > Forgive me if I'm missing something ob

tapestry-acegi example app question

2008-03-10 Thread Julian Wood
In the provided example for tapestry-acegi, I have a question about the GrantedAuthorityBean table. That is, if I add more users which share roles, each role will create a new row in the GAB table. How can this be avoided? I've tried making the authority unique: @Table(uniqueConstraints =

Re: [T5] Add a tag to pom.xml makes tapestry crash

2008-03-10 Thread Joachim Van der Auwera
Standard maven behaviour, when you change the resources, then you have to add the maven default path manually or it will not be included. Kind regards, Joachim Marcelo Lotif wrote: Hi all, I was trying to add some files to META-INF folder putting this code into my pom.xml:

Re: AW: T5: persistency over several pages

2008-03-10 Thread Angelo Chen
Hi Martin, Can you give some details about conversation? A.C. Martin Kersten-2 wrote: > > > If not, stick to conversation (use an Id). Such a general > conversation service with saving the conversation to db in > a distributed system is almost every time the right thing > to go to implement

Re: [T5] Add a tag to pom.xml makes tapestry crash

2008-03-10 Thread Christian Edward Gruber
Not sure about that, but the META-INF stuff shouldn't be in src/main/ java, but rather in src/main/resources, at which point it will automatically be put into the .jar. Not sure why what you're doing is messing things up, but it's certainly against recommended practice for the maven plugins

Re: Checking for a logged in user globally

2008-03-10 Thread Filip S. Adamsen
Hi, The logical page name is available in the parameters passed to your filter. You can then use the ComponentSource to get at the actual class using the logical page name and extract whatever info you'd like - I use this service along with annotations on my page classes: public class PageAc

Re: [T5] Add a tag to pom.xml makes tapestry crash

2008-03-10 Thread Filip S. Adamsen
That would be a Maven bug, if anything. -Filip Marcelo Lotif skrev: Hi all, I was trying to add some files to META-INF folder putting this code into my pom.xml: META-INF src/main/java/META-INF ... To deploy it to tomcat, I'm generating a .war file usin

[T5] Add a tag to pom.xml makes tapestry crash

2008-03-10 Thread Marcelo Lotif
Hi all, I was trying to add some files to META-INF folder putting this code into my pom.xml: META-INF src/main/java/META-INF ... To deploy it to tomcat, I'm generating a .war file using the "mvn package" command. Ok, this will add the files into the META-I

Re: Checking for a logged in user globally

2008-03-10 Thread Andreas Pardeike
Hi, I have implemented my access control as below (I also tried contributeRequestHandler) but my main problem is that I have a couple of public pages. I can't see how I could get the current page from within public boolean dispatch(Request request, Response response) or public boolean servic

Re: [T5] best practice to add hibernate interceptor

2008-03-10 Thread Sven Homburg
thanx, that was the kick i needed 2008/3/10, Chris Lewis <[EMAIL PROTECTED]>: > > Indeed, but you asked how to add an interceptor to a > tapestry-initialized session, and the answer to that is there :-). > If I understand your other question, you want to access user-specific > (and therefore proba

Re: [T5] best practice to add hibernate interceptor

2008-03-10 Thread Chris Lewis
Indeed, but you asked how to add an interceptor to a tapestry-initialized session, and the answer to that is there :-). If I understand your other question, you want to access user-specific (and therefore probably request-specific) details from the interceptor. There are to overall ways to do this:

Re: T5: Error in Tutorial; Page Start did not generate any markup when rendered.

2008-03-10 Thread Sabine K.
Thanks for your help! I used .htm instead .tml :/ Angelo Chen wrote: > > the template should have .tml as extension and it should be in the root > directory, that's the change from 5.0.6. > > > Sabine K. wrote: >> >> Hi, >> >> i tried to test the new version of tapestry. Used the comman

Re: [T5] best practice to add hibernate interceptor

2008-03-10 Thread Sven Homburg
hi chris, nice sample, but if i want to add the user name/ip number to a field like "createdBy" there is no known simple way to fill that field. 2008/3/10, Chris Lewis <[EMAIL PROTECTED]>: > > Hi Sven, > > I did this in a wiki: > http://wiki.apache.org/tapestry/Tapestry5BrainlessEntityTimestampin

Re: T5: Error in Tutorial; Page Start did not generate any markup when rendered.

2008-03-10 Thread Angelo Chen
the template should have .tml as extension and it should be in the root directory, that's the change from 5.0.6. Sabine K. wrote: > > Hi, > > i tried to test the new version of tapestry. Used the command: mvn > archetype:create > -DarchetypeGroupId=org.apache.tapestry > > -- View this

Re: T5: Error in Tutorial; Page Start did not generate any markup when rendered.

2008-03-10 Thread Angelo Chen
the template should have .tml as extension and it should be in the root directory, that's the change from 5.0.6. Sabine K. wrote: > > Hi, > > i tried to test the new version of tapestry. Used the command: mvn > archetype:create > -DarchetypeGroupId=org.apache.tapestry > > -- View this

FormTable.jwc

2008-03-10 Thread Jim
I have to use Tapestry 3 at work, otherwise I'd upgrade and be done with this problem, however, here it is: The following code works fine with tapestry-contrib-3.0.1.jar: But when we upgraded to tapestry-contrib-3.0.4.jar the following error is thrown: Attribute "parameter-name" is

T5: Error in Tutorial; Page Start did not generate any markup when rendered.

2008-03-10 Thread Sabine K.
Hi, i tried to test the new version of tapestry. Used the command: mvn archetype:create -DarchetypeGroupId=org.apache.tapestry -DarchetypeArtifactId=quickstart -DgroupId=org.apache.tapestry -DartifactId=tutorial1 -DpackageName=org.apache.tapestry.tutorial and used mvn jetty:run to star

Re: [T5] best practice to add hibernate interceptor

2008-03-10 Thread Chris Lewis
Hi Sven, I did this in a wiki: http://wiki.apache.org/tapestry/Tapestry5BrainlessEntityTimestamping. The second half of it shows how to do this. chris Sven Homburg wrote: > hi there, > > has anybody an idea, how to add an interceptor > to a "tapestry initialized" hibernate session ? > > --

[T5] best practice to add hibernate interceptor

2008-03-10 Thread Sven Homburg
hi there, has anybody an idea, how to add an interceptor to a "tapestry initialized" hibernate session ? -- with regards Sven Homburg http://tapestry5-components.googlecode.com

Re: [FAQ] common design

2008-03-10 Thread Christian Koeberl
Robert Zeigler wrote: > "the code works": Nope, it doesn't. Now, it's getting interesting! This is what I get, when I try your code: If t:container replaces $content$, this shouldn't render This is the only thing that should render if t:container replaces $content$. Very strange, isn't i

AW: T5: persistency over several pages

2008-03-10 Thread Martin Kersten
If the user is restricted to see the same data once use ASO or @Persist. It is no harm if you have a user fiddling with such a form and seeing the same data twice. In filling out a lengthly multipage questionary about registration I would think of harmful behaviour using the same formular twice

T5: persistency over several pages

2008-03-10 Thread Angelo Chen
Hi, I have this registration module which consists several pages, user has to answer several questions for every page, and he can go to next/prev until the last page, then 'finish' button is clicked, how to persist those data across the several pages? any idea to implement something like this? Th

Re: t5: refreshing page inside a javascript

2008-03-10 Thread Chris Lewis
Forgive me if I'm missing something obvious here, but what's the point in doing an ajax operation if you're going to refresh the entire page when it returns? Why not just use a classic form? Angelo Chen wrote: > window.location.reload(true) works, but reloading seems slow, is there any > way to si

Re: T4 "cancel" momentarily shows val errrors

2008-03-10 Thread Geoff Callender
Occurs in Safari 3 and Firefox 2 on OS X 10.5. Haven't tried Windows. http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "> http://www.w3.org/1999/xhtml " xml:lang="en" lang="en" stylesheet="ognl:stylesheet"> delegate="bean:validationDelegate" cancel="listener:doCancel">