Re: COMBINE_SCRIPTS no effect
Does it mean that the stuff that is injected into components via @IncludeJavaScriptLibrary is not combined? Does this make sense? Also in the pages where no script combination takes place I can see all the links to tapestry.js, effects.js and other standard scripts. Is this correct? Remember that on other pages (of the same application) everything is integrated in one big js file. M. Am 29.06.2009 um 18:11 schrieb Howard Lewis Ship: It depends on how the scripts are added to the head; only scripts added via RenderSupport.addScriptLink() will be combined; in addition, combination is turned off in development mode (by default). On Mon, Jun 29, 2009 at 6:59 AM, Moritz Gmelin moritz.gme...@avetana.de wrote: Hi, I just found out that some of our pages do generate a number of JS head elements. Although configuration.add(SymbolConstants.COMBINE_SCRIPTS, true); is given in contributeApplicationDefaults Other pages do correctly combine all scripts in a single .js file with a very long file name. Is this a known issue or a feature that I do not understand yet? Thanks Moritz -- Dipl.-Inform. Moritz Gmelin avetana GmbH Geschäftsführer Brändströmstr. 8 76275 Ettlingen Tel: 07000-AVETANA (07000-2838262) eMail: moritz.gme...@avetana.de Internet: www.avetana-gmbh.de Geschäftsführer: Moritz Gmelin Sitz der Gesellschaft: Ettlingen Amtsgericht Mannheim HRB 362834 UST-ID DE211535427 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
Re: Validating nested loops with helper classes
nille hammer schrieb: This looks to me as if you were displaying all users that are allready assigned to a Job in a select box. Correct, one user per SelectBox. You´d need a select box with the UN-assigned users to make it possible to add new ones to the Job. The number of users and the number of jobs may grow quite large, but the number of users per job is always small. So I decided to display one SelectBox per assignment. This select box should be a multi select box. A multi select box would be too large because of the large number of users and jobs. Regards Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Validating nested loops with helper classes
On Mon, 29. Jun 2009, Stephan Windmüller wrote: The site is used to assign users to jobs. Each job has a java.util.List of users assigned to it. Of course a user should not be assigned twice to a job. To clarify this I modified the example from http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects - SelectTest.java package de.ls5.ocs.webclient.tapestry.pages; import java.util.ArrayList; import java.util.List; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.ioc.services.PropertyAccess; import de.ls5.ocs.backend.ConferenceController; import de.ls5.ocs.backend.User; import de.ls5.ocs.webclient.tapestry.services.GenericSelectModel; import de.ls5.ocs.webclient.tapestry.util.ASO; public class SelectTest { @Persist private ListUser assignments; @Inject private PropertyAccess _access; @Persist @Property private User selectedUser; @Inject private ConferenceController conferenceController; private GenericSelectModelUser selectableUsers; void onActivate() { System.out.println(OnActivate); if (assignments == null) { User emptyUSer = new User(None, Undecided, none); System.out.println(Filling List); assignments = new ArrayListUser(); assignments.add(emptyUSer); assignments.add(emptyUSer); assignments.add(emptyUSer); } else { System.out.println(List was already filled with + assignments.size() + elements.); } // Getting NullPointerException if this is missing. Why? if (selectedUser == null) { System.out.println(Setting selectedUser); selectedUser = new User(bla); } } public SelectTest(){ selectableUsers = new GenericSelectModelUser(DAO.getAllUsers(),User.class,fullName,id,_access); } public ListUser getAssignments(){ return assignments; } public void setAssignments(ListUser assignments){ this.assignments = assignments; } public GenericSelectModelUser getSelectableUsers(){ return selectableUsers; } } SelectTest.tml html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head meta http-equiv=content-type content=text/html; charset=utf-8/ titleSelect test/title /head body style=font-family:Courier new form t:type=Form table tr t:type=loop t:source=assignments t:encoder=selectableUsers t:value=selectedUser td t:select model=selectableUsers encoder=selectableUsers value=selectedUser/ /td /tr /table t:submit/ /form value: ${assignments} /body /html - As long as I do not use a List to store the objects, all works fine. But when I submit the form above, it always resets and the list consists of undecided users. Regards Stephan smime.p7s Description: S/MIME cryptographic signature
Re: Re: Re: access component variable
I tried using Environment and it works..but i have a doubt A and B both are defined as component in my page... code snippet is like : page.java @Component private A a; @Component private B b; void beforeRender() { envoronment.push(A.class,a); } void afterRender() { environment.pop(A.class); } so does this ensure that when component B is called and i try to peek A from environment...A would already have been initialized and executed, so that i get valid ID ? nille hammer wrote: Hi Cid, I have just been to the toilett and have thought about your question. Maybe you could nest component B in component A directly rather than in the page? Example follows: in page.tml ... t:a .../ ... in a.tml ... render the stuff from a t:b parameter=valueFromA ... Would that be an option? Regards, nillehammer == http://www.winfonet.eu - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/access-component-variable-tp24240467p24269099.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Announce] Tapestry Testify project
So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). Thanks Paul, up and running now! please keep me posted once you have the pom sorted. The latest snapshot's POM should pull in tapestry-test for you transitively. I've also made a change so that the Testify module doesn't get automatically picked up by Tapestry - so this should prevent it wiring itself into a running application by accident. This should be a backward-compatible change that should make no difference to your tests. But if it does let me know :-) Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: Re: Re: access component variable
nille hammer wrote: Hi Cid, I have just been to the toilett and have thought about your question. Maybe you could nest component B in component A directly rather than in the page? Example follows: in page.tml ... t:a .../ ... in a.tml ... render the stuff from a t:b parameter=valueFromA how can i get value from A ? suppose A has variable private String ID; public String getId() { return ID; } can i use t:b ID=Id ? ... Would that be an option? Regards, nillehammer == http://www.winfonet.eu - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/access-component-variable-tp24240467p24269162.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Announce] Tapestry Testify project
The latest snapshot's POM should pull in tapestry-test for you transitively. The latest snapshot's POM should pull in tapestry-test for you transitively. Great stuff, it seems to work, thanks Paul! - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Tuesday, 30 June, 2009 12:54:56 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). Thanks Paul, up and running now! please keep me posted once you have the pom sorted. The latest snapshot's POM should pull in tapestry-test for you transitively. I've also made a change so that the Testify module doesn't get automatically picked up by Tapestry - so this should prevent it wiring itself into a running application by accident. This should be a backward-compatible change that should make no difference to your tests. But if it does let me know :-) Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5: Enabling disabled datefield
Hi! Is there a way to submit datefield, which has attribute disabled=true in template but was enabled using JavaScript on page. Currently enabling field using JS does nothing and datefield is not submitted, although it should IMHO. Or is there some other way to have field disabled by default, but with possibility of enabling it and submitting its value? Example: --- template --- t:checkbox t:id=enableDate t:value=dateEnabled onclick=$('date').disabled = !$('date').disabled; / t:datefield t:id=date t:value=date t:format=-MM-dd t:disabled=true / --- page class --- private Date date; public Date getDate() { return date; } public void setDate(Date date) { log(date, startDate); this.date = date; } In code above setDate() is not called, even though datefield was enabled using JS. Regards, Przemysław Wojnowski - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: COMBINE_SCRIPTS no effect
@IncludeJavaScriptLibrary uses RenderSupport under the covers; I meant when your Layout.tml includes script src= elements. Those are not recognized by Tapestry and are not aggregated. On Mon, Jun 29, 2009 at 11:43 PM, Moritz Gmelin moritz.gme...@gmx.dewrote: Does it mean that the stuff that is injected into components via @IncludeJavaScriptLibrary is not combined? Does this make sense? Also in the pages where no script combination takes place I can see all the links to tapestry.js, effects.js and other standard scripts. Is this correct? Remember that on other pages (of the same application) everything is integrated in one big js file. M. Am 29.06.2009 um 18:11 schrieb Howard Lewis Ship: It depends on how the scripts are added to the head; only scripts added via RenderSupport.addScriptLink() will be combined; in addition, combination is turned off in development mode (by default). On Mon, Jun 29, 2009 at 6:59 AM, Moritz Gmelin moritz.gme...@avetana.de wrote: Hi, I just found out that some of our pages do generate a number of JS head elements. Although configuration.add(SymbolConstants.COMBINE_SCRIPTS, true); is given in contributeApplicationDefaults Other pages do correctly combine all scripts in a single .js file with a very long file name. Is this a known issue or a feature that I do not understand yet? Thanks Moritz -- Dipl.-Inform. Moritz Gmelin avetana GmbH Geschäftsführer Brändströmstr. 8 76275 Ettlingen Tel: 07000-AVETANA (07000-2838262) eMail: moritz.gme...@avetana.de Internet: www.avetana-gmbh.de Geschäftsführer: Moritz Gmelin Sitz der Gesellschaft: Ettlingen Amtsgericht Mannheim HRB 362834 UST-ID DE211535427 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
[Tapestry Central] Public Tapestry Training in London: Aug 10 - 12
Formos is partnering with London-based SkillsMatter to provide open enrollment Tapestry training. The training will take place at the SkillsMatter offices in downtown London. This is the same course materials that I use for my on-site Tapestry training ... and I'll be debuting a new lab on Ajax techniques. -- Posted By Howard to Tapestry Central at 6/30/2009 10:33:00 AM
Re: COMBINE_SCRIPTS no effect
Well, then it seems that there is something wrong. As I said on some pages of the application I can see a header like this (correct) !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html xmlns=http://www.w3.org/1999/xhtml;headtitleAvetana Patientenakte/titlemeta content=text/html; charset=UTF-8 http- equiv=Content-Type/metalink type=text/css rel=stylesheet href=/avetanafile/assets/tapestry/5.1.0.5/default.css/linklink type=text/css rel=stylesheet href=/avetanafile/assets/blackbird/ 5.1.0.5/blackbird.css/linklink type=text/css rel=stylesheet href=/avetanafile/assets/classpath/ded21e67620ae96/assets/css/ patientenakte.css/linklink type=text/css rel=stylesheet href=/avetanafile/assets/classpath/ded21e67620ae96/assets/css/ startpage.css/linklink href=/avetanafile/assets/classpath/ ded21e67620ae96/assets/default/default.ico rel=shortcut icon/ linklink href=/avetanafile/assets/classpath/ded21e67620ae96/apple- touch-icon.png rel=apple-touch-icon/linkmeta content=Apache Tapestry Framework (version 5.1.0.5) name=generator/metascript src=/avetanafile/assets/virtual/ H4sIAIXPQQrCMBCF4XGhC88hIoJJXfQ8Mk2nUq0k5E0X9UxerXcoERJwU7c $002fHw$002feZ6btm2izJ6IdnS0DorBwsQ $ 002fKbhz8CFubq6lMbUP06nUKYh4gs25 $ 002favKndS9dJ06 $002f8pClchBonArKIaljVs3A7tn0sS2slOSqv2uXlwB8F9za9GwBLeal3hMBAAA $003d.js type=text/javascript/script/head For other the header is like this (seperate js includes for every script) !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html xmlns=http://www.w3.org/1999/xhtml;headtitleDoe, John/ titlemeta content=text/html; charset=UTF-8 http-equiv=Content- Type/metalink type=text/css rel=stylesheet href=/avetanafile/ assets/tapestry/5.1.0.5/default.css/linklink type=text/css rel=stylesheet href=/avetanafile/assets/blackbird/5.1.0.5/ blackbird.css/linklink type=text/css rel=stylesheet href=/ avetanafile/assets/classpath/ded21e67620ae96/assets/css/ patientenakte.css/linklink type=text/css rel=stylesheet href=/avetanafile/assets/classpath/ded21e67620ae96/avetana.css/link link href=/avetanafile/assets/classpath/ded21e67620ae96/avetana.ico rel=shortcut icon/linkmeta content=Apache Tapestry Framework (version 5.1.0.5) name=generator/metascript src=/avetanafile/ assets/scriptaculous/5.1.0.5/prototype.js type=text/javascript/ scriptscript src=/avetanafile/assets/scriptaculous/5.1.0.5/ scriptaculous.js type=text/javascript/scriptscript src=/ avetanafile/assets/scriptaculous/5.1.0.5/effects.js type=text/ javascript/scriptscript src=/avetanafile/assets/tapestry/5.1.0.5/ tapestry.js type=text/javascript/scriptscript src=/avetanafile/ assets/blackbird/5.1.0.5/blackbird.js type=text/javascript/ scriptscript src=/avetanafile/assets/tapestry/5.1.0.5/tapestry- messages_de.js type=text/javascript/scriptscript src=/ avetanafile/assets/classpath/ded21e67620ae96/assets/js/ InPlacePrompt.js type=text/javascript/scriptscript src=/ avetanafile/assets/app/ded21e67620ae96/components/navigation/js/ popupwindow.js type=text/javascript/scriptscript src=/ avetanafile/assets/classpath/ded21e67620ae96/assets/js/gridselect.js type=text/javascript/scriptscript src=/avetanafile/dwr/ interface/DWRUpdater.js type=text/javascript/scriptscript src=/ avetanafile/assets/classpath/ded21e67620ae96/org/directwebremoting/ util.js type=text/javascript/scriptscript src=/avetanafile/ assets/classpath/ded21e67620ae96/org/directwebremoting/engine.js type=text/javascript/scriptscript src=/avetanafile/assets/ classpath/ded21e67620ae96/org/directwebremoting/webwork/ DWRActionUtil.js type=text/javascript/scriptscript src=/ avetanafile/assets/classpath/ded21e67620ae96/assets/js/ DWRUpdaterHelper.js type=text/javascript/script/head Am 30.06.2009 um 16:33 schrieb Howard Lewis Ship: @IncludeJavaScriptLibrary uses RenderSupport under the covers; I meant when your Layout.tml includes script src= elements. Those are not recognized by Tapestry and are not aggregated. On Mon, Jun 29, 2009 at 11:43 PM, Moritz Gmelin moritz.gme...@gmx.dewrote: Does it mean that the stuff that is injected into components via @IncludeJavaScriptLibrary is not combined? Does this make sense? Also in the pages where no script combination takes place I can see all the links to tapestry.js, effects.js and other standard scripts. Is this correct? Remember that on other pages (of the same application) everything is integrated in one big js file. M. Am 29.06.2009 um 18:11 schrieb Howard Lewis Ship: It depends on how the scripts are added to the head; only scripts added via RenderSupport.addScriptLink() will be combined; in addition, combination is turned off in development mode (by default). On Mon, Jun 29, 2009 at 6:59 AM, Moritz Gmelin moritz.gme...@avetana.de wrote: Hi, I just found out that some of our pages do generate a number of JS head elements. Although
T5 Grid Error
I have one grid which take list of object as source. Most time, it works great. But sometimes I got following erros: DefaultRequestExceptionHandler.handleRequestException(62) | Processing of request failed with uncaught exception: Index: 1, Size: 1 org.apache.tapestry5.runtime.ComponentEventException: Index: 1, Size: 1 [at context:app/appAdmin/CompaniesList.tml, line 9] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098) at org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:107) at $ComponentEventRequestHandler_12233f25a7c.handle($ComponentEventRequestHandler_12233f25a7c.java) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_12233f25a7e.handle($ComponentEventRequestHandler_12233f25a7e.java) at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) at $ComponentEventRequestHandler_12233f25a7e.handle($ComponentEventRequestHandler_12233f25a7e.java) at $ComponentEventRequestHandler_12233f259fb.handle($ComponentEventRequestHandler_12233f259fb.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at $ComponentRequestHandler_12233f259ef.handleComponentEvent($ComponentRequestHandler_12233f259ef.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_12233f259f1.dispatch($Dispatcher_12233f259f1.java) at $Dispatcher_12233f259e8.dispatch($Dispatcher_12233f259e8.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_12233f259e9.service($RequestHandler_12233f259e9.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_12233f259e9.service($RequestHandler_12233f259e9.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_12233f259e9.service($RequestHandler_12233f259e9.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_12233f259e9.service($RequestHandler_12233f259e9.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_12233f259e9.service($RequestHandler_12233f259e9.java) at $RequestHandler_12233f259df.service($RequestHandler_12233f259df.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_12233f259e1.service($HttpServletRequestHandler_12233f259e1.java) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_12233f259de.service($HttpServletRequestFilter_12233f259de.java) at $HttpServletRequestHandler_12233f259e1.service($HttpServletRequestHandler_12233f259e1.java) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) at $HttpServletRequestHandler_12233f259e1.service($HttpServletRequestHandler_12233f259e1.java) at $HttpServletRequestHandler_12233f259dc.service($HttpServletRequestHandler_12233f259dc.java) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at com.dosalestrack.webapp.filters.SecurityFilter.doFilter(SecurityFilter.java:73) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:229) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113) at