Re: submit listener not getting invoked??
actually i had even tried with the class , but it still doesn't want to call the listener method when i change the class using javascript ,(will do r&d when i get time) but anyway thanks a ton for your help , i appreciate cheers aninder Jesse Kuhnert <[EMAIL PROTECTED]> wrote: Sounds good :) Just as an fyi though, it's pretty easy to define images using css classes instead of id based definitions..Ie .myClassName { background-image:url(something.gif) } Then you just use different classes for different buttons. On 6/2/06, Aninder Makkar wrote: > > id="aaa" has a faded look image for the submit button and id="bbb" has a > normal image for the submit button . > > even i suspect the same thing as you said , i checked out with my > front ender and he thinks there is no way of referring 2 images from the > same style sheet (so that the id remains the same) > > i guess i need a quick crash course in css > > but then i gotto finish this thing today > > so basically wot im trying to do is a disabled button(with a faded > look image) which gets enabled using javascript( which also has to change > the image) and when clicked calls the listener method on the java class. > > and when i was about to do a send on this mail @ImageButton appeared > on my mind horizon , and i think this is exactly what Mr Howard orders > in this situation, > anyway thanks for your help :) > > Aninder > > Jesse Kuhnert wrote: I think tapestry expects the id > to be synchronized with the id of a valid > listener that it knows about...Changing the submit button id on the fly > like > that will likely get undesired results unless you also change some of the > hidden form input fields to reflect your change. > > Why do you need to manually set the id of the button or change it at all? > > On 6/1/06, Aninder Makkar wrote: > > > > Hi Guys, > > Im using a submit button in the form , > > > > [input] > > disabled="ognl:disable" id="ognl:submitId" /> > > > > initially when the page renders ,disable=true and id = "aaa" > > this form displays a tree structure data and as the user gets to > > the leaf node i call a javascript function which sets disabled=false > > and id="bbb" > > > > however when i submit the form the listener method is not getting > > invoked??? > > > > why ? > > > > any help will be appreciated > > Aninder > > > > > > > > > > - > > Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get > > Yahoo! Messenger with Voice > > > > > > -- > Jesse Kuhnert > Tacos/Tapestry, team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. - How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
Re: submit listener not getting invoked??
Sounds good :) Just as an fyi though, it's pretty easy to define images using css classes instead of id based definitions..Ie .myClassName { background-image:url(something.gif) } Then you just use different classes for different buttons. On 6/2/06, Aninder Makkar <[EMAIL PROTECTED]> wrote: id="aaa" has a faded look image for the submit button and id="bbb" has a normal image for the submit button . even i suspect the same thing as you said , i checked out with my front ender and he thinks there is no way of referring 2 images from the same style sheet (so that the id remains the same) i guess i need a quick crash course in css but then i gotto finish this thing today so basically wot im trying to do is a disabled button(with a faded look image) which gets enabled using javascript( which also has to change the image) and when clicked calls the listener method on the java class. and when i was about to do a send on this mail @ImageButton appeared on my mind horizon , and i think this is exactly what Mr Howard orders in this situation, anyway thanks for your help :) Aninder Jesse Kuhnert <[EMAIL PROTECTED]> wrote: I think tapestry expects the id to be synchronized with the id of a valid listener that it knows about...Changing the submit button id on the fly like that will likely get undesired results unless you also change some of the hidden form input fields to reflect your change. Why do you need to manually set the id of the button or change it at all? On 6/1/06, Aninder Makkar wrote: > > Hi Guys, > Im using a submit button in the form , > >[input] > disabled="ognl:disable" id="ognl:submitId" /> > > initially when the page renders ,disable=true and id = "aaa" > this form displays a tree structure data and as the user gets to > the leaf node i call a javascript function which sets disabled=false > and id="bbb" > > however when i submit the form the listener method is not getting > invoked??? > > why ? > > any help will be appreciated > Aninder > > > > > - > Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get > Yahoo! Messenger with Voice > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: submit listener not getting invoked??
id="aaa" has a faded look image for the submit button and id="bbb" has a normal image for the submit button . even i suspect the same thing as you said , i checked out with my front ender and he thinks there is no way of referring 2 images from the same style sheet (so that the id remains the same) i guess i need a quick crash course in css but then i gotto finish this thing today so basically wot im trying to do is a disabled button(with a faded look image) which gets enabled using javascript( which also has to change the image) and when clicked calls the listener method on the java class. and when i was about to do a send on this mail @ImageButton appeared on my mind horizon , and i think this is exactly what Mr Howard orders in this situation, anyway thanks for your help :) Aninder Jesse Kuhnert <[EMAIL PROTECTED]> wrote: I think tapestry expects the id to be synchronized with the id of a valid listener that it knows about...Changing the submit button id on the fly like that will likely get undesired results unless you also change some of the hidden form input fields to reflect your change. Why do you need to manually set the id of the button or change it at all? On 6/1/06, Aninder Makkar wrote: > > Hi Guys, > Im using a submit button in the form , > >[input] > disabled="ognl:disable" id="ognl:submitId" /> > > initially when the page renders ,disable=true and id = "aaa" > this form displays a tree structure data and as the user gets to > the leaf node i call a javascript function which sets disabled=false > and id="bbb" > > however when i submit the form the listener method is not getting > invoked??? > > why ? > > any help will be appreciated > Aninder > > > > > - > Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get > Yahoo! Messenger with Voice > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Unable to read OGNL expression ''
Perhaps a message sort of like "source is null" for expression blah blah? On 6/1/06, Bryan Lewis <[EMAIL PROTECTED]> wrote: Hard to say without seeing the java code and page spec. It looks like the page class should have a property "model" that's returned by a getModel() method. (That's the object you're calling the bean?) I'm guessing you should have something like: public abstract class MyPage ... { public abstract MyBean getModel(); } and public class MyBean ... { public String getWord() { // this getter shouldn't be abstract return word; } } Is there more to the error message? You could put some log messages in the various getter methods to see if they're being called, or whether there's some other problem after they're called like a NPE. Rui Pacheco wrote: > Hi all > > I have a couple of webpages on my web application where this error > occurrs > and I cant find out whats causing. Apparently these pages are no > different > from the other pages that work correctly. > > When I call my page, it complains of the getter method of one of my form > elements. I checked the class I use as a model and both the variable > and the > getter and setter are there. I checked the HTML tag and it seems to be > ok. > The bean that corresponds the template also has a getter and setter > for that > field, both public and abstract. > > This is the offending line. Could you give me a hand, please? > > validators="validators:required,maxLength=150" cols="50" rows="15" > class="itemsarea"> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Running the Tapestry Tutorial
No idea what the tutorial stuff is showing, but I do know if you check out either tacos (http://tacos.sourceforge.net ) or the current tapestry4 trunk version (trunk from either project) you will find eclipse shared run configurations for the tacos demo or the upcoming (unreleased / documented) tapestry4.1 tutorial application. On 6/2/06, Murray Collingwood <[EMAIL PROTECTED]> wrote: Hi folks Sorry, this is a real newby question - how do you run the Tapestry Tutorial in Eclipse? I have installed Eclipse 3.1 (C:\Eclipse) and downloaded the Tapestry Tutorial zip. I extracted the Tutorial files into a folder - C:\TapestryTutorial I found a file called "INFO.txt" and tried to follow the instructions here but they didn't help me find anything to work with. The contents of the Tapestry Tutorial zip look nothing like the directory layouts described on the Tapestry Quickstart page. http://jakarta.apache.org/tapestry/QuickStart/index.html#Pre-requisistes I must be missing something basic - somebody please help. Cheers mc -- Murray Collingwood Focus Computing p +61 415 24 26 24 http://www.focus-computing.com.au -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: submit listener not getting invoked??
I think tapestry expects the id to be synchronized with the id of a valid listener that it knows about...Changing the submit button id on the fly like that will likely get undesired results unless you also change some of the hidden form input fields to reflect your change. Why do you need to manually set the id of the button or change it at all? On 6/1/06, Aninder Makkar <[EMAIL PROTECTED]> wrote: Hi Guys, Im using a submit button in the form , initially when the page renders ,disable=true and id = "aaa" this form displays a tree structure data and as the user gets to the leaf node i call a javascript function which sets disabled=false and id="bbb" however when i submit the form the listener method is not getting invoked??? why ? any help will be appreciated Aninder - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Running the Tapestry Tutorial
Hi folks Sorry, this is a real newby question - how do you run the Tapestry Tutorial in Eclipse? I have installed Eclipse 3.1 (C:\Eclipse) and downloaded the Tapestry Tutorial zip. I extracted the Tutorial files into a folder - C:\TapestryTutorial I found a file called "INFO.txt" and tried to follow the instructions here but they didn't help me find anything to work with. The contents of the Tapestry Tutorial zip look nothing like the directory layouts described on the Tapestry Quickstart page. http://jakarta.apache.org/tapestry/QuickStart/index.html#Pre-requisistes I must be missing something basic - somebody please help. Cheers mc -- Murray Collingwood Focus Computing p +61 415 24 26 24 http://www.focus-computing.com.au
rendering one of Table column as a link ? (help me...)
i want to make one of my columns (which is the value get from dtbase as primary key) as a link when i click it i get the value could anyone help me ? i have try TapestryTable.war but it didn't work
Re: XMLHTTPRequest within tapestry
ok, i am going to try that and see how i go.i dont fancy my chances though, as i am trying to get something simple to work and all these examples are way beyond simple. will see how we go though. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLHTTPRequest within tapestry
Have you checked out DWR (http://getahead.ltd.uk/dwr/)? It might be a good fit for what you're trying to do and it's framework agnostic, so it will work fine with Tapestry 3. It's also pretty darn easy to use. -Ryan Peter Dawn wrote: just tried to implement it now. the country list example runs fine. but am not sure how should i go about with something simple like a hello world or just displaying the contents of a dummy file. it might sound a very simple thing, i guess i am trying to get the basics. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
submit listener not getting invoked??
Hi Guys, Im using a submit button in the form , initially when the page renders ,disable=true and id = "aaa" this form displays a tree structure data and as the user gets to the leaf node i call a javascript function which sets disabled=false and id="bbb" however when i submit the form the listener method is not getting invoked??? why ? any help will be appreciated Aninder - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice
Re: Unable to read OGNL expression ''
Hard to say without seeing the java code and page spec. It looks like the page class should have a property "model" that's returned by a getModel() method. (That's the object you're calling the bean?) I'm guessing you should have something like: public abstract class MyPage ... { public abstract MyBean getModel(); } and public class MyBean ... { public String getWord() { // this getter shouldn't be abstract return word; } } Is there more to the error message? You could put some log messages in the various getter methods to see if they're being called, or whether there's some other problem after they're called like a NPE. Rui Pacheco wrote: > Hi all > > I have a couple of webpages on my web application where this error > occurrs > and I cant find out whats causing. Apparently these pages are no > different > from the other pages that work correctly. > > When I call my page, it complains of the getter method of one of my form > elements. I checked the class I use as a model and both the variable > and the > getter and setter are there. I checked the HTML tag and it seems to be > ok. > The bean that corresponds the template also has a getter and setter > for that > field, both public and abstract. > > This is the offending line. Could you give me a hand, please? > > validators="validators:required,maxLength=150" cols="50" rows="15" > class="itemsarea"> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Border question
Hi Carl, You should use some sort of JavaScript based menu generation solution. They are plenty of them, most of them allow you to configure menu generation based on some sort of configuration file, or you can even handle the JS been written on the fly by your web engine. Personally I use: FREESTYLE MENUS v1.0 RC (c) 2001-2005 Angus Turnbull, http://www.twinhelix.com It is generated via an HTML List, like this: Home Catálogos Regiones. Distritos. Fuerzas. Regards, --- Omar V.M. On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: Hi Mark, sounds as a solution even if I don't understand what you were trying to explain... Some sample code would help a lot, is there something you can show us/commit to one of the widely known Tapestry repositories? Cheers, Andreas On 01. Jun 2006 - 14:51:00, Mark Stang wrote: | There is another option to get around that restriction. It is what Howard calls my "mutant" application. I have one Frame.html/Frame.page/Frame.java. All of my other pages are popups. There are about 5 or 6 of those. In addition, I have 130 "components". None of my components have any border content, it is all in the "Frame". As part of the Frame I have Breadcrumbs and something we call Headcrumbs. Headcrumbs are a higher level menu. So, we can have a bunch of "breadcrumbs" within each headcrumb. Headcrumbs are a group of "breadcrumbs". Breadcrumbs are reusable across multiple Headcrumbs. Any one breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb. | | Basically, we have a wizard application with 130 screens. | | The border component replaces pages, we have one page that replaces components. There is an age-old Tapestry question about whether you create components or pages? What is your level of re-use? We chose re-use at the level of components. | | regards, | | Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLHTTPRequest within tapestry
I don't think normal javascript permissions allow you to access the file system on someone's web browser. (There are ways to get past this but it's not standard I think ) You might be better served by going to http://ajaxian.com/ or any number of ajax-related web sites to learn how it works first before trying to apply it to tapestry. On 6/1/06, Peter Dawn <[EMAIL PROTECTED]> wrote: just tried to implement it now. the country list example runs fine. but am not sure how should i go about with something simple like a hello world or just displaying the contents of a dummy file. it might sound a very simple thing, i guess i am trying to get the basics. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: XMLHTTPRequest within tapestry
just tried to implement it now. the country list example runs fine. but am not sure how should i go about with something simple like a hello world or just displaying the contents of a dummy file. it might sound a very simple thing, i guess i am trying to get the basics. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLHTTPRequest within tapestry
Hi Peter, take a look at XTile for Tapestry 3.x here: http://www.t-deli.com/ For simple stuff, it's quite easy to use and very lightweight. Hth, Danny Peter Dawn wrote: i am using tapestry 3.0.3 and i want to use something very light, without the advanced features. is there some coding example (hello world would also do) which just shows how to retreive info from the tapestry page and display it within the html page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
P.S. No one should have this issue with 4.1 as the visit and global objects don't exist anymore. (The hivemind versions of course do exist) On 6/1/06, Mário Lopes <[EMAIL PROTECTED]> wrote: Yes, renaming actually did work. Thank you very much for your kind help. -- Mário On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > On 01. Jun 2006 - 16:39:06, James Carman wrote: > | Try renaming what you call the getter/setter. See what that does. There is > | a deprecated getVisit() method on IPage. > > Yeah, I had the same problem once and renamed the getter to getVisitState() > which worked. > > Cheers, > Andreas > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Visit object
Yes, renaming actually did work. Thank you very much for your kind help. -- Mário On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: On 01. Jun 2006 - 16:39:06, James Carman wrote: | Try renaming what you call the getter/setter. See what that does. There is | a deprecated getVisit() method on IPage. Yeah, I had the same problem once and renamed the getter to getVisitState() which worked. Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLHTTPRequest within tapestry
i am using tapestry 3.0.3 and i want to use something very light, without the advanced features. is there some coding example (hello world would also do) which just shows how to retreive info from the tapestry page and display it within the html page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLHTTPRequest within tapestry
There are a number of js logging libraries available. The core library that tapestry uses (4.1 onward at least) is dojo via dojo.debug or dojo.log. . You might want to go look at http://tacos.sourceforge.net, they have plenty of examples as well as a completely functional demo app to show you how to do this. (it also handles your XMLHTTPRequest stuff as well but maybe you have something different in mind for that ;) ) On 6/1/06, Peter Dawn <[EMAIL PROTECTED]> wrote: hi all, i am trying to implement XMLHTTPRequest within my web app. now for starters i would like to display a log file (which is constantly updating), within my web app. how should i display its contents without refreshing the page manually (it should display information as the log gets filled in). this is my code for JavaScript within the html file so far, but i dont think its working, function createXMLHTTP() { var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", " MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; for (var i=0; i < arrSignatures.length; i++) { try { var oRequest = new ActiveXObject (arrSignatures[i]); return oRequest; } catch (oError) { } } throw new Error ("MSXML is not installed on your system"); } var oRequest = createXMLHTTP(); oRequest.open("get", "c:\log.txt", true); oRequest.send(null); alert("status is " + oRequest.status + "(" + oRequest.statusText + ")" ); alert("Response is" + oRequest.responseText); can somebody help me out. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
XMLHTTPRequest within tapestry
hi all, i am trying to implement XMLHTTPRequest within my web app. now for starters i would like to display a log file (which is constantly updating), within my web app. how should i display its contents without refreshing the page manually (it should display information as the log gets filled in). this is my code for JavaScript within the html file so far, but i dont think its working, function createXMLHTTP() { var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; for (var i=0; i < arrSignatures.length; i++) { try { var oRequest = new ActiveXObject (arrSignatures[i]); return oRequest; } catch (oError) { } } throw new Error ("MSXML is not installed on your system"); } var oRequest = createXMLHTTP(); oRequest.open("get", "c:\log.txt", true); oRequest.send(null); alert("status is " + oRequest.status + "(" + oRequest.statusText + ")" ); alert("Response is" + oRequest.responseText); can somebody help me out. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to read OGNL expression ''
Hi all I have a couple of webpages on my web application where this error occurrs and I cant find out whats causing. Apparently these pages are no different from the other pages that work correctly. When I call my page, it complains of the getter method of one of my form elements. I checked the class I use as a model and both the variable and the getter and setter are there. I checked the HTML tag and it seems to be ok. The bean that corresponds the template also has a getter and setter for that field, both public and abstract. This is the offending line. Could you give me a hand, please? -- Cumprimentos, Rui Pacheco
Re: Issues with Label Components with Tapestry 4.0
My issue isn't with label, it's with the inputs. I have the following in my custom ValidationDelegate: public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { if (isInError()) { String cssClass = ((component.getBinding("class") != null) ? component.getBinding("class").getObject().toString() : ""); writer.attribute("class", cssClass + " error"); } } However, rather than just writing a single "class" attribute, it writes two: class="text large error" class="text large" Obviously, this is not a big deal, but I would consider it a bug. As far as overriding FieldLabel, I figured out how to do that. I'll enter an enhancement request in JIRA to allow writing markup within the tag. Thanks, Matt Jessek wrote: > > Sure, but at that point you are basically overriding the behaviour > provided > by the ValidationDelegate when it does before/after field rendering (not > talking about FieldLabel). > > The FieldLabel component already supports informal parameters. > > I noticed in your first email you mentioned trying to do this with > something > like > > and only saw class1 > output. > > Try doing this instead (though I agree it sounds like a bug somehow): > > > > On 6/1/06, Matt Raible <[EMAIL PROTECTED]> wrote: >> >> Is there an easy way to subclass FieldLabel and override the >> renderComponent() method to move writeLabelPrefix and >> writeLabelSuffix to be inside ? >> >> Thanks, >> >> Matt >> >> On May 31, 2006, at 2:51 PM, Ryan Holmes wrote: >> >> > Your problem getting the span tag where you want it is due to how >> > the FieldLabel component renders itself. Here's the relevant part >> > of FieldLabel.renderComponent(): >> > >> >delegate.writeLabelPrefix(field, writer, cycle); >> >writer.begin("label"); >> >if (id != null) >> >writer.attribute("for", id); >> >delegate.writeLabelAttributes(writer, cycle, field); >> >renderInformalParameters(writer, cycle); >> >writer.print(displayName, getRaw()); >> >writer.end(); >> >delegate.writeLabelSuffix(field, writer, cycle); >> > >> > >> > You could argue that writeLabelPrefix() and writeLabelSuffix() >> > should both be inside the tag (makes sense to me), but the >> > current code is symmetrical and not necessarily "wrong." Your best >> > bet is probably to override the FieldLabel component with your own >> > version that renders the delegate prefix and/or suffix inside the >> > label tag. And I'm sure you won't hesitate to file a bug report if >> > you feel strongly about it ;) >> > >> > -Ryan >> > >> > >> > Matt Raible wrote: >> > >> >> Matt Raible wrote: >> >> >> >>> Andreas Andreou wrote: >> >>> >> try component.getBinding("class") >> if that's not null, do a getObject() on it >> >>> >> >>> >> >>> >> >>> Thanks. This works, but it also prints out duplicate "class" >> >>> attributes. >> >>> >> >>> class="text large error" class="text large" >> >>> >> >>> >> >>> It'd be nice to have something like: >> >>> >> >>> writer.appendAttribute("class", "values to append"); >> >>> >> >>> Another question - it seems my full and is >> >>> getting wrapped with >> >>> >> >>> >> >>> >> >>> Is there anyway to get rid of that? It's problematic b/c the >> >>> closing isn't getting rendered until right before . >> >> >> >> >> >> Fixed this by using: >> >> >> >>public void writeLabelPrefix(IFormComponent component, >> >> IMarkupWriter writer, >> >> IRequestCycle cycle) { >> >>// does nothing put prevent from getting >> >> written >> >>} >> >> >> >>> >> >>> Thanks, >> >>> >> >>> Matt >> >>> >> >> Matt Raible wrote: >> >> > Hmmm, I'm guessing the answers to my questions below are "no, >> > this isn't possible." ;-) >> > >> > Here's another question - is it possible in my custom Validator >> > to get the existing CSS classes on a component? For example, I >> > currently have: >> > >> >public void writeLabelAttributes(IMarkupWriter writer, >> > IRequestCycle cycle, IFormComponent component) { >> >if (isInError(component)) { >> >writer.attribute("class", "error"); >> >} >> >} >> > >> >public void writeAttributes(IMarkupWriter writer, >> > IRequestCycle cycle, >> >IFormComponent component, >> > IValidator validator) { >> >if (isInError()) { >> >writer.attribute("class", "error"); >> >} >> >} >> > >> > But I'd prefer to have something like this: >> > >> >public void writeLabelAttributes(IMarkupWriter writer, >> > IRequestCycle cycle, IFormComponent component) { >> >if (isInError(component)) { >> >writer.at
RE: Border question
Sorry, forgot about the list filtering attachments: http://www.markjstang.com/tapestry/ regards, Mark -Original Message- From: Mark Stang Sent: Thu 6/1/2006 3:57 PM To: Tapestry users Subject: RE: Border question Andreas, Here is an excerpt from Frame.html: TaskletView.java: This implementation of renderComponent(), gets a component from another page and calls render on it. We use a single "holder" page that has instances of all 130 components. In Tapestry you can get a component from another page and display it in the current page. So, our page stays the same, but the one component in the middle swaps in and out. import org.apache.tapestry.AbstractComponent; public abstract class TaskletView extends AbstractComponent { protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Tasklet tasklet = ((Visit)getPage().getVisit()).getCurrentTasklet(); TaskletState ts = (TaskletState)tasklet.getCurrentState(); String pageForCard = ts.getPageName(); IPage cardPage = cycle.getPage(pageForCard); String cardName = tasklet.getCurrentState().getStateName(); BaseComponent component = (BaseComponent)cardPage.getComponent(cardName); if (component instanceof PageRenderListener) { IPage page = component.getPage(); page.beginPageRender(); } component.render(writer, cycle); } } I have attached a sample screen (snapshot7). The Headcrumbs start with Main. The Breadcrumbs have checkmarks besides them. The note is in green. Everything between the green note and the buttons is component. In snapshot8, the headcrumbs and breadcrumbs have changed because we are in a different part of the application. Everything between the green note and the buttons is the component. Each of these components are just standard Tapestry components. The headcrumbs and breadcrumbs are each tapestry components that redraw themselves every time we change screens. Cheers, Mark -Original Message- From: Andreas Bulling on behalf of Andreas Bulling Sent: Thu 6/1/2006 3:08 PM To: Tapestry users Subject: Re: Border question Hi Mark, sounds as a solution even if I don't understand what you were trying to explain... Some sample code would help a lot, is there something you can show us/commit to one of the widely known Tapestry repositories? Cheers, Andreas On 01. Jun 2006 - 14:51:00, Mark Stang wrote: | There is another option to get around that restriction. It is what Howard calls my "mutant" application. I have one Frame.html/Frame.page/Frame.java. All of my other pages are popups. There are about 5 or 6 of those. In addition, I have 130 "components". None of my components have any border content, it is all in the "Frame". As part of the Frame I have Breadcrumbs and something we call Headcrumbs. Headcrumbs are a higher level menu. So, we can have a bunch of "breadcrumbs" within each headcrumb. Headcrumbs are a group of "breadcrumbs". Breadcrumbs are reusable across multiple Headcrumbs. Any one breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb. | | Basically, we have a wizard application with 130 screens. | | The border component replaces pages, we have one page that replaces components. There is an age-old Tapestry question about whether you create components or pages? What is your level of re-use? We chose re-use at the level of components. | | regards, | | Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Border question
Andreas, Here is an excerpt from Frame.html: TaskletView.java: This implementation of renderComponent(), gets a component from another page and calls render on it. We use a single "holder" page that has instances of all 130 components. In Tapestry you can get a component from another page and display it in the current page. So, our page stays the same, but the one component in the middle swaps in and out. import org.apache.tapestry.AbstractComponent; public abstract class TaskletView extends AbstractComponent { protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { Tasklet tasklet = ((Visit)getPage().getVisit()).getCurrentTasklet(); TaskletState ts = (TaskletState)tasklet.getCurrentState(); String pageForCard = ts.getPageName(); IPage cardPage = cycle.getPage(pageForCard); String cardName = tasklet.getCurrentState().getStateName(); BaseComponent component = (BaseComponent)cardPage.getComponent(cardName); if (component instanceof PageRenderListener) { IPage page = component.getPage(); page.beginPageRender(); } component.render(writer, cycle); } } I have attached a sample screen (snapshot7). The Headcrumbs start with Main. The Breadcrumbs have checkmarks besides them. The note is in green. Everything between the green note and the buttons is component. In snapshot8, the headcrumbs and breadcrumbs have changed because we are in a different part of the application. Everything between the green note and the buttons is the component. Each of these components are just standard Tapestry components. The headcrumbs and breadcrumbs are each tapestry components that redraw themselves every time we change screens. Cheers, Mark -Original Message- From: Andreas Bulling on behalf of Andreas Bulling Sent: Thu 6/1/2006 3:08 PM To: Tapestry users Subject: Re: Border question Hi Mark, sounds as a solution even if I don't understand what you were trying to explain... Some sample code would help a lot, is there something you can show us/commit to one of the widely known Tapestry repositories? Cheers, Andreas On 01. Jun 2006 - 14:51:00, Mark Stang wrote: | There is another option to get around that restriction. It is what Howard calls my "mutant" application. I have one Frame.html/Frame.page/Frame.java. All of my other pages are popups. There are about 5 or 6 of those. In addition, I have 130 "components". None of my components have any border content, it is all in the "Frame". As part of the Frame I have Breadcrumbs and something we call Headcrumbs. Headcrumbs are a higher level menu. So, we can have a bunch of "breadcrumbs" within each headcrumb. Headcrumbs are a group of "breadcrumbs". Breadcrumbs are reusable across multiple Headcrumbs. Any one breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb. | | Basically, we have a wizard application with 130 screens. | | The border component replaces pages, we have one page that replaces components. There is an age-old Tapestry question about whether you create components or pages? What is your level of re-use? We chose re-use at the level of components. | | regards, | | Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issues with Label Components with Tapestry 4.0
Sure, but at that point you are basically overriding the behaviour provided by the ValidationDelegate when it does before/after field rendering (not talking about FieldLabel). The FieldLabel component already supports informal parameters. I noticed in your first email you mentioned trying to do this with something like and only saw class1 output. Try doing this instead (though I agree it sounds like a bug somehow): On 6/1/06, Matt Raible <[EMAIL PROTECTED]> wrote: Is there an easy way to subclass FieldLabel and override the renderComponent() method to move writeLabelPrefix and writeLabelSuffix to be inside ? Thanks, Matt On May 31, 2006, at 2:51 PM, Ryan Holmes wrote: > Your problem getting the span tag where you want it is due to how > the FieldLabel component renders itself. Here's the relevant part > of FieldLabel.renderComponent(): > >delegate.writeLabelPrefix(field, writer, cycle); >writer.begin("label"); >if (id != null) >writer.attribute("for", id); >delegate.writeLabelAttributes(writer, cycle, field); >renderInformalParameters(writer, cycle); >writer.print(displayName, getRaw()); >writer.end(); >delegate.writeLabelSuffix(field, writer, cycle); > > > You could argue that writeLabelPrefix() and writeLabelSuffix() > should both be inside the tag (makes sense to me), but the > current code is symmetrical and not necessarily "wrong." Your best > bet is probably to override the FieldLabel component with your own > version that renders the delegate prefix and/or suffix inside the > label tag. And I'm sure you won't hesitate to file a bug report if > you feel strongly about it ;) > > -Ryan > > > Matt Raible wrote: > >> Matt Raible wrote: >> >>> Andreas Andreou wrote: >>> try component.getBinding("class") if that's not null, do a getObject() on it >>> >>> >>> >>> Thanks. This works, but it also prints out duplicate "class" >>> attributes. >>> >>> class="text large error" class="text large" >>> >>> >>> It'd be nice to have something like: >>> >>> writer.appendAttribute("class", "values to append"); >>> >>> Another question - it seems my full and is >>> getting wrapped with >>> >>> >>> >>> Is there anyway to get rid of that? It's problematic b/c the >>> closing isn't getting rendered until right before . >> >> >> Fixed this by using: >> >>public void writeLabelPrefix(IFormComponent component, >> IMarkupWriter writer, >> IRequestCycle cycle) { >>// does nothing put prevent from getting >> written >>} >> >>> >>> Thanks, >>> >>> Matt >>> Matt Raible wrote: > Hmmm, I'm guessing the answers to my questions below are "no, > this isn't possible." ;-) > > Here's another question - is it possible in my custom Validator > to get the existing CSS classes on a component? For example, I > currently have: > >public void writeLabelAttributes(IMarkupWriter writer, > IRequestCycle cycle, IFormComponent component) { >if (isInError(component)) { >writer.attribute("class", "error"); >} >} > >public void writeAttributes(IMarkupWriter writer, > IRequestCycle cycle, >IFormComponent component, > IValidator validator) { >if (isInError()) { >writer.attribute("class", "error"); >} >} > > But I'd prefer to have something like this: > >public void writeLabelAttributes(IMarkupWriter writer, > IRequestCycle cycle, IFormComponent component) { >if (isInError(component)) { >writer.attribute("class", "error " + > component.getAttribute("class")); >} >} > >public void writeAttributes(IMarkupWriter writer, > IRequestCycle cycle, >IFormComponent component, > IValidator validator) { >if (isInError()) { >writer.attribute("class", "error " + > component.getAttribute("class")); >} >} > > In other words, is there a method on component that allows me > to get the current CSS classes? > > Matt > > Matt Raible wrote: > >> I have two different "Label" components I'm trying to create. >> Issue #1 >> --- >> The first is a simple component (just a Label.jwc and >> Label.html file in WEB-INF) that writes a . I'd like >> to include the option to write a "required" indicator. >> However, I'm having a difficult time retrieving a parameter's >> value. Here's what I have so far: >> >> Label.jwc >> >> >> >>> parameters="yes"/> >> >> >> Label.html >> > value="ognl:getMessages().getMessage(key)"/> > condition="ognl:class == 'required'"> *> span> >> >> I'm pretty
Re: Border question
Hi Mark, sounds as a solution even if I don't understand what you were trying to explain... Some sample code would help a lot, is there something you can show us/commit to one of the widely known Tapestry repositories? Cheers, Andreas On 01. Jun 2006 - 14:51:00, Mark Stang wrote: | There is another option to get around that restriction. It is what Howard calls my "mutant" application. I have one Frame.html/Frame.page/Frame.java. All of my other pages are popups. There are about 5 or 6 of those. In addition, I have 130 "components". None of my components have any border content, it is all in the "Frame". As part of the Frame I have Breadcrumbs and something we call Headcrumbs. Headcrumbs are a higher level menu. So, we can have a bunch of "breadcrumbs" within each headcrumb. Headcrumbs are a group of "breadcrumbs". Breadcrumbs are reusable across multiple Headcrumbs. Any one breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb. | | Basically, we have a wizard application with 130 screens. | | The border component replaces pages, we have one page that replaces components. There is an age-old Tapestry question about whether you create components or pages? What is your level of re-use? We chose re-use at the level of components. | | regards, | | Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean instantiation
Completely wild (as in not confirmed) guess, but probably the first time the method is called. On 6/1/06, Stephane Decleire <[EMAIL PROTECTED]> wrote: Hi all, Does anybody know when the instantiation of a bean occured when it's injected in a Tapestry page ? I mean, for example, if i code an injection like : @InjectSpring("Ad") public abstract Ad getAd(); Is the Ad bean instantiated when the page is attached ? or is it when i first call the getAd() function ? Thanks in advance. -- Stéphane Decleire 05 56 57 99 20 06 63 78 69 06 -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
RE: Border question
There is another option to get around that restriction. It is what Howard calls my "mutant" application. I have one Frame.html/Frame.page/Frame.java. All of my other pages are popups. There are about 5 or 6 of those. In addition, I have 130 "components". None of my components have any border content, it is all in the "Frame". As part of the Frame I have Breadcrumbs and something we call Headcrumbs. Headcrumbs are a higher level menu. So, we can have a bunch of "breadcrumbs" within each headcrumb. Headcrumbs are a group of "breadcrumbs". Breadcrumbs are reusable across multiple Headcrumbs. Any one breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb. Basically, we have a wizard application with 130 screens. The border component replaces pages, we have one page that replaces components. There is an age-old Tapestry question about whether you create components or pages? What is your level of re-use? We chose re-use at the level of components. regards, Mark -Original Message- From: Andreas Bulling on behalf of Andreas Bulling Sent: Thu 6/1/2006 2:29 PM To: Tapestry users Subject: Re: Border question On 01. Jun 2006 - 14:06:48, Mark Stang wrote: | The other option is to create your own menuing component. Start with manually coding a couple of HTML pages to get the L&F. Then abstract it backwards into a component that creates the HTML on-the-fly. Then just add that component/components to each page. Or put them all in a border page and change out the interior. Is this the best practice for implementing for example a breadcrumb or a multi-level menue? The problem is caused by Tapestry's component-based approach: You have to define the "logical order" (the tree-structure) of your pages manually in a seperate file, directly in the pages or in a not portable component. That's more difficult than in a actions/operations-based approach... :-( Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issues with Label Components with Tapestry 4.0
Is there an easy way to subclass FieldLabel and override the renderComponent() method to move writeLabelPrefix and writeLabelSuffix to be inside ? Thanks, Matt On May 31, 2006, at 2:51 PM, Ryan Holmes wrote: Your problem getting the span tag where you want it is due to how the FieldLabel component renders itself. Here's the relevant part of FieldLabel.renderComponent(): delegate.writeLabelPrefix(field, writer, cycle); writer.begin("label"); if (id != null) writer.attribute("for", id); delegate.writeLabelAttributes(writer, cycle, field); renderInformalParameters(writer, cycle); writer.print(displayName, getRaw()); writer.end(); delegate.writeLabelSuffix(field, writer, cycle); You could argue that writeLabelPrefix() and writeLabelSuffix() should both be inside the tag (makes sense to me), but the current code is symmetrical and not necessarily "wrong." Your best bet is probably to override the FieldLabel component with your own version that renders the delegate prefix and/or suffix inside the label tag. And I'm sure you won't hesitate to file a bug report if you feel strongly about it ;) -Ryan Matt Raible wrote: Matt Raible wrote: Andreas Andreou wrote: try component.getBinding("class") if that's not null, do a getObject() on it Thanks. This works, but it also prints out duplicate "class" attributes. class="text large error" class="text large" It'd be nice to have something like: writer.appendAttribute("class", "values to append"); Another question - it seems my full and is getting wrapped with Is there anyway to get rid of that? It's problematic b/c the closing isn't getting rendered until right before . Fixed this by using: public void writeLabelPrefix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle) { // does nothing put prevent from getting written } Thanks, Matt Matt Raible wrote: Hmmm, I'm guessing the answers to my questions below are "no, this isn't possible." ;-) Here's another question - is it possible in my custom Validator to get the existing CSS classes on a component? For example, I currently have: public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component) { if (isInError(component)) { writer.attribute("class", "error"); } } public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { if (isInError()) { writer.attribute("class", "error"); } } But I'd prefer to have something like this: public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component) { if (isInError(component)) { writer.attribute("class", "error " + component.getAttribute("class")); } } public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { if (isInError()) { writer.attribute("class", "error " + component.getAttribute("class")); } } In other words, is there a method on component that allows me to get the current CSS classes? Matt Matt Raible wrote: I have two different "Label" components I'm trying to create. Issue #1 --- The first is a simple component (just a Label.jwc and Label.html file in WEB-INF) that writes a . I'd like to include the option to write a "required" indicator. However, I'm having a difficult time retrieving a parameter's value. Here's what I have so far: Label.jwc parameters="yes"/> Label.html value="ognl:getMessages().getMessage(key)"/> condition="ognl:class == 'required'"> *span> I'm pretty sure "class" won't work as a parameter name b/c I've seen a stacktrace using this already. Regardless, let's pretend it does (I've tried using other names). Here's the desired usage: key="user.phoneNumber">Phone Number produces: Phone Number * I'm fine with the result having class="required desc" - I basically just need some indicator to show a field is required when I'm not wiring up it's input field as a component. Issue #2 --- I'm overriding ValidationDelegate in order to add required field indicators. I used to be pre-pending an asterisk to the beginning of the field, and I had that working. Now I want to add to the end of the before the label> shows up. I'm using @FieldLabel and everything *almost* works. I've eliminating error styling in the class below so it's easier to read. public class Validator extends ValidationDelegate { public void writeLabelSuffix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle
Re: Visit object
On 01. Jun 2006 - 16:39:06, James Carman wrote: | Try renaming what you call the getter/setter. See what that does. There is | a deprecated getVisit() method on IPage. Yeah, I had the same problem once and renamed the getter to getVisitState() which worked. Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Visit object
Try renaming what you call the getter/setter. See what that does. There is a deprecated getVisit() method on IPage. -Original Message- From: Mário Lopes [mailto:[EMAIL PROTECTED] Sent: Thursday, June 01, 2006 4:35 PM To: Tapestry users Subject: Re: Visit object This is the error reported Error at context:/WEB-INF/Home.page, line 6, column 53: Method 'public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit()' (declared in class com.icom.crm_feup.Home) has no implementation in class com.icom.crm_feup.Home (or enhanced subclass $Home_0). If I refresh the webpage it returns a different error: Error: An error occured processing annotation @org.apache.tapestry.annotations.InjectState(value=crm) of public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit(): Property visit has already been accounted for by the element at Annotation @org.apache.tapestry.annotations.InjectState(value=crm) of public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit(). I didn't include the Stack Trace since it was quite long. Here's what I have in hivemodule.xml And here's how my code looks like in the Home page @InjectState("crm") public abstract Visit getVisit(); public abstract void setVisit(Visit visit); ... // coloca o operador na sessao Visit visit = new Visit(); visit.setOperador(operador); setVisit(visit); Hope it helps. -- Mário On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > | Following your advice, I've created my own class, called Visit > | (original isn't it? :-) and added this to hivemind.xml > | > | > | > | > | > | > | > | This is the code I've used to try accessing the Visit object: > | > | @InjectState("user-visit") > | public abstract Visit getVisit(); > | > | But it isn't work. It complains, on runtime, about the annotation > | being done before. > > Could you post the stack trace? > > Andreas > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
This is the error reported Error at context:/WEB-INF/Home.page, line 6, column 53: Method 'public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit()' (declared in class com.icom.crm_feup.Home) has no implementation in class com.icom.crm_feup.Home (or enhanced subclass $Home_0). If I refresh the webpage it returns a different error: Error: An error occured processing annotation @org.apache.tapestry.annotations.InjectState(value=crm) of public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit(): Property visit has already been accounted for by the element at Annotation @org.apache.tapestry.annotations.InjectState(value=crm) of public abstract com.icom.crm_feup.Visit com.icom.crm_feup.Home.getVisit(). I didn't include the Stack Trace since it was quite long. Here's what I have in hivemodule.xml And here's how my code looks like in the Home page @InjectState("crm") public abstract Visit getVisit(); public abstract void setVisit(Visit visit); ... // coloca o operador na sessao Visit visit = new Visit(); visit.setOperador(operador); setVisit(visit); Hope it helps. -- Mário On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: | Following your advice, I've created my own class, called Visit | (original isn't it? :-) and added this to hivemind.xml | | | | | | | | This is the code I've used to try accessing the Visit object: | | @InjectState("user-visit") | public abstract Visit getVisit(); | | But it isn't work. It complains, on runtime, about the annotation | being done before. Could you post the stack trace? Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Border question
On 01. Jun 2006 - 14:06:48, Mark Stang wrote: | The other option is to create your own menuing component. Start with manually coding a couple of HTML pages to get the L&F. Then abstract it backwards into a component that creates the HTML on-the-fly. Then just add that component/components to each page. Or put them all in a border page and change out the interior. Is this the best practice for implementing for example a breadcrumb or a multi-level menue? The problem is caused by Tapestry's component-based approach: You have to define the "logical order" (the tree-structure) of your pages manually in a seperate file, directly in the pages or in a not portable component. That's more difficult than in a actions/operations-based approach... :-( Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Border question
The other option is to create your own menuing component. Start with manually coding a couple of HTML pages to get the L&F. Then abstract it backwards into a component that creates the HTML on-the-fly. Then just add that component/components to each page. Or put them all in a border page and change out the interior. hth, Mark -Original Message- From: Peter Svensson [mailto:[EMAIL PROTECTED] Sent: Thu 6/1/2006 1:53 PM To: Tapestry users; Carl Pelletier Subject: Re: Border question I have read your post and immediately wondered a couple of things, which might make it easier to help you; How are the menus generated by the server? Are you wrapping an existing JSP-site, or what kind of existing infratructure do you have? There are several Tapestry components that use fairly fancy menus or implement sitemaps (Though I haven't tried them myself), but they generally use Javascript and either let you define the menus and which pages, etc. items refer to in a separate file, or they some other way :) I'm think that maybe you're better off trying to make your own menu system anyway: Also, if the administration in only realted to items in hibernate databases, you might want to try out the trails framework, which generates edit,search and list pages with tables and links for table relations, including acegi security and search. Alltough you have to write a correct POJO class for each existing table in the database. Cheers, PS On 6/1/06, Carl Pelletier <[EMAIL PROTECTED]> wrote: > > Hi, I'm looking for advise, tips or idea here. I'm beginning the > development of a site in Tapestry 4.0 and I don't know how to implement > all my levels of menu without creating many border page. > > What I'm trying to do is implementing component that will render my menu. > The problem I have, is that all example I saw like the library example and > others just have one level of menu. > > Us, we got 3. Each page include all the menu and should Highlight the > corresponding one when you are in the good section, in the good subsection > and in the good page. > > All menu are genereted server side so no need for javascript. The final > sites will have many pages, like ~50 to 75 so we don't want to duplicate all > the html code of each level menu to display the good menu. > > For now, The only way I saw I can do this is by making a border level3 > wich include a border level2 wich include a border level1. The problem with > that is that I need to have a border level 3 for each item in the level2 and > so one... > > Don't forget that each item in the menu will be secure, so a logued user > will see somes items of all menus but not necessary all items. > > this site is a admin site and will be bind with Hibernate. I don't use > Spring, structs or anything like that... > > I joint a picture of the design for help. > > If you can give me some tips, some idea or best pratice on that, It's will > be very appreciate. > > Sorry for bad english! > > Carl Pelletier > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bean instantiation
Hi all, Does anybody know when the instantiation of a bean occured when it's injected in a Tapestry page ? I mean, for example, if i code an injection like : @InjectSpring("Ad") public abstract Ad getAd(); Is the Ad bean instantiated when the page is attached ? or is it when i first call the getAd() function ? Thanks in advance. -- Stéphane Decleire 05 56 57 99 20 06 63 78 69 06
Re: Border question
I have read your post and immediately wondered a couple of things, which might make it easier to help you; How are the menus generated by the server? Are you wrapping an existing JSP-site, or what kind of existing infratructure do you have? There are several Tapestry components that use fairly fancy menus or implement sitemaps (Though I haven't tried them myself), but they generally use Javascript and either let you define the menus and which pages, etc. items refer to in a separate file, or they some other way :) I'm think that maybe you're better off trying to make your own menu system anyway: Also, if the administration in only realted to items in hibernate databases, you might want to try out the trails framework, which generates edit,search and list pages with tables and links for table relations, including acegi security and search. Alltough you have to write a correct POJO class for each existing table in the database. Cheers, PS On 6/1/06, Carl Pelletier <[EMAIL PROTECTED]> wrote: Hi, I'm looking for advise, tips or idea here. I'm beginning the development of a site in Tapestry 4.0 and I don't know how to implement all my levels of menu without creating many border page. What I'm trying to do is implementing component that will render my menu. The problem I have, is that all example I saw like the library example and others just have one level of menu. Us, we got 3. Each page include all the menu and should Highlight the corresponding one when you are in the good section, in the good subsection and in the good page. All menu are genereted server side so no need for javascript. The final sites will have many pages, like ~50 to 75 so we don't want to duplicate all the html code of each level menu to display the good menu. For now, The only way I saw I can do this is by making a border level3 wich include a border level2 wich include a border level1. The problem with that is that I need to have a border level 3 for each item in the level2 and so one... Don't forget that each item in the menu will be secure, so a logued user will see somes items of all menus but not necessary all items. this site is a admin site and will be bind with Hibernate. I don't use Spring, structs or anything like that... I joint a picture of the design for help. If you can give me some tips, some idea or best pratice on that, It's will be very appreciate. Sorry for bad english! Carl Pelletier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Border question
Hi, I'm looking for advise, tips or idea here. I'm beginning the development of a site in Tapestry 4.0 and I don't know how to implement all my levels of menu without creating many border page.What I'm trying to do is implementing component that will render my menu. The problem I have, is that all example I saw like the library example and others just have one level of menu.Us, we got 3. Each page include all the menu and should Highlight the corresponding one when you are in the good section, in the good subsection and in the good page.All menu are genereted server side so no need for _javascript_. The final sites will have many pages, like ~50 to 75 so we don't want to duplicate all the html code of each level menu to display the good menu.For now, The only way I saw I can do this is by making a border level3 wich include a border level2 wich include a border level1. The problem with that is that I need to have a border level 3 for each item in the level2 and so one...Don't forget that each item in the menu will be secure, so a logued user will see somes items of all menus but not necessary all items.this site is a admin site and will be bind with Hibernate. I don't use Spring, structs or anything like that...I joint a picture of the design for help.If you can give me some tips, some idea or best pratice on that, It's will be very appreciate. Sorry for bad english!Carl Pelletier- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PageRedirectException problem inside the service() method.
Got it fixed, Moved the call to getOutputStream() to a place right before it's actually needed so that most initialization try/catch(ing) would be done before that and if an error was caught the PageRedirectException is processed without any issues since getOutputStream() is not called yet. Haven't tested all try/catch scenarios yet, but I think this will work. Cheers. Leo Sakhvoruk wrote: I'm working on getting a service working which provides a page with a link to an audio file. When the link is clicked the service() method connects to the audio url on another server and basically pipes the data stream to the requesting page. The service is also supposed to display an error on the current page if there is something wrong with the stream, etc. Well, all seems to be ok until I start plugging PageRedirectExceptions in the catch clauses of try/catch at which point I get the lovely Tomcat IllegalStateException due to the getOutputStream being called twice. I've looked at the example in the Tap 4 book and it seems that my code is fairly close to that. Again, the code appears to work unless there is an exception caught which requires a PageRedirectException. I'm a bit lost at this point so any hints would be great. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
| Following your advice, I've created my own class, called Visit | (original isn't it? :-) and added this to hivemind.xml | | | | | | | | This is the code I've used to try accessing the Visit object: | | @InjectState("user-visit") | public abstract Visit getVisit(); | | But it isn't work. It complains, on runtime, about the annotation | being done before. Could you post the stack trace? Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertySelection
Hi Stephane, My ComponentImpl object did implement equals() as detailed below, but the Option interface included only getCode() and getName(), causing the comparison to somehow complete incorrectly. I added the getId() also used in equals() to the Option interface and it worked. Thank you, Alex./ public class ComponentImpl extends DataObjectImpl implements Component{ private static final long serialVersionUID = 1L; private int id; private String code = NULL_STRING; private String name = NULL_STRING; public boolean equals(Object o) { if (this == o) { return true; } if (o == null || !(o instanceof ComponentImpl)) { return false; } ComponentImpl component = (ComponentImpl) o; if (component.getId() == this.getId()) { return true; } // If both component have their code set up, then it's quite a simple check if (component.getCode() != null && this.getCode() != null && this.getCode() != NULL_STRING ) { return component.getCode().equals(this.getCode()); } return false; } -- View this message in context: http://www.nabble.com/PropertySelection-t1716999.html#a4667056 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
On 6/1/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: On 01. Jun 2006 - 17:56:58, Mário Lopes wrote: | Hi. | | I've been following Tapestry in Action to implement a Visit session | object but I was unable to make it work. Declaring a getVisit(); as | abstract and then calling it through Visit visit = (Visit) getVisit(); | seems to be deprecated. Instead of using the deprecated Visit object as described in TiA you should use an Application State Object (ASO) with "session" scope. You should find examples in the list archives. Following your advice, I've created my own class, called Visit (original isn't it? :-) and added this to hivemind.xml This is the code I've used to try accessing the Visit object: @InjectState("user-visit") public abstract Visit getVisit(); But it isn't work. It complains, on runtime, about the annotation being done before. Any ideas? -- Mário Hope this helps, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
On 01. Jun 2006 - 17:56:58, Mário Lopes wrote: | Hi. | | I've been following Tapestry in Action to implement a Visit session | object but I was unable to make it work. Declaring a getVisit(); as | abstract and then calling it through Visit visit = (Visit) getVisit(); | seems to be deprecated. Instead of using the deprecated Visit object as described in TiA you should use an Application State Object (ASO) with "session" scope. You should find examples in the list archives. Hope this helps, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Visit object
The way to do it in T4 is to use the ASO approach. You can inject the visit ASO like this: @InjectState("visit") public abstract YourVisitObject getVisit(); On 6/1/06, Mário Lopes <[EMAIL PROTECTED]> wrote: Hi. I've been following Tapestry in Action to implement a Visit session object but I was unable to make it work. Declaring a getVisit(); as abstract and then calling it through Visit visit = (Visit) getVisit(); seems to be deprecated. What's the correct usage for Visit on T4? Thanks in advance. -- Mário - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ~chris
Visit object
Hi. I've been following Tapestry in Action to implement a Visit session object but I was unable to make it work. Declaring a getVisit(); as abstract and then calling it through Visit visit = (Visit) getVisit(); seems to be deprecated. What's the correct usage for Visit on T4? Thanks in advance. -- Mário - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Persist documentation?
http://jakarta.apache.org/tapestry/tapestry-annotations/index.html#Persist On 6/1/06, Jean-Eric Cuendet <[EMAIL PROTECTED]> wrote: Hi, I'm unable to find @Persist annotation doc... Could someone point me to some? Thanks. -jec -- Best regards / Salutations. Jean-Eric Cuendet Senior developer / Technical support Riskpro Technologies SA Av. Louis-Ruchonnet 2 CH-1003 Lausanne Switzerland Direct: +41 21 637 0123 Principal : +41 21 637 0110 Fax : +41 21 637 0111 Skype : jec.rptec Web : http://www.rptec.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: @Persist documentation?
Have you checked out the following? http://jakarta.apache.org/tapestry/tapestry-annotations/index.html#Persist Shing --- Jean-Eric Cuendet <[EMAIL PROTECTED]> wrote: > Hi, > I'm unable to find @Persist annotation doc... > Could someone point me to some? > Thanks. > -jec > > -- > Best regards / Salutations. > > Jean-Eric Cuendet > Senior developer / Technical support > Riskpro Technologies SA > Av. Louis-Ruchonnet 2 > CH-1003 Lausanne > Switzerland > > Direct: +41 21 637 0123 > Principal : +41 21 637 0110 > Fax : +41 21 637 0111 > Skype : jec.rptec > Web : http://www.rptec.ch > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Home page : http://uk.geocities.com/matmsh/index.html ___ Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Persist documentation?
Hi, try here: http://jakarta.apache.org/tapestry/tapestry-annotations/index.html#Persist and here: http://jakarta.apache.org/tapestry/tapestry-annotations/apidocs/org/apache/tapestry/annotations/Persist.html Hth, Danny Jean-Eric Cuendet wrote: Hi, I'm unable to find @Persist annotation doc... Could someone point me to some? Thanks. -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@Persist documentation?
Hi, I'm unable to find @Persist annotation doc... Could someone point me to some? Thanks. -jec -- Best regards / Salutations. Jean-Eric Cuendet Senior developer / Technical support Riskpro Technologies SA Av. Louis-Ruchonnet 2 CH-1003 Lausanne Switzerland Direct: +41 21 637 0123 Principal : +41 21 637 0110 Fax : +41 21 637 0111 Skype : jec.rptec Web : http://www.rptec.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertySelection
It seems your T class does not implement a correct comparison operator ... Have you coorectly define the "equals" function ? [EMAIL PROTECTED] a écrit : Hello, In a page that display a query form and query results together, I want to remember the property selected by the user for the last query. I store this value in a page property, but I cannot get the PropertySelection to render using the previous value for the default value. It reverts to the value of index 0. My current solution below use LabeledPropertySelectionModel and results in duplicate option in the pull-down. Any help appreciated, Alex./ from Search.html PO Component Select Label from the Search.page public abstract class SearchPage extends BasePage implements PageBeginRenderListener { @Persist("session") public abstract Component getPoComponent(); public abstract void setPoComponent(Component poComponent); public abstract IPropertySelectionModel getPossibleComponents(); public abstract void setPossibleComponents(IPropertySelectionModel model); public void pageBeginRender(PageEvent event) { if (getPoComponent() != null) setPossibleComponents(new LabeledPropertySelectionModel(getPossibleComponents(), getPoComponent().getName(), getPoComponent())); } } public class SelectionModel implements IPropertySelectionModel, Serializable { private static final long serialVersionUID = 1L; private List options; this.options = new ArrayList(); for (T obj: options) { this.options.add(obj); } } public int getOptionCount() { return options.size()+1; } public Object getOption(int index) { return getOptionObj(index); } public String getLabel(int index) { return getOptionObj(index).getName(); } public String getValue(int index) { return getOptionObj(index).getCode(); } public Object translateValue(String value) { for (T obj : options) if (obj.getCode().equals(value)) return obj; return null; } } private Option getOptionObj(int index) { return (Option) options.get(index); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stéphane Decleire 05 56 57 99 20 06 63 78 69 06
PropertySelection
Hello, In a page that display a query form and query results together, I want to remember the property selected by the user for the last query. I store this value in a page property, but I cannot get the PropertySelection to render using the previous value for the default value. It reverts to the value of index 0. My current solution below use LabeledPropertySelectionModel and results in duplicate option in the pull-down. Any help appreciated, Alex./ from Search.html PO Component Select Label from the Search.page public abstract class SearchPage extends BasePage implements PageBeginRenderListener { @Persist("session") public abstract Component getPoComponent(); public abstract void setPoComponent(Component poComponent); public abstract IPropertySelectionModel getPossibleComponents(); public abstract void setPossibleComponents(IPropertySelectionModel model); public void pageBeginRender(PageEvent event) { if (getPoComponent() != null) setPossibleComponents(new LabeledPropertySelectionModel(getPossibleComponents(), getPoComponent().getName(), getPoComponent())); } } public class SelectionModel implements IPropertySelectionModel, Serializable { private static final long serialVersionUID = 1L; private List options; this.options = new ArrayList(); for (T obj: options) { this.options.add(obj); } } public int getOptionCount() { return options.size()+1; } public Object getOption(int index) { return getOptionObj(index); } public String getLabel(int index) { return getOptionObj(index).getName(); } public String getValue(int index) { return getOptionObj(index).getCode(); } public Object translateValue(String value) { for (T obj : options) if (obj.getCode().equals(value)) return obj; return null; } } private Option getOptionObj(int index) { return (Option) options.get(index); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IDE selection
I would say that eclipse is a good IDE for development in general, Tapestry or not. Many here, I believe, are using IDEA, too. For eclipse u should look for these plugins: Tapestry Palette: Lets you bring components rapidly from a customizable selection palette. Spindle: This is THE plugin for tapestry, a great aid to Tap developer under Eclipse. Unfortunetly it is under major development to upgrade for Tapestry 4.0 Murray Collingwood wrote: Hello to all. First time on the Tapestry list (ex-struts developer looking to do my first project in Tapestry). I noticed while reading the tutorial introduction that mention was made of Eclipse. I'm assuming from this that Eclipse is a good IDE to start working with. Is Eclipse the most popular IDE among Tapestry developers? Are there any popular Eclipse add-ons that I should install? TIA mc -- Murray Collingwood Focus Computing p +61 415 24 26 24 http://www.focus-computing.com.au -- Ivano Pagano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IDE selection
Hello to all. First time on the Tapestry list (ex-struts developer looking to do my first project in Tapestry). I noticed while reading the tutorial introduction that mention was made of Eclipse. I'm assuming from this that Eclipse is a good IDE to start working with. Is Eclipse the most popular IDE among Tapestry developers? Are there any popular Eclipse add-ons that I should install? TIA mc -- Murray Collingwood Focus Computing p +61 415 24 26 24 http://www.focus-computing.com.au