Re: enctype=multipart/form-data cause encoding problem in Chinese!
Might have something to do with this: https://issues.apache.org/jira/browse/TAPESTRY-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel /Olof On 29/11/2007, yuan gogo [EMAIL PROTECTED] wrote: Hi, folks. I'm a Chinese user and using tapestry 5.0.6 + jdk5 I found setting the form attribute enctype=multipart/form-data(when upload a file) will cause text encoding problem in Chinese. Any Idea? TIA best regards! gogo.yuan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: problems when extending DateField. More flexibility needed?
OK , I'll do that. How about issue 2? Andreas Andreou wrote: That's the same as https://issues.apache.org/jira/browse/TAPESTRY-1795 only for Tapestry-5... add an issue for it On Nov 28, 2007 6:39 PM, Britske [EMAIL PROTECTED] wrote: Hi, I extended datafield to call a defined callback function in javascript. like so: public class MyDateField extends DateField { protected void configure(JSONObject setup) { setup.put(onUpdate, callOnUpdate); super.configure(setup); } } This puts a nice javascript into my htmls (see below). However I have 2 issues: 1. for a callback function to work with the javascript calendar, I need the text 'callOnUpdate' to be included into the Calendar.setup (see below) WITHOUT quotes. However there's no way I see that I have control of outputting this without quotes. 2. for the defined funciton (callOnUpdate) to be picked up by the Calendar, the function must be in the same script-block as where calendar.setup sits. (At least thats what I conclude after testing this my hand. Im no javascript-guru). Since this block is rendered by DateField I have no possibility of writing the function into the block. Whatwould be the best way to tackel this? Of course, I could totally hack around DataField ( I can't extend much since most is package-private) but I really don't want to. Cheers, Geert-Jan This is what tapestry does: script type=text/javascript !-- Event.observe(window, load, function() { Tapestry.registerForm('form'); Calendar.setup({inputField:a,ifFormat:%d-%m-%y,button:a:trigger,onUpdate:callOnUpdate}); }); // -- /script what i need: script type=text/javascript !-- function callOnUpdate(cal) { alert('do something here'); } Event.observe(window, load, function() { Tapestry.registerForm('form'); Calendar.setup({inputField:a,ifFormat:%d-%m-%y,button:a:trigger,onUpdate:callOnUpdate}); }); // -- /script -- View this message in context: http://www.nabble.com/T5%3A-problems-when-extending-DateField.-More-flexibility-needed--tf4889614.html#a13996007 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-problems-when-extending-DateField.-More-flexibility-needed--tf4889614.html#a14022547 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic pages (or: arguments to pages) [T4]
These are just guesses, I haven't tried them nor verified them. I could imagine that the parameter isn't available via the WebRequest because the page didn't get called by a GET request directly but with the help of the service encoder, so your parameter isn't there anymore when the page get's rendered. Try to get hold of the IRequestCycle by calling getRequestCycle() and call getParameter on it. I wouldn't be surprised if it's in there. Cheers, Uli Kaspar Fischer schrieb: Unfortunately, my solution does not really work yet. My page uses @InjectObject(infrastructure:request) public abstract WebRequest getRequest(); public void pageBeginRender(PageEvent event) { super.pageBeginRender(event); WebRequest request = getRequest(); id = request.getParameterValue(id)); // (*) } to read the Id of the page to display. This indeed works: http://localhost/app?id=someid results in id from (*) being set to someid. I now wanted to support friendly URLs and wrote a ServiceEncoder whose decode() method extracts the Id form a URL like http://localhost/node/id.html and sets it: public void decode(ServiceEncoding encoding) { // ... String id = // ... encoding.setParameterValue(ServiceConstants.SERVICE, Tapestry.PAGE_SERVICE); encoding.setParameterValue(ServiceConstants.PAGE, _className); encoding.setParameterValue(id, id); } But although the variable encoding contains the parameter id with its value (I verifed this), the page's pageBeginRender() from above receives null. I feel I misunderstand something here. Why are parameters not passed on to the page request? Many thanks, Kaspar - 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: enctype=multipart/form-data cause encoding problem in Chinese!
I followed the link and found it has be resolved in 5.0.7 version. So I downloaded all 5.0.7-snapshot of 28th Nov. After replaced all 5.0.6jars, the problem is still there. Hasn't this problem been resolved in 5.0.7-snapshot ? Thank you :-) 2007/11/29, Olof Næssén [EMAIL PROTECTED]: Might have something to do with this: https://issues.apache.org/jira/browse/TAPESTRY-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel /Olof On 29/11/2007, yuan gogo [EMAIL PROTECTED] wrote: Hi, folks. I'm a Chinese user and using tapestry 5.0.6 + jdk5 I found setting the form attribute enctype=multipart/form-data(when upload a file) will cause text encoding problem in Chinese. Any Idea? TIA best regards! gogo.yuan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] interfaces and coercion
Alexander Turtsevich wrote: i'm developing ajax tree component, providing 2 interfaces to implement: JqTreeKeyPrivider and JqTreeModel but i cant pass classes that implements those interfaces to the component, getting error : Could not find a coercion from type org.example.ajax.components.TreeModel to type org.example.ajax.components.jqtree.JqTreeModel. is there any other way to do it? thanks Howard Lewis Ship wrote: Create an interface for your page, make sure the interface is not in the .pages. package, have the page implement the interface, do the coversion in terms of the interface. It's tricky class loader issues, the EditPgaeModelImpl class known to your services layer is literally not the same class as the one Tapestry uses to instantiate your page (once it gets down rewriting it to fit in with Tapestry's runtime model). that was very helpful - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding rowspan in table header
Hi, I would like to ask is it possible for me to add rowspan in table header by using contrib:table component? Any help given will be greatly appreciated. Thanks in advance. Regards, trainee 24 -- View this message in context: http://www.nabble.com/Adding-rowspan-in-table-header-tf4897415.html#a14026402 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PropertySelection binding bug T-4.1.3 ?
Ok, I got pre-empted but am back. I understand the flames from Andy and I do not mind being torched. I can handle the flames and eventually come out contributing to the drive of this framework in a fruitful user capacity. It's not you guys fault and I have high regard for your priest stewardship to tapestry and tacos/dojo. I will try to clean up my posts. I originally used Integer inside my list private static final Integer[] tableSizeIntegerOptions = new Integer[] { new Integer(1), new Integer(2), new Integer(3), new Integer(4), new Integer(5), new Integer(10), new Integer(25), new Integer(50), new Integer(100), new Integer(500), new Integer(1000), new Integer(2500), new Integer(5000), new Integer(1), new Integer(25000), new Integer(5) }; And OGNL-2.7.1 appears to operate arithmetic on the string property seamlessly. I will convert my property to int and see what that yeilds... but I am wondering why a strihg property would be implicitly interpretted as static. Ok, I will take a closer look and yeild results. Thanks for your patience. Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Wed, 28 Nov 2007 17:46:43 -0500 Jesse, I regard the repsonse. But I need to update the binding on subsequent. I cannot update a static binding. I specified a valif component property as such component id=tableSizeSelect type=PropertySelection binding name=model value=tableSizeModel/ binding name=onchange value=literal:tapestry.form.submit(this.form)//component and @Persist(session) @InitialValue(literal:2) public abstract String getTableSize();public abstract void setTableSize(String tableSize); and span jwcid=@Insert value=Table Size/select jwcid=tableSizeSelect value=ognl:tableSize/ The binding still gets whacked on submit. Event listeners also do not get called. @EventListener(events = { onChange }, targets = { tableSizeSelect }, submitForm = galleryForm, async = false) public void tableChangeListener(IRequestCycle cycle) {} Now I believe I do not have to muck with pumping properties into my home page to get this to work. The only other route is a component cached parameter method which fails also. Has the samples that operate these components been checked recently? I am hoping to see this thru.Best regards Ken in nashuaFrom: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Wed, 28 Nov 2007 15:10:19 -0500The questions is why does the code believe it has no bindings?I have thrown property bindings, page bindings and parameter bindings at this. Nothing sticks?You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. Join in!http://im.live.com/messenger/im/home/?source=CRM_WL_joinnow Your smile counts. The more smiles you share, the more we donate. Join in! _ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM
Re: enctype=multipart/form-data cause encoding problem in Chinese!
yuan gogo wrote: Hasn't this problem been resolved in 5.0.7-snapshot ? It was resolved yesterday - so probably it's not in the snapshot build yet or you havent got the most recent snapshot. You could also checkout the 5.0.6 and apply the patch from https://issues.apache.org/jira/browse/TAPESTRY-1723 (we're using 5.0.6 in production so we had to do this). We're using a (Maven) classifier to distinguish between the patched and unpatched versions (see maven-jar-plugin) Chris -- View this message in context: http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14028577 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: problems when extending DateField. More flexibility needed?
That is a problem; we're seeing a subtle difference between a JavaScript hash and a JSON object. What you want to specify is a hash, because that what's the Calendar wants. This may require a hack on JSONObject. On Nov 28, 2007 8:39 AM, Britske [EMAIL PROTECTED] wrote: Hi, I extended datafield to call a defined callback function in javascript. like so: public class MyDateField extends DateField { protected void configure(JSONObject setup) { setup.put(onUpdate, callOnUpdate); super.configure(setup); } } This puts a nice javascript into my htmls (see below). However I have 2 issues: 1. for a callback function to work with the javascript calendar, I need the text 'callOnUpdate' to be included into the Calendar.setup (see below) WITHOUT quotes. However there's no way I see that I have control of outputting this without quotes. 2. for the defined funciton (callOnUpdate) to be picked up by the Calendar, the function must be in the same script-block as where calendar.setup sits. (At least thats what I conclude after testing this my hand. Im no javascript-guru). Since this block is rendered by DateField I have no possibility of writing the function into the block. Whatwould be the best way to tackel this? Of course, I could totally hack around DataField ( I can't extend much since most is package-private) but I really don't want to. Cheers, Geert-Jan This is what tapestry does: script type=text/javascript !-- Event.observe(window, load, function() { Tapestry.registerForm('form'); Calendar.setup({inputField:a,ifFormat:%d-%m-%y,button:a:trigger,onUpdate:callOnUpdate}); }); // -- /script what i need: script type=text/javascript !-- function callOnUpdate(cal) { alert('do something here'); } Event.observe(window, load, function() { Tapestry.registerForm('form'); Calendar.setup({inputField:a,ifFormat:%d-%m-%y,button:a:trigger,onUpdate:callOnUpdate}); }); // -- /script -- View this message in context: http://www.nabble.com/T5%3A-problems-when-extending-DateField.-More-flexibility-needed--tf4889614.html#a13996007 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 Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OGNL race condition(s) (?)
Hi all, some time ago we had a strange problem with our tapestry application, there was a component repeatedly throwing a ClassCastException, in fact one of this component's parameter was passed a User (interface) object being in that specific case a SimpleUser concrete implementation. When using the component we had SimpleUser ClassCastException on that binding evaluation. The two strange things were that: - the component was working perfectly with our previous application version (note: we were using tapestry 4.0 and OGNL 2.6.9 for our previous application version) - and, definitely smore strange, the component was working perfectly on all our workstations, on our development server and on our test server, the only place where this problem was (always?) occurring was on production whose only difference seemed to me to use a much more powerful server (test server and production server have same os/jvm/tapestry version/libraries/processor architecture/tomcat version) Having not been for this last strange thing, the problem would have been relatively easily solved because in fact was that User interface was missing a (needed) setter that the concrete implementation SimpleUser had. As far as I understand Jesse did a big work to remove/replace java reflection for new OGNL 2.7 so in fact OGNL in this case was more respectful of the declared type and acted consistently. . What I still cannot explain is why the issue was happening just on production and could not be replicated anywhere else (and there goes for the supposed race condition) I'm writing this also because we have now having a similar problem, meaning the the only similarity is the fact that it happens on production server and not on any other host, in fact it looks like an innocuous Exception: Unable to parse OGNL expression 'role.user': source is null for getProperty(null, user) org.apache.tapestry.BindingException Unable to parse OGNL expression 'role.user': source is null for getProperty(null, user) but still: all evidences shows that source shouldn't be null at that point and the bug could not be reproduced outside production server (where it always happens...) I suspect this to be something similar, still investigating. Has anyone incurred in anything similar? Tnx Martino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PropertySelection binding bug T-4.1.3 ?
Ok, I changed my property method signatures to int Everything else shold pan into this as it is all configured in the java as opposed to jwc file. @Persist(session) @InitialValue(ognl:new java.lang.Ingeter('2').intValue()) public abstract int getTableSize(); public abstract void setTableSize(int tableSize); But this yeilds error on boot [ +/- ] Exception: Unable to parse OGNL expression 'new java.lang.Ingeter('5').intValue()': Method new failed for object java.lang.Ingeter I tried specifying @InitialValue(ognl:new java.lang.Ingeter('2')) and receive same error I completely removed the initialization of the property via annotation and got it to boot. (how do I initialize?) In any event... I navigated to the select and selected a selection several indices from within... post occurs... re-render... then value on select gets punched back to original value. The binding continues to fail. The Gallery.script is ommited and turned off. I am just trying to get the standard tapestry binding to work. I guess I will try the method parameter annotation binding? Or the property binding from within the jwc file? But I already tried those and it doesn't even work for a string. I do not understand your theory by immutable for a string... even though I plug a numeric character representing a number into the property... it hsold be treated as a string anyway and be updatable anyway. I am ready to try anything you might suggest at this point. If we can determine if we have a bug here that would help Thanks for your patience. Best regards Ken in nashua _ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline
Re: PropertySelection binding bug T-4.1.3 ?
Hi Ken, @InitialValue(ognl:new java.lang.Ingeter('2').intValue()) A couple of things jump out at me. You misspelled Integer, there is no constructor for Integer that takes a character, and why are you passing a char/String to the Integer constructor when you can just pass the int? Actually, why aren't you just using the number 2 directly? It's been a while since I did anything with T4, but doesn't this work? @InitialValue(2) Josh On Nov 29, 2007 9:37 AM, Ken in nashua [EMAIL PROTECTED] wrote: Ok, I changed my property method signatures to int Everything else shold pan into this as it is all configured in the java as opposed to jwc file. @Persist(session) @InitialValue(ognl:new java.lang.Ingeter('2').intValue()) public abstract int getTableSize(); public abstract void setTableSize(int tableSize); But this yeilds error on boot [ +/- ] Exception: Unable to parse OGNL expression 'new java.lang.Ingeter('5').intValue()': Method new failed for object java.lang.Ingeter I tried specifying @InitialValue(ognl:new java.lang.Ingeter('2')) and receive same error I completely removed the initialization of the property via annotation and got it to boot. (how do I initialize?) In any event... I navigated to the select and selected a selection several indices from within... post occurs... re-render... then value on select gets punched back to original value. The binding continues to fail. The Gallery.script is ommited and turned off. I am just trying to get the standard tapestry binding to work. I guess I will try the method parameter annotation binding? Or the property binding from within the jwc file? But I already tried those and it doesn't even work for a string. I do not understand your theory by immutable for a string... even though I plug a numeric character representing a number into the property... it hsold be treated as a string anyway and be updatable anyway. I am ready to try anything you might suggest at this point. If we can determine if we have a bug here that would help Thanks for your patience. Best regards Ken in nashua _ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: PropertySelection binding bug T-4.1.3 ?
Yes, .or to be safe: @Persist/* session is default persist strategy */ @InitialValue(ognl:2) public abstract int getTableSize(); On Nov 29, 2007 1:03 PM, Josh Canfield [EMAIL PROTECTED] wrote: Hi Ken, @InitialValue(ognl:new java.lang.Ingeter('2').intValue()) A couple of things jump out at me. You misspelled Integer, there is no constructor for Integer that takes a character, and why are you passing a char/String to the Integer constructor when you can just pass the int? Actually, why aren't you just using the number 2 directly? It's been a while since I did anything with T4, but doesn't this work? @InitialValue(2) Josh On Nov 29, 2007 9:37 AM, Ken in nashua [EMAIL PROTECTED] wrote: Ok, I changed my property method signatures to int Everything else shold pan into this as it is all configured in the java as opposed to jwc file. @Persist(session) @InitialValue(ognl:new java.lang.Ingeter('2').intValue()) public abstract int getTableSize(); public abstract void setTableSize(int tableSize); But this yeilds error on boot [ +/- ] Exception: Unable to parse OGNL expression 'new java.lang.Ingeter('5').intValue()': Method new failed for object java.lang.Ingeter I tried specifying @InitialValue(ognl:new java.lang.Ingeter('2')) and receive same error I completely removed the initialization of the property via annotation and got it to boot. (how do I initialize?) In any event... I navigated to the select and selected a selection several indices from within... post occurs... re-render... then value on select gets punched back to original value. The binding continues to fail. The Gallery.script is ommited and turned off. I am just trying to get the standard tapestry binding to work. I guess I will try the method parameter annotation binding? Or the property binding from within the jwc file? But I already tried those and it doesn't even work for a string. I do not understand your theory by immutable for a string... even though I plug a numeric character representing a number into the property... it hsold be treated as a string anyway and be updatable anyway. I am ready to try anything you might suggest at this point. If we can determine if we have a bug here that would help Thanks for your patience. Best regards Ken in nashua _ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PropertySelection binding bug T-4.1.3 ?
Ok, I followed your lead and tried both 1. repaired spelling of integer. Still failed 2. Tried Jesse's version. That failed too @Persist @InitialValue('ognl:2') public abstract int getTableSize(); public abstract void setTableSize(int tableSize); The select comes up with initial selected '1' highlighted blue I navigate and select '4' Post occurs select comes up with initial selected '1' Then it highlights to blue Cannot get this binding to stick. I attached the sources if that helps... might it be this configuration of RenderBlock and Block... Hoping to resume.. thanks for your time.Best regards Ken in nashua _ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtaglinepackage org.trails.demo.components; import java.util.Collection; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tapestry.IAsset; import org.apache.tapestry.IPage; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.IScript; import org.apache.tapestry.annotations.ComponentClass; import org.apache.tapestry.annotations.EventListener; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.InjectScript; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.annotations.Persist; import org.apache.tapestry.form.IPropertySelectionModel; import org.apache.tapestry.form.StringPropertySelectionModel; import org.hibernate.criterion.DetachedCriteria; import org.springframework.dao.DataAccessException; import org.trails.component.TrailsComponent; import org.trails.component.blob.BlobDownloadService; import org.trails.component.blob.TrailsBlobAsset; import org.trails.demo.Listing; import org.trails.descriptor.DescriptorService; import org.trails.page.EditPage; import org.trails.persistence.HibernatePersistenceService; import org.trails.util.IntegerPropertySelectionModel; /** * This guy (tapestry/dojo/json/script oriented widget) renders a gallery. * * Script is facilitated to operate/persist auto-paging. * * @author kenneth.colassi [EMAIL PROTECTED] * */ @ComponentClass(allowBody = true, allowInformalParameters = true) public abstract class Gallery extends TrailsComponent { private static final Log LOG = LogFactory.getLog(Gallery.class); private static final Integer[] tableSizeIntegerOptions = new Integer[] { new Integer(1), new Integer(2), new Integer(3), new Integer(4), new Integer(5), new Integer(10), new Integer(25), new Integer(50), new Integer(100), new Integer(500), new Integer(1000), new Integer(2500), new Integer(5000), new Integer(1), new Integer(25000), new Integer(5) }; private static final String[] tableSizeStringOptions = new String[] { new String(1), new String(2), new String(3), new String(4), new String(5), new String(10), new String(25), new String(50), new String(100), new String(500), new String(1000), new String(2500), new String(5000), new String(1), new String(25000), new String(5) }; private static final Integer[] pagingSpanIntegerOptions = new Integer[] { new Integer(5), new Integer(10), new Integer(15), new Integer(20), new Integer(25) }; private static final String[] pagingSpanStringOptions = new String[] { new String(5), new String(10), new String(15), new String(20), new String(25) }; private IPropertySelectionModel tableSizeModel = null; private IPropertySelectionModel pagingSpanModel = null; private Collection collection = null; /** * E-Frastructure and Services */ @InjectObject(spring:persistenceService) public abstract HibernatePersistenceService getHibernatePersistenceService(); @InjectObject(spring:descriptorService) public abstract DescriptorService getDescriptorService(); @InjectObject(service:trails.core.BlobService) public abstract BlobDownloadService getDownloadService(); @Parameter(required = true) public abstract Class getCollectionType(); public abstract void setCollectionType(Class collectionType); /** * PropertySelection Support */ @Persist @InitialValue(ognl:2) public abstract int getTableSize(); public abstract void setTableSize(int tableSize); @Persist @InitialValue(ognl:5) public abstract int getPagingSpan(); public abstract void setPagingSpan(int pagingSpan); protected void finishLoad() { super.finishLoad(); // parameter initialization, alternative to parameter annotation // defaultValue // setTableSize(2); // setPagingSpan(5); } /** * FOR component Collection Iterator support */ @Parameter(required = false) public abstract int getStartRow(); public abstract void setStartRow(int startRow); public abstract Object getCurrentObject(); public abstract void setCurrentObject(Object CurrentObject); public abstract int getIndex();
Re: T5: radio button
Angelo, You could find an example of radiogroup at the following great site created by SH Man. http://lombok.demon.co.uk/tapestry5Demo/ Cheers, Jeffrey Ai Angelo Chen wrote: Hi, How to use radio/radiogroup? I have following: t:radiogroup value=optn t:id=optn t:radio value=1 / option1 t:radio value=2 / option2 /t:radiogroup my need is, I have a optn property that I like the radiogroup to set based on usr's clicking, any idea? Thanks, A.C. -- View this message in context: http://www.nabble.com/T5%3A-radio-button-tf4895269.html#a14032405 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertySelection binding bug T-4.1.3 ?
Ummm.. In the files you attached you don't have your PropertySelect components value parameters bound ... On Nov 29, 2007 1:49 PM, Ken in nashua [EMAIL PROTECTED] wrote: Ok, I followed your lead and tried both 1. repaired spelling of integer. Still failed 2. Tried Jesse's version. That failed too @Persist @InitialValue('ognl:2') public abstract int getTableSize(); public abstract void setTableSize(int tableSize); The select comes up with initial selected '1' highlighted blue I navigate and select '4' Post occurs select comes up with initial selected '1' Then it highlights to blue Cannot get this binding to stick. I attached the sources if that helps... might it be this configuration of RenderBlock and Block... Hoping to resume.. thanks for your time. Best regards Ken in nashua Your smile counts. The more smiles you share, the more we donate. Join in! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PropertySelection binding bug T-4.1.3 ?
If you want I can zip up the whole trails project and get that to you. I would think at this point it would be helpful to have a running trails runtime for these special instances, for fun and probably for that nasty bug that comes along. Trails would provide you that extra special real world regression. _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
T5: How to remove default.css?
I am using Tapestry 5.0.6 and would like to prevent the default.css from being added to my pages. Since the default.css is contributed as a service in the TapestryModule I do not see a way of preventing this from being added. Please advise if there is a way to customize this? There are a couple of reasons I do not want the default CSS added: * I do not plan on using any of the default styles * I prefer not to have to override the default styles of tapestry components by contributing a style with the same selector in my CSS Thanks, Adam
Re: PropertySelection binding bug T-4.1.3 ?
Are you sure about that? You didn't bind it in any previous html examples you gave. I'm skeptical. On Nov 29, 2007 2:36 PM, Ken in nashua [EMAIL PROTECTED] wrote: Jesse, that binding was specified in the html. No need to duplicate that right?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 13:49:39 -0500 Ok, I followed your lead and tried both 1. repaired spelling of integer. Still failed 2. Tried Jesse's version. That failed too @Persist @InitialValue('ognl:2') public abstract int getTableSize();public abstract void setTableSize(int tableSize); The select comes up with initial selected '1' highlighted blue I navigate and select '4' Post occurs select comes up with initial selected '1' Then it highlights to blue Cannot get this binding to stick. I attached the sources if that helps... might it be this configuration of RenderBlock and Block... Hoping to resume.. thanks for your time.Best regards Ken in nashua Your smile counts. The more smiles you share, the more we donate. Join in! _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007 -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: How to remove default.css?
Not sure if there is an easy way to do it as I don't know the codebase well enough but I would second the opinion that this should be made very easy / obvious to do... (for people that don't care they don't care, but for people that do they will care a ~lot~) On Nov 29, 2007 2:43 PM, Adam Ayres [EMAIL PROTECTED] wrote: I am using Tapestry 5.0.6 and would like to prevent the default.css from being added to my pages. Since the default.css is contributed as a service in the TapestryModule I do not see a way of preventing this from being added. Please advise if there is a way to customize this? There are a couple of reasons I do not want the default CSS added: * I do not plan on using any of the default styles * I prefer not to have to override the default styles of tapestry components by contributing a style with the same selector in my CSS Thanks, Adam -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieve outer component reference from inner component
You could use IPage.getNestedComponent() by calling getPage().getNestedComponent() (http://tapestry.apache.org/tapestry4.1/apidocs/src-html/org/apache/tapestry/IPage.html#line.111) Other than passing the component around as a parameter, is there a reason why you need the reference to it at all? Could you not just call ResponseBuilder.updateComponent(String componentId) ? On Nov 29, 2007 2:08 AM, Henri Dupre [EMAIL PROTECTED] wrote: In my page I have a @Border component and inside a @ImageSubmit that should update (with ajax) a component outside @Border. I did some searches here, the only method that was suggested is to pass component references though parameters but this would be quite ugly because there is quite a bit of complex nesting involved. What other methods could I use? Thanks Henri Dupre Actualis Center -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PropertySelection binding bug T-4.1.3 ?
This is what I receive when I uncomment the binding in the jwc file [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. It has to be in one place not both. Are you implying I need to define a getValue method in my java file? I always thought I could leverage the inherited binding automatically. Any further thoughts? Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 14:40:25 -0500 If you want I can zip up the whole trails project and get that to you. I would think at this point it would be helpful to have a running trails runtime for these special instances, for fun and probably for that nasty bug that comes along. Trails would provide you that extra special real world regression. Connect and share in new ways with Windows Live. Connect now! _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
RE: PropertySelection binding bug T-4.1.3 ?
Well so much for possible bug/jira issue... Is there a working sample that exercises PropertySelection bindings as documented in T-4.1.3 that I can operate. I mean a sample that you have confirmed is currently operating the way it should. Likewise I will produce a sample to try and present this as a bug. Thanks for trying. Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 15:21:58 -0500 This is what I receive when I uncomment the binding in the jwc file [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. It has to be in one place not both. Are you implying I need to define a getValue method in my java file? I always thought I could leverage the inherited binding automatically.Any further thoughts?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 14:40:25 -0500 If you want I can zip up the whole trails project and get that to you. I would think at this point it would be helpful to have a running trails runtime for these special instances, for fun and probably for that nasty bug that comes along. Trails would provide you that extra special real world regression. Connect and share in new ways with Windows Live. Connect now! Connect and share in new ways with Windows Live. Connect now! _ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM
Re: PropertySelection binding bug T-4.1.3 ?
I have no ideaSounds like you need to isolate your problem. Put your gallery widget in a very basic page somewhere with as little extra stuff as possible and play around with your parameters / values. Either way you ~must~ specify a value parameter for your PropertySelection component if you want it to bind a submitted value to something. On Nov 29, 2007 3:21 PM, Ken in nashua [EMAIL PROTECTED] wrote: This is what I receive when I uncomment the binding in the jwc file [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. It has to be in one place not both. Are you implying I need to define a getValue method in my java file? I always thought I could leverage the inherited binding automatically. Any further thoughts? Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 14:40:25 -0500 If you want I can zip up the whole trails project and get that to you. I would think at this point it would be helpful to have a running trails runtime for these special instances, for fun and probably for that nasty bug that comes along. Trails would provide you that extra special real world regression. Connect and share in new ways with Windows Live. Connect now! _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007 -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4] why/when use the external service
Hi List, I don't really understand when one should use the ExternalService and what exactly it is good for. According to the JavaDocs and TiA the external service enables me to bookmark pages and pass parameters to them. But according to my understanding I can create a bookmark to every page in a Tapestry application regardless of whether it implements IExternalPage or not. And for the parameters: If I rely on the mechanisms provided by the ExternalService the URL parameters to this page have to be in an exact order. If I instead used getRequestCycle().getParameter() I can work with named parameters. So where is the difference between a normal page that doesn't implement IExternalPage and doesn't get accessed through the external service and one that is? Cheers, Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertySelection binding bug T-4.1.3 ?
Sure, There are 3 examples here that work: http://tapestry.apache.org/tapestry4.1/components/form/propertyselection.html You can also look at the Workbench demo which also uses them: http://opencomponentry.com:8080/workbench/app (source: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/ ) I can assure you that PropertySelection works just fine. On Nov 29, 2007 3:39 PM, Ken in nashua [EMAIL PROTECTED] wrote: Well so much for possible bug/jira issue... Is there a working sample that exercises PropertySelection bindings as documented in T-4.1.3 that I can operate. I mean a sample that you have confirmed is currently operating the way it should. Likewise I will produce a sample to try and present this as a bug. Thanks for trying. Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 15:21:58 -0500 This is what I receive when I uncomment the binding in the jwc file [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. It has to be in one place not both. Are you implying I need to define a getValue method in my java file? I always thought I could leverage the inherited binding automatically.Any further thoughts?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: PropertySelection binding bug T-4.1.3 ?Date: Thu, 29 Nov 2007 14:40:25 -0500 If you want I can zip up the whole trails project and get that to you. I would think at this point it would be helpful to have a running trails runtime for these special instances, for fun and probably for that nasty bug that comes along. Trails would provide you that extra special real world regression. Connect and share in new ways with Windows Live. Connect now! Connect and share in new ways with Windows Live. Connect now! _ You keep typing, we keep giving. Download Messenger and join the i'm Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Complex NPE in org.apache.tapestry.internal.util.Base64InputStream
I'm still having an issue with this. Is there a quick fix or workaround? Or any idea where I should insert a hack? Summary: You log into your app and an ASO is created for you You land on a page that has a form You wait until your session times out (automatically) You click the form submit. Your app redirects you to a login page, to get your ASO On success the app redirects you to your form submit request, which is a form.OnAction Tapestry gives you a NPE when trying to decode a null gzip'd stream I am using T5.0.5 On Aug 23, 2007 1:56 AM, Daniel Jue [EMAIL PROTECTED] wrote: I'll try my best to explain the situation, but please ask if you think other details would help determine the problem. I am using Acegi--with great success so far. When a user logs in and gets authenticated via Acegi, an ASO is created for the user, holding the user details, etc. I have a form in a component. For simplicity, this form has only one item-a select/dropdown. The submit is handled through an onChange event that gets coded into the select. Here is the case: A logged in user can change the select box selection, and the method for the OnChange will 1st. Check to make sure the user's aso exists 2nd. Save the selection to the ASO if the ASO exists Let's say a user somehow gets logged out, either by timing out or opening another window and logging out. Now on the page that still displays the form, the user makes a selection. The application immediately takes me to my login form page, as defined in Acegi. The user enters their information and then it's suppose to redirect them back to the refering url as far as I understand. But instead after logging in, applications gives me a NPE in a section of Tapestry Internal that I don't understand. Interestingly, if I manage to put in a url, say, back to the start page, I see that the user is logged in. So the login/creation of the ASO _did_ happen. Something else was going on here Here is the stack trace: An unexpected application exception has occurred. * org.apache.tapestry.ioc.internal.util.TapestryException * java.lang.NullPointerException Stack trace o org.apache.tapestry.internal.util.Base64InputStream.decode(Base64InputStream.java:34) o org.apache.tapestry.internal.util.Base64InputStream.init(Base64InputStream.java:29) o org.apache.tapestry.internal.util.Base64ObjectInputStream.init(Base64ObjectInputStream.java:30) o org.apache.tapestry.corelib.components.Form.onAction(Form.java:355) o org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent(ComponentPageElementImpl.java:893) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:998) o org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle(ComponentActionRequestHandlerImpl.java:81) o org.apache.tapestry.internal.services.InternalModule$11.handle(InternalModule.java:541) o org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch(ComponentActionDispatcher.java:116) o org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:1066) o myapp.wui.tapestry.services.AppModule$1.service(AppModule.java:71) o org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) o org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:657) o org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:97) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:88) o org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) o org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110) o org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1044) o org.apache.tapestry.upload.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:42) o org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) o org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) o org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) o org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) o
Re: T5 Complex NPE in org.apache.tapestry.internal.util.Base64InputStream
I recall seeing something about this on the list before. I believe the problem is that ACEGI isn't posting the form data on the redirect. This sounds like your problem: https://issues.apache.org/jira/browse/TAPESTRY-1780 Josh On Nov 29, 2007 1:49 PM, Daniel Jue [EMAIL PROTECTED] wrote: I'm still having an issue with this. Is there a quick fix or workaround? Or any idea where I should insert a hack? Summary: You log into your app and an ASO is created for you You land on a page that has a form You wait until your session times out (automatically) You click the form submit. Your app redirects you to a login page, to get your ASO On success the app redirects you to your form submit request, which is a form.OnAction Tapestry gives you a NPE when trying to decode a null gzip'd stream I am using T5.0.5 On Aug 23, 2007 1:56 AM, Daniel Jue [EMAIL PROTECTED] wrote: I'll try my best to explain the situation, but please ask if you think other details would help determine the problem. I am using Acegi--with great success so far. When a user logs in and gets authenticated via Acegi, an ASO is created for the user, holding the user details, etc. I have a form in a component. For simplicity, this form has only one item-a select/dropdown. The submit is handled through an onChange event that gets coded into the select. Here is the case: A logged in user can change the select box selection, and the method for the OnChange will 1st. Check to make sure the user's aso exists 2nd. Save the selection to the ASO if the ASO exists Let's say a user somehow gets logged out, either by timing out or opening another window and logging out. Now on the page that still displays the form, the user makes a selection. The application immediately takes me to my login form page, as defined in Acegi. The user enters their information and then it's suppose to redirect them back to the refering url as far as I understand. But instead after logging in, applications gives me a NPE in a section of Tapestry Internal that I don't understand. Interestingly, if I manage to put in a url, say, back to the start page, I see that the user is logged in. So the login/creation of the ASO _did_ happen. Something else was going on here Here is the stack trace: An unexpected application exception has occurred. * org.apache.tapestry.ioc.internal.util.TapestryException * java.lang.NullPointerException Stack trace o org.apache.tapestry.internal.util.Base64InputStream.decode( Base64InputStream.java:34) o org.apache.tapestry.internal.util.Base64InputStream.init( Base64InputStream.java:29) o org.apache.tapestry.internal.util.Base64ObjectInputStream.init( Base64ObjectInputStream.java:30) o org.apache.tapestry.corelib.components.Form.onAction(Form.java:355) o org.apache.tapestry.corelib.components.Form.handleComponentEvent( Form.java) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent (ComponentPageElementImpl.java:893) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent (ComponentPageElementImpl.java:998) o org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle (ComponentActionRequestHandlerImpl.java:81) o org.apache.tapestry.internal.services.InternalModule$11.handle( InternalModule.java:541) o org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch (ComponentActionDispatcher.java:116) o org.apache.tapestry.services.TapestryModule$12.service( TapestryModule.java:1066) o myapp.wui.tapestry.services.AppModule$1.service(AppModule.java:71) o org.apache.tapestry.internal.services.LocalizationFilter.service( LocalizationFilter.java:43) o org.apache.tapestry.services.TapestryModule$2.service( TapestryModule.java:657) o org.apache.tapestry.internal.services.StaticFilesFilter.service( StaticFilesFilter.java:63) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:97) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:88) o org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead( ConcurrentBarrier.java:77) o org.apache.tapestry.internal.services.CheckForUpdatesFilter.service( CheckForUpdatesFilter.java:110) o org.apache.tapestry.services.TapestryModule$11.service( TapestryModule.java:1044) o org.apache.tapestry.upload.services.MultipartServletRequestFilter.service( MultipartServletRequestFilter.java:42) o
Re: Dynamic pages (or: arguments to pages) [T4]
On 29.11.2007, at 11:02, Ulrich Stärk wrote: These are just guesses, I haven't tried them nor verified them. I could imagine that the parameter isn't available via the WebRequest because the page didn't get called by a GET request directly but with the help of the service encoder, so your parameter isn't there anymore when the page get's rendered. Try to get hold of the IRequestCycle by calling getRequestCycle() and call getParameter on it. I wouldn't be surprised if it's in there. Hi Uli, That was it! It turns out that the @InjectObject(infrastructure:request) public abstract WebRequest getRequest(); is not needed anymore with this solution. Thanks a lot for the help, Kaspar P.S. For the sake of completeness, here is the complete solution -- in case somebody else needs it. public abstract class MyPage extends BasePage implements PageBeginRenderListener { public void pageBeginRender(PageEvent event) { super.pageBeginRender(event); // find out the node we're suppost to show IRequestCycle cycle = getRequestCycle(); String myParam = cycle.getParameter(myParam); } // ... } public class KCNodeServiceEncoder implements ServiceEncoder { // ... public void decode(ServiceEncoding encoding) { // ... (get parameter value from URL) encoding.setParameterValue(myParam, value); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Cannot persist field exception
So I've finally narrowed it down to the Palette component the page uses. When I remove the Palette it doesn't give errors. When its on screen I get errors. This is the error I now get when I try and submit the form... java.lang.NullPointerException Stack trace * org.apache.tapestry.corelib.components.Palette.processSubmission(Palette.jav a:326) * org.apache.tapestry.corelib.base.AbstractField.processSubmission(AbstractFie ld.java:200) * org.apache.tapestry.corelib.base.AbstractField.access$100(AbstractField.java :45) * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execu te(AbstractField.java:114) * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execu te(AbstractField.java:108) * org.apache.tapestry.corelib.components.Form.onAction(Form.java:364) * org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java) ... What could be wrong with the Palette to cause this? Thanks Jean-Philippe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Complex NPE in org.apache.tapestry.internal.util.Base64InputStream
That would make sense, the URL is for a form submission, a kind of component action event. Is there a way to configure ACEGI with a specific URL, i.e., a page render URL (which would be more appropriate). On Nov 29, 2007 2:37 PM, Josh Canfield [EMAIL PROTECTED] wrote: I recall seeing something about this on the list before. I believe the problem is that ACEGI isn't posting the form data on the redirect. This sounds like your problem: https://issues.apache.org/jira/browse/TAPESTRY-1780 Josh On Nov 29, 2007 1:49 PM, Daniel Jue [EMAIL PROTECTED] wrote: I'm still having an issue with this. Is there a quick fix or workaround? Or any idea where I should insert a hack? Summary: You log into your app and an ASO is created for you You land on a page that has a form You wait until your session times out (automatically) You click the form submit. Your app redirects you to a login page, to get your ASO On success the app redirects you to your form submit request, which is a form.OnAction Tapestry gives you a NPE when trying to decode a null gzip'd stream I am using T5.0.5 On Aug 23, 2007 1:56 AM, Daniel Jue [EMAIL PROTECTED] wrote: I'll try my best to explain the situation, but please ask if you think other details would help determine the problem. I am using Acegi--with great success so far. When a user logs in and gets authenticated via Acegi, an ASO is created for the user, holding the user details, etc. I have a form in a component. For simplicity, this form has only one item-a select/dropdown. The submit is handled through an onChange event that gets coded into the select. Here is the case: A logged in user can change the select box selection, and the method for the OnChange will 1st. Check to make sure the user's aso exists 2nd. Save the selection to the ASO if the ASO exists Let's say a user somehow gets logged out, either by timing out or opening another window and logging out. Now on the page that still displays the form, the user makes a selection. The application immediately takes me to my login form page, as defined in Acegi. The user enters their information and then it's suppose to redirect them back to the refering url as far as I understand. But instead after logging in, applications gives me a NPE in a section of Tapestry Internal that I don't understand. Interestingly, if I manage to put in a url, say, back to the start page, I see that the user is logged in. So the login/creation of the ASO _did_ happen. Something else was going on here Here is the stack trace: An unexpected application exception has occurred. * org.apache.tapestry.ioc.internal.util.TapestryException * java.lang.NullPointerException Stack trace o org.apache.tapestry.internal.util.Base64InputStream.decode( Base64InputStream.java:34) o org.apache.tapestry.internal.util.Base64InputStream.init( Base64InputStream.java:29) o org.apache.tapestry.internal.util.Base64ObjectInputStream.init( Base64ObjectInputStream.java:30) o org.apache.tapestry.corelib.components.Form.onAction(Form.java:355) o org.apache.tapestry.corelib.components.Form.handleComponentEvent( Form.java) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent (ComponentPageElementImpl.java:893) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent (ComponentPageElementImpl.java:998) o org.apache.tapestry.internal.services.ComponentActionRequestHandlerImpl.handle (ComponentActionRequestHandlerImpl.java:81) o org.apache.tapestry.internal.services.InternalModule$11.handle( InternalModule.java:541) o org.apache.tapestry.internal.services.ComponentActionDispatcher.dispatch (ComponentActionDispatcher.java:116) o org.apache.tapestry.services.TapestryModule$12.service( TapestryModule.java:1066) o myapp.wui.tapestry.services.AppModule$1.service(AppModule.java:71) o org.apache.tapestry.internal.services.LocalizationFilter.service( LocalizationFilter.java:43) o org.apache.tapestry.services.TapestryModule$2.service( TapestryModule.java:657) o org.apache.tapestry.internal.services.StaticFilesFilter.service( StaticFilesFilter.java:63) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:97) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:88) o org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead( ConcurrentBarrier.java:77) o
Re: T5: How to remove default.css?
There's two options: 1) Add a configuration value that would turn off the contribution of default.css. Your page (or layout component) would then provide appropriate CSS. 2) Allow replacement of default.css with some other file (or files?). What do people think is the best option? I'd prefer, personally, that people help with default.css, fixing any problems (such as the issue with IE). On a related note ... I've put a big experiment into place just now, with fields validating as you tab out of them, and using a kind of popup bubble to identify the error. It's really neat, though it may need some tweaking for cases where there are a huge number of errors on the page. I'm still working on the graphics for the popup bubble and related styles (in default.css). On Nov 29, 2007 12:34 PM, Daniel Jue [EMAIL PROTECTED] wrote: This would be very nice. I understand the usable defaults point of view, but sometimes I'd rather not deal with default.css raising it's head during development. Maybe there is a way to configure default assets in the AppModule? That way we could just change the default contribution that would come with the Tapestry jar. Daniel On Nov 29, 2007 3:07 PM, Jesse Kuhnert [EMAIL PROTECTED] wrote: Not sure if there is an easy way to do it as I don't know the codebase well enough but I would second the opinion that this should be made very easy / obvious to do... (for people that don't care they don't care, but for people that do they will care a ~lot~) On Nov 29, 2007 2:43 PM, Adam Ayres [EMAIL PROTECTED] wrote: I am using Tapestry 5.0.6 and would like to prevent the default.css from being added to my pages. Since the default.css is contributed as a service in the TapestryModule I do not see a way of preventing this from being added. Please advise if there is a way to customize this? There are a couple of reasons I do not want the default CSS added: * I do not plan on using any of the default styles * I prefer not to have to override the default styles of tapestry components by contributing a style with the same selector in my CSS Thanks, Adam -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - 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] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Cannot persist field exception
Don't see anything obvious, he Palette itself does not have any persistent fields. It must be some parameter of the Palette, tied to a persistent field in some way. On Nov 29, 2007 3:40 PM, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: So I've finally narrowed it down to the Palette component the page uses. When I remove the Palette it doesn't give errors. When its on screen I get errors. This is the error I now get when I try and submit the form... java.lang.NullPointerException Stack trace * org.apache.tapestry.corelib.components.Palette.processSubmission(Palette.jav a:326) * org.apache.tapestry.corelib.base.AbstractField.processSubmission(AbstractFie ld.java:200) * org.apache.tapestry.corelib.base.AbstractField.access$100(AbstractField.java :45) * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execu te(AbstractField.java:114) * org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execu te(AbstractField.java:108) * org.apache.tapestry.corelib.components.Form.onAction(Form.java:364) * org.apache.tapestry.corelib.components.Form.handleComponentEvent(Form.java) ... What could be wrong with the Palette to cause this? Thanks Jean-Philippe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Is Persist(conversation) planned? Please?
Of course, nothing prevents one writing a semi-automatic workspace management layer on top of Seam that would take care of detecting and closing abandoned conversations (for example, along the lines I suggested on the Trails list). The Seam guys have carefully removed any dependencies to JSF. In practice, integrating Tap5 with Seam might be the fastest way of getting practical results for a conversational scope, and wouldn't solve only one but two problems at the same time (conversations and session-per-conversation), of course at the expense of tying the implementation more closely with Hibernate or at least JPA, but that's probably what the majority is using anyway. I'm sure the Seam guys would love to see Tapestry support for Seam. And btw, Wicket guys have already done this. Given that you Geoff are probably inclined to use J2EE container anyway, wouldn't it make sense to you to start looking at creating tapestry-seam integration project? It might be an interesting project to take on for me as well. Kalle On 11/28/07, Kalle Korhonen [EMAIL PROTECTED] wrote: I completely agree with Geoff that a good-enough generic support for conversations could make developing web applications much easier and it's one of the remaining big issues that web frameworks typically don't offer a solution for out-of-the-box. Seam's got a solution that works well for typical enterprise apps that may have high amount of interaction with the database but don't have a huge number of users. While Seam ignores the problem of closing abandoned conversations, it'll quickly lead to much higher memory consumption as open conversations generally occupy memory until explicitly closed or the session is expired. There's been various tries at solving the conversation support for Tapestry and we are planning on supporting conversation in Trails with a tighter memory management model for better scalability. I've written some notes on session-per-conversation at http://archive.trails.codehaus.org/users/[EMAIL PROTECTED]'s relevant for this discussion as well. For Tap5, you can of course come up with your own solution, but it'd be great if the framework had a generic support for conversations that would work well enough in the most common cases out-of-the-box and could be extended. Kalle On 11/28/07, Thiago HP [EMAIL PROTECTED] wrote: On 11/28/07, Francois Armand [EMAIL PROTECTED] wrote: I completely agree with your remarks, and it's a kind of pity that T5 is such in advance in so many areas, and in the same time have to deals by hand with that. Let's not forget that Tapestry 5 is still alpha and there are other areas needing work too, AJAX being one of the most anticipated ones. In addition, it has a very flexible architecture that allows developers (Howard, other T5 comitters or me or you) to implement any missing feature. ;) Thiago
RE: T5: How to remove default.css?
My preference would be for the first option, and then if I want to add my own default CSS then I could contribute a service similar to the one used currently for the Tapestry default.css or by some other means. My desire to not use the default.css is not due to any bugs with the Tapestry CSS, but rather that the base tapestry components in the context of the application I am developing need to closely match their surroundings. I am happy to contribute any fixes I find in the Tapestry default.css. The client side validation on blur sounds very interesting. I was thinking that another type of validation for the form might be allowed through Ajax. A JavaScript event listener on the forms submits would trigger an Ajax call to some action in the form component that returns the error component (as a zone replacement?) when validation fails, or continues with the form submit if it passes validation. The only real savings here is that the user does not have to suffer through a page refresh if validation fails (when client validation is disabled). This might be useful in the case where the validation of a field is hard to mimic in the Tapestry.Validator JavaScript (does JavaScript's regex implementation map one to one to Java's regex?). Adam -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Thursday, November 29, 2007 5:01 PM To: Tapestry users Subject: Re: T5: How to remove default.css? There's two options: 1) Add a configuration value that would turn off the contribution of default.css. Your page (or layout component) would then provide appropriate CSS. 2) Allow replacement of default.css with some other file (or files?). What do people think is the best option? I'd prefer, personally, that people help with default.css, fixing any problems (such as the issue with IE). On a related note ... I've put a big experiment into place just now, with fields validating as you tab out of them, and using a kind of popup bubble to identify the error. It's really neat, though it may need some tweaking for cases where there are a huge number of errors on the page. I'm still working on the graphics for the popup bubble and related styles (in default.css). On Nov 29, 2007 12:34 PM, Daniel Jue [EMAIL PROTECTED] wrote: This would be very nice. I understand the usable defaults point of view, but sometimes I'd rather not deal with default.css raising it's head during development. Maybe there is a way to configure default assets in the AppModule? That way we could just change the default contribution that would come with the Tapestry jar. Daniel On Nov 29, 2007 3:07 PM, Jesse Kuhnert [EMAIL PROTECTED] wrote: Not sure if there is an easy way to do it as I don't know the codebase well enough but I would second the opinion that this should be made very easy / obvious to do... (for people that don't care they don't care, but for people that do they will care a ~lot~) On Nov 29, 2007 2:43 PM, Adam Ayres [EMAIL PROTECTED] wrote: I am using Tapestry 5.0.6 and would like to prevent the default.css from being added to my pages. Since the default.css is contributed as a service in the TapestryModule I do not see a way of preventing this from being added. Please advise if there is a way to customize this? There are a couple of reasons I do not want the default CSS added: * I do not plan on using any of the default styles * I prefer not to have to override the default styles of tapestry components by contributing a style with the same selector in my CSS Thanks, Adam -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - 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] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - 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: enctype=multipart/form-data cause encoding problem in Chinese!
Today I download the lastest t5.0.7 snapshot. It seems the patch has been applied. But another problem arised! I get the following error: the charset encoding is NULL java.lang.NullPointerException: charsetName java.lang.String.init(String.java:442) java.lang.String.init(String.java:516) org.apache.commons.fileupload.disk.DiskFileItem.getString(DiskFileItem.java:349) org.apache.tapestry.upload.services.MultipartDecoderImpl.processFileItems(MultipartDecoderImpl.java:117) org.apache.tapestry.upload.services.MultipartDecoderImpl.decode(MultipartDecoderImpl.java:65) $MultipartDecoder_1168eb00c3b.decode($MultipartDecoder_1168eb00c3b.java) $MultipartDecoder_1168eb00bee.decode($MultipartDecoder_1168eb00bee.java) org.apache.tapestry.upload.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:40) $HttpServletRequestHandler_1168eb00bf0.service($HttpServletRequestHandler_1168eb00bf0.java) $HttpServletRequestHandler_1168eb00bed.service($HttpServletRequestHandler_1168eb00bed.java) org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164) 2007/11/29, Christian Köberl POI [EMAIL PROTECTED]: yuan gogo wrote: Hasn't this problem been resolved in 5.0.7-snapshot ? It was resolved yesterday - so probably it's not in the snapshot build yet or you havent got the most recent snapshot. You could also checkout the 5.0.6 and apply the patch from https://issues.apache.org/jira/browse/TAPESTRY-1723 (we're using 5.0.6 in production so we had to do this). We're using a (Maven) classifier to distinguish between the patched and unpatched versions (see maven-jar-plugin) Chris -- View this message in context: http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14028577 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: radio button
Hi Jeffrey, good link, it solves my problem, thanks. jeffrey ai wrote: Angelo, You could find an example of radiogroup at the following great site created by SH Man. http://lombok.demon.co.uk/tapestry5Demo/ -- View this message in context: http://www.nabble.com/T5%3A-radio-button-tf4895269.html#a14039292 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]