T5: decode URL with non english symbols
In this method public static String urlDecode(String input) // input = "новый" (russian word) { try { return CODEC.decode(input); // return "?" after call this method } catch (DecoderException ex) { throw new RuntimeException(ex); } } In Tomcat "" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use images outside webroot
this is my structure webapp |-myapplication |-WEB-INFO |-images |-0001.jpg |-start.tml so @Inject @Path("context:images/0001.jpg") private Asset img0001; so when u re-deploy the application juz overwrite (copy-paste from local testing application folder) all the content except the images folder (don use war) [EMAIL PROTECTED] wrote: I have tried the following: public abstract class Test extends TrailsPage { public IAsset getTest(){ FileResource resource = new FileResource("Z:\\Media\\0001.JPG"); Location location = new LocationImpl(resource); IAsset image = this.getEngine().getInfrastructure().getAssetFactory().createAsset(resource, location); return image; } ... but this leads to a "Could not find a strategy instance for class org.apache.hivemind.util.FileResource" exception. Original-Nachricht Datum: Fri, 11 Jan 2008 19:27:26 +0800 Von: Dapeng <[EMAIL PROTECTED]> An: Tapestry users Betreff: Re: How to use images outside webroot juz copy ur application to the webapps folder it works fine for me 200M static files then u can use the images inside the root [EMAIL PROTECTED] wrote: What plugins are you using? What would be the "manual" step to achieve this? How do I avoid that I get a several Gigabyte big .war file ? Original-Nachricht Datum: Thu, 20 Dec 2007 16:08:02 +0100 Von: Sven Homburg <[EMAIL PROTECTED]> An: Tapestry users Betreff: Re: How to use images outside webroot goto Project Settings and add a new "Web Resource Directory" best regards S.Homburg [EMAIL PROTECTED] schrieb: During development I would like to access/use images that are on a network drive (e.g. f:\images) as I dont have enough space on my harddisk. How can I tell Tapestry that it finds "localhost:8080/images/image.gif" here "f:\images\image.gif" ? - 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] - 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]
T5: Formatting date inside loop on template
I'm trying to format a date field that is inside a loop as such: Template: Page class: private SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/"); public SimpleDateFormat getDateFormat() { return dateFormat; } But I receive this error: # java.text.DateFormat.format(DateFormat.java:279) # java.text.Format.format(Format.java:133) # org.apache.tapestry.corelib.components.Output.beginRender(Output.java:71) # org.apache.tapestry.corelib.components.Output.beginRender(Output.java) # org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:330) # org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:891) # org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:56) # org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:334) # org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:58) # org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:58) # org.apache.tapestry.internal.services.MarkupRendererPipelineImpl$1.renderMarkup(MarkupRendererPipelineImpl.java:39) # org.apache.tapestry.services.TapestryModule$20.renderMarkup(TapestryModule.java:1349) # org.apache.tapestry.services.TapestryModule$19.renderMarkup(TapestryModule.java:1330) # org.apache.tapestry.services.TapestryModule$18.renderMarkup(TapestryModule.java:1312) # org.apache.tapestry.services.TapestryModule$17.renderMarkup(TapestryModule.java:1294) # org.apache.tapestry.internal.services.MarkupRendererPipelineImpl.renderMarkup(MarkupRendererPipelineImpl.java:48) # org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55) # org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:56) # org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:87) # org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:66) # org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:905) # com.taxandtech.projexion.services.AppModule$1.service(AppModule.java:94) # org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) # org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:487) # org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79) # org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:94) # org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:85) # org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) # org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107) # org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:888) # org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164) I thought it should work. Have I missed something here? Thanks in advance, -- I'm a coder not a drag-n-dropper Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: 5.0.8 whitespace
Chris, This is a job for CSS. You are creating a list, so render your links in an unordered list, and set the class attribute for the last item to "last" and then use a CSS recipe for creating inline lists: ul,li { display:inline; margin: 0; padding 0; } li:after { content: ", "; } li.last:after { content: "."; } You may need to set any surrounding paragraphs to display inline as well if you want the list included in the text flow. Jonathan > -Original Message- > From: Chris Lewis [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 12, 2008 5:05 PM > To: users@tapestry.apache.org > Subject: T5: 5.0.8 whitespace > > So this ticket has been implemented in svn: > https://issues.apache.org/jira/browse/TAPESTRY-2028 > > And now I need whitespace... so how can I get it back? Is there or isn't > there a way to disable this? Im using loop to output links (pagelinks), > and i have whitespace behind in the body so there is separation. > Unfortunately, it's getting stripped. Is there a workaround? > > On a related note, is there a way to know if im on the last iteration of > the loop, so i could for example, follow all but the last with a ","? > This may be outside the scope of loop as currently implemented, but i > can see it being useful. > > chris > > - > 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]
createAbsoluteAsset question
What's wrong with this code? IAsset image = getEngine().getInfrastructure().getAssetFactory().createAbsoluteAsset( "z:\\images\\0001.JPG", getLocale(), getLocation() ); java.lang.IllegalArgumentException Could not find a strategy instance for class java.lang.String. Stack Trace: org.apache.hivemind.lib.util.StrategyRegistryImpl.searchForAdaptor(StrategyRegistryImpl.java:176) org.apache.hivemind.lib.util.StrategyRegistryImpl.getStrategy(StrategyRegistryImpl.java:74) $AssetFactory_117756b8982._getStrategy($AssetFactory_117756b8982.java) $AssetFactory_117756b8982.createAbsoluteAsset($AssetFactory_117756b8982.java) $AssetFactory_117756b8822.createAbsoluteAsset($AssetFactory_117756b8822.java) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Exception occurs in onActivate
What happening is that your HTML is referencing a static file. The file does not exist, and the format of the URL makes it look like a Tapestry page render or action request. If the file did exist, Tapestry would let the servlet container handle it. On Jan 13, 2008 8:16 AM, adamh <[EMAIL PROTECTED]> wrote: > > Hi All, > > I'm seeing the same behaviour, I have a page that displays a list of items > which link off to a viewitem page with a pagelink with an item id for the > context (a string). When I hit the viewitem page I'm seeing the onActivate > event handler being called twice, the first time I can see that the item id > is there, then the second time its "asset" > > ViewItem.java: > public void onActivate(String theID) { > log.debug(theId); > } > > > The tml is very light, no images/assets being used, the only asset that gets > rendered out in the final html is the href="assets/tapestry/default.css" rel="stylesheet" type="text/css"> that > Tapestry auto renders. > > ViewItem.tml: > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > Hello > > > Log output: > DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | A4S4 > DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | assets > > Is there any reason why I should see two invocations, this is a render > request so only one cycle should be seen right? > > Any ideas? > > Thanks, Adam. > > > > > > Josh Penza wrote: > > > > Can someone explain the following exception? > > > > I click on a productdetail url like ('/productdetail/9) > > The system.out in ProductDetail. java prints nicely 9 to the screen. > > ** > > *void* onActivate(Long productId) { > > *this*.productId = productId; > > System.*out*.println("ProductDetail.onActivate :" + > > *this*.productId); > > } > > > > But where does the "assets" String come from?? > > > > Exception in method > > org.example.web.tapestry.pages.ProductDetail.onActivate( > > java.lang.Long) (at ProductDetail.java:49), parameter #1: Coercion of > > assets > > to type java.lang.Long (via String --> Long) failed: For input string: > > "assets" > > > > Caused by: *java.lang.RuntimeException*: Coercion of assets to type > > java.lang.Long (via String --> Long) failed: For input string: "assets" > > > > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(* > > TypeCoercerImpl.java:154*) > > > > at $TypeCoercer_1158a09422d.coerce($TypeCoercer_1158a09422d.java) > > > > at > > org.apache.tapestry.internal.services.ComponentEventImpl.coerceContext(* > > ComponentEventImpl.java:90*) > > > > ... 43 more > > > > Caused by: *java.lang.NumberFormatException*: For input string: "assets" > > > > at java.lang.NumberFormatException.forInputString(* > > NumberFormatException.java:48*) > > > > at java.lang.Long.parseLong(*Long.java:403*) > > > > at java.lang.Long.(*Long.java:671*) > > > > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(* > > TapestryIOCModule.java:232*) > > > > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(* > > TapestryIOCModule.java:230*) > > > > at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(* > > CoercionTuple.java:53*) > > > > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(* > > TypeCoercerImpl.java:150*) > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3A-Exception-occurs-in-onActivate-tp13135811p14787478.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] - (T5 Documents) IncludeJavaScriptLibraray or InjectJavaScriptLibrary
Just a typo in the documentation, I'll fix that up. On Jan 13, 2008 2:07 AM, Mohammad Shamsi <[EMAIL PROTECTED]> wrote: > Hi all, > > in the Ajax page in Tapestry Core Documents : > http://tapestry.apache.org/tapestry5/tapestry-core/guide/ajax.html > > > i saw an Annotaion @InjectJavaScriptLibrary > > @InjectJavaScriptLibrary("${tapestry.scriptaculous}/dragdrop.js") > > Does Tapestry have Annotation with this name ? > i think its name is IncludeJavaScriptLibraray > > > -- > sincerely yours > M. H. Shamsi > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: 5.0.8 whitespace
I have been keeping the nightly documentation up to date with these changes. Please look at http://tapestry.formos.com/nightly/tapestry5 and dig down from there. The main site will only be updated when a new release is generated, the nightly is ... well, nightly. On Jan 12, 2008 2:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: > So this ticket has been implemented in svn: > https://issues.apache.org/jira/browse/TAPESTRY-2028 > > And now I need whitespace... so how can I get it back? Is there or isn't > there a way to disable this? Im using loop to output links (pagelinks), > and i have whitespace behind in the body so there is separation. > Unfortunately, it's getting stripped. Is there a workaround? > > On a related note, is there a way to know if im on the last iteration of > the loop, so i could for example, follow all but the last with a ","? > This may be outside the scope of loop as currently implemented, but i > can see it being useful. > > chris > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: 5.0.8 whitespace
The var: binding prefix is much more limited than prop:, and prop: is more limited than T4's use of OGNL. But it's all part of the grand plan :-) Building a more complex expression language is something that will wait for a later release, as you can write code in your component to perform these types of operations (and still get instant reloading). On Jan 13, 2008 1:33 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: > This almost works. Using the way you suggested as is oddly emits a comma > only after the last element. Unfortunately I can't, at least not that I > know of, express a "less than" clause like so: > > , > > T5 doesnt allow '<' here. As far as creating my own goes, I'm wondering > if you've looked at the source of the core Loop component. If not, take > my word for it, it's scary. If I could just subclass it and override a > render method to honor a new parameter, it would probably be easy. Alas > the T5 black magic prohibits this. At this point I see 2 options: > > 1) Do as you suggested and create my own loop, which will take a good > bit of focused time to first understand why the internal loop does > things the way it does. > 2) Create a component that loops through a list and outputs a delimited > list of pagelinks. The nasty part of this is that's its done in rigid > java code - but it works. > > Has no one else done this yet? > > > Robert Zeigler wrote: > > What you /might/ be able to do (to avoid the java code), is to use var > > here... I haven't played with the var prefix yet, so this is a "try > > and see" idea. :) But. Something like: > > > > , > >> context="var:string">${var:string} > > > > > > If that works, you could even write your own DelimittedLoop component > > and not have to duplicate the logic elsewhere. > > > > Robert > > > > On Jan 12, 2008, at 1/125:06 PM , Chris Lewis wrote: > > > >> That would work of course, but I'd like to do something like this: > >> > >> >> delimit=", "> > >> >> context="var:string">${var:string} > >> > >> > >> And then each element would be separated by my delimiter without any > >> extra java code. > >> > >> Robert Zeigler wrote: > >>> How about testing the value of index? > >>> Something like: > >>> > >>> .java: > >>> > >>> private int index; > >>> public int getIndex() { return index; } > >>> public void setIndex(int i) index = i; } > >>> public boolean isFirst() { return index==0; } > >>> > >>> .tml: > >>> > >>> > >>> > >>>, > >>> > >>> >>> context="var:string">${var:string} > >>> > >>> > >>> Robert > >>> > >>> On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: > >>> > Sorry, I missed the "check if first" part. How can you do such a > check in Loop? The "If" can test, but what can you test in a Loop? > nothing that I know of will tell you where in the iteration you are. > > chris > > Davor Hrg wrote: > > just reverse where you write the "," > > instead of checking if last and putting comma behind > > > > check if first and put comma in front > > > > Davor Hrg > > > > On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> > > wrote: > > > >> So this ticket has been implemented in svn: > >> https://issues.apache.org/jira/browse/TAPESTRY-2028 > >> > >> And now I need whitespace... so how can I get it back? Is there > >> or isn't > >> there a way to disable this? Im using loop to output links > >> (pagelinks), > >> and i have whitespace behind in the body so there is separation. > >> Unfortunately, it's getting stripped. Is there a workaround? > >> > >> On a related note, is there a way to know if im on the last > >> iteration of > >> the loop, so i could for example, follow all but the last with a > >> ","? > >> This may be outside the scope of loop as currently implemented, > >> but i > >> can see it being useful. > >> > >> chris > >> > >> - > >> > >> 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] > >>> > >>> > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --
Re: T5: 5.0.8 whitespace
This almost works. Using the way you suggested as is oddly emits a comma only after the last element. Unfortunately I can't, at least not that I know of, express a "less than" clause like so: , T5 doesnt allow '<' here. As far as creating my own goes, I'm wondering if you've looked at the source of the core Loop component. If not, take my word for it, it's scary. If I could just subclass it and override a render method to honor a new parameter, it would probably be easy. Alas the T5 black magic prohibits this. At this point I see 2 options: 1) Do as you suggested and create my own loop, which will take a good bit of focused time to first understand why the internal loop does things the way it does. 2) Create a component that loops through a list and outputs a delimited list of pagelinks. The nasty part of this is that's its done in rigid java code - but it works. Has no one else done this yet? Robert Zeigler wrote: What you /might/ be able to do (to avoid the java code), is to use var here... I haven't played with the var prefix yet, so this is a "try and see" idea. :) But. Something like: , context="var:string">${var:string} If that works, you could even write your own DelimittedLoop component and not have to duplicate the logic elsewhere. Robert On Jan 12, 2008, at 1/125:06 PM , Chris Lewis wrote: That would work of course, but I'd like to do something like this: delimit=", "> context="var:string">${var:string} And then each element would be separated by my delimiter without any extra java code. Robert Zeigler wrote: How about testing the value of index? Something like: .java: private int index; public int getIndex() { return index; } public void setIndex(int i) index = i; } public boolean isFirst() { return index==0; } .tml: , context="var:string">${var:string} Robert On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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] - 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: T5: 5.0.8 whitespace
Sure, but I don't think it addresses my problem. My problem isn't creating a list, my problem is delimiting values on each iteration of Loop, without having a trailing or leading delimiter. Sven Homburg wrote: Hi Chris, may i advise you the listbinding from t5components ? ${element} 2008/1/13, Chris Lewis <[EMAIL PROTECTED]>: That would work of course, but I'd like to do something like this: ${var:string} And then each element would be separated by my delimiter without any extra java code. Robert Zeigler wrote: How about testing the value of index? Something like: .java: private int index; public int getIndex() { return index; } public void setIndex(int i) index = i; } public boolean isFirst() { return index==0; } .tml: , ${var:string} Robert On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Override GridColumn template?
That doesn't work. Tapestry insists on taking the original classes. It did work somehow though for one showoff (which is good ;) ) but doesn't anymore now. That is a bit puzzling. But nonetheless: Extending grid to make my own design with all associated components is probably not the most maintainable thing taking the early status of tap5 into account. Also: Striped tables are the normal usecase for anything bigger than 5 columns and 20 rows. I suggest that this is taken into the grid component as configurable parameters. like default with no row class, uniform with the parameter rowclass and striped with a parameter evenRowClass. Either alternating with default or with rowClass. Regards, Otho 2008/1/13, Sven Homburg <[EMAIL PROTECTED]>: > > extends your own grid column class by the tapestry' GridColumns class > in your duplicated package and adjust (override) the method > "public Asset getIcon()" to your requirements. > > 2008/1/13, Otho <[EMAIL PROTECTED]>: > > > > One strange thing happened: I did an override of the GridColumns.tml by > > duplicating the package structure and putting an altered file therein. > > Goal > > was to get rid of the sortable image which is fine for small tables but > > just > > takes up too much space for the tables I use. > > This worked fine when using the replace at runtime feature of Tap5 but I > > would rather have it as a default without being forced to compile the > > template and css at runtime. > > Is there any way to do this without compiling and without writing a > > parameter for each and every column? > > Any hints would be appreciated, > > Otho > > > > > > -- > with regards > Sven Homburg >
Re: [T5] Override GridColumn template?
extends your own grid column class by the tapestry' GridColumns class in your duplicated package and adjust (override) the method "public Asset getIcon()" to your requirements. 2008/1/13, Otho <[EMAIL PROTECTED]>: > > One strange thing happened: I did an override of the GridColumns.tml by > duplicating the package structure and putting an altered file therein. > Goal > was to get rid of the sortable image which is fine for small tables but > just > takes up too much space for the tables I use. > This worked fine when using the replace at runtime feature of Tap5 but I > would rather have it as a default without being forced to compile the > template and css at runtime. > Is there any way to do this without compiling and without writing a > parameter for each and every column? > Any hints would be appreciated, > Otho > -- with regards Sven Homburg
[T5] Override GridColumn template?
One strange thing happened: I did an override of the GridColumns.tml by duplicating the package structure and putting an altered file therein. Goal was to get rid of the sortable image which is fine for small tables but just takes up too much space for the tables I use. This worked fine when using the replace at runtime feature of Tap5 but I would rather have it as a default without being forced to compile the template and css at runtime. Is there any way to do this without compiling and without writing a parameter for each and every column? Any hints would be appreciated, Otho
Re: T5: Exception occurs in onActivate
Hi All, I'm seeing the same behaviour, I have a page that displays a list of items which link off to a viewitem page with a pagelink with an item id for the context (a string). When I hit the viewitem page I'm seeing the onActivate event handler being called twice, the first time I can see that the item id is there, then the second time its "asset" ViewItem.java: public void onActivate(String theID) { log.debug(theId); } The tml is very light, no images/assets being used, the only asset that gets rendered out in the final html is the that Tapestry auto renders. ViewItem.tml: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Hello Log output: DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | A4S4 DEBUG - uk.co.app.pages. ViewItem.onActivate(36) | assets Is there any reason why I should see two invocations, this is a render request so only one cycle should be seen right? Any ideas? Thanks, Adam. Josh Penza wrote: > > Can someone explain the following exception? > > I click on a productdetail url like ('/productdetail/9) > The system.out in ProductDetail. java prints nicely 9 to the screen. > ** > *void* onActivate(Long productId) { > *this*.productId = productId; > System.*out*.println("ProductDetail.onActivate :" + > *this*.productId); > } > > But where does the "assets" String come from?? > > Exception in method > org.example.web.tapestry.pages.ProductDetail.onActivate( > java.lang.Long) (at ProductDetail.java:49), parameter #1: Coercion of > assets > to type java.lang.Long (via String --> Long) failed: For input string: > "assets" > > Caused by: *java.lang.RuntimeException*: Coercion of assets to type > java.lang.Long (via String --> Long) failed: For input string: "assets" > > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(* > TypeCoercerImpl.java:154*) > > at $TypeCoercer_1158a09422d.coerce($TypeCoercer_1158a09422d.java) > > at > org.apache.tapestry.internal.services.ComponentEventImpl.coerceContext(* > ComponentEventImpl.java:90*) > > ... 43 more > > Caused by: *java.lang.NumberFormatException*: For input string: "assets" > > at java.lang.NumberFormatException.forInputString(* > NumberFormatException.java:48*) > > at java.lang.Long.parseLong(*Long.java:403*) > > at java.lang.Long.(*Long.java:671*) > > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(* > TapestryIOCModule.java:232*) > > at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(* > TapestryIOCModule.java:230*) > > at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(* > CoercionTuple.java:53*) > > at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(* > TypeCoercerImpl.java:150*) > > -- View this message in context: http://www.nabble.com/T5%3A-Exception-occurs-in-onActivate-tp13135811p14787478.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] - (T5 Documents) IncludeJavaScriptLibraray or InjectJavaScriptLibrary
Hi all, in the Ajax page in Tapestry Core Documents : http://tapestry.apache.org/tapestry5/tapestry-core/guide/ajax.html i saw an Annotaion @InjectJavaScriptLibrary @InjectJavaScriptLibrary("${tapestry.scriptaculous}/dragdrop.js") Does Tapestry have Annotation with this name ? i think its name is IncludeJavaScriptLibraray -- sincerely yours M. H. Shamsi