PageURL rewriting deprecated
Hi. I am using latest version of Tap, and in it URL rewriting module is deprecated. What troubles me is why is it deprecated, any particular reason for it, or just because there are many others modules which contribute to that part more optimal like Apaches mod, Tuckey etc... Also, if you had an experience with this field so far what alternative would you recommend for page url rewriting that would suit the best?
Re: PageURL rewriting deprecated
The original implementation of url rewriting was flawed and replaced. On Sunday, June 16, 2013, Nomen Nomanum wrote: Hi. I am using latest version of Tap, and in it URL rewriting module is deprecated. What troubles me is why is it deprecated, any particular reason for it, or just because there are many others modules which contribute to that part more optimal like Apaches mod, Tuckey etc... Also, if you had an experience with this field so far what alternative would you recommend for page url rewriting that would suit the best? -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: best way of incorporating static pages?
Hi Magnus! I tend to believe a CMS is way to slow to combine it with Tapestry. Furthermore if you serve pages by a CMS link you will notice a difference in Look and Feel and linking back to the T5 app may be difficult. CMS is perfect to allow a user (non dev) to edit pages like about us, we hire aso without the need of a deployment (tml change) for example. And you get versioning and a wysiwyg editor for free. I would integrate parts of the CMS pages by streaming fragments, which keeps the webapp conscise and allows caching. Just my 2 cents... Jens Sent from my iPhone On 15.06.2013, at 20:42, Bård Magnus Kvalheim mag...@kvalheim.eu wrote: Maybe it's just me and I didn't see the problem, but can't you just link to the cms content? The cms content has a link so why should tapestry service it? Is it on the same base domain? Then use request services to generate an absolute url. -magnus HTC one Den 12. juni 2013 13:07 skrev John j...@quivinco.com følgende: Hi, I have a need to link to some static HTML generated by a CMS app. Assuming this content is in a directory outside my Tapestry app, what would be the best way of linking/serving it via Tapestry? Perhaps I should just configure a seperate Jetty context and provide absolute URLs in someway? I'd also consider the static content being part of the projects Java resources, not so keen though. John - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: PageURL rewriting deprecated
On Sun, 16 Jun 2013 14:06:22 -0300, Howard Lewis Ship hls...@gmail.com wrote: The original implementation of url rewriting was flawed and replaced. Why flawed? Besides a couple bugs, it worked. I'd say it has some advantages and disadvantages over the current Link Rewriter API. IMHO URL rewriter is better at incoming URLs and Link Rewriter at outgoing ones. I ported it (the Tapestry 5.1.0.5 URL rewriter API) to Tapestry 5.3.x and the code is here: https://github.com/thiagohp/tapestry-url-rewriter. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
DefaultTreeModel doesnt user encoder to get the node
Hi all. I will try first to explain my use case as that might shad some light on the problem that I encountered here. I have a tree that always has 4 main nodes, 2 nodes under each main one and the then rest of the nodes are created from the db. So something like category1 subcategory11 subcategory12 category2 subcategory21 subcategory22 category3 subcategory31 subcategory32 category4 subcategory41 subcategory42 So since I didnt wanted to load the complex data structure during the page load I was quite happy to read that tree has ajax events called on node expansion. So all was cool, I wrote my node structure to and it looked like everything was work however what I noticed is that the *findById * method in DefaultTreeModel was trying to access each node in the tree to find the correct one. Example User clicks on category2 the DefaultTreeModel will load all nodes from category1. Looking into the code of the before mentioned class I could see the problem private TreeNodeT findById(String id) { TreeNodeT result = cache.get(id); if (result != null) return result; LinkedListTreeNodeT queue = new LinkedListTreeNodeT(roots); while (!queue.isEmpty()) { TreeNodeT node = queue.removeFirst(); String nodeId = node.getId(); cache.put(nodeId, node); if (nodeId.equals(id)) return node; if (!node.isLeaf() node.getHasChildren()) { for (TreeNodeT child : node.getChildren()) { queue.addFirst(child); } } } return null; } There is no call to the encoder method toValue(String clientValue) In this method I have smart logic that wont iterate through all of the nodes but only through the loaded ones. The implementation is quite simple private TreeNodeT findById(String id) { TreeNodeT result = cache.get(id); if (result != null) { return result; } LinkedListTreeNodeT queue = new LinkedListTreeNodeT(roots); T toValue = encoder.toValue(id); if (toValue != null) { DefaultTreeNode node = new FlowTreeModel.DefaultTreeNode(toValue); cache.put(node.getId(), node); return node; } return null; } So my question is why does DefaultTreeModel doesnt use encoder to get the node but it instead it tries to iterate through all of the nodes? Cheers -- Sincerely *Boris Horvat*
does this issue still have to be ignored ?
I know there are other fish to fry... but its been years now. https://issues.apache.org/jira/browse/TAP5-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel https://issues.apache.org/jira/browse/TAP5-1757 http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-3-Volatile-grid-inside-form-td5017357.html http://www.mail-archive.com/users@tapestry.apache.org/msg53115.html I have embedded about half a dozen DIV's in this template without any relief. Any suggestions are appreciated. t:layout title=literal:Leaders Query xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; xmlns:p=tapestry:parameter xmlns:j=tapestry-library:jquery t:block id=leadersQueryMainBlock div class=t-invisible/ t:form t:id=criteriaForm id=criteriaForm clientValidation=false t:errors/ div class=t-invisible/ fieldset class=k-sub-group style=fieldset.k-sub-group { border:1px; background: ${adminLayout.dividerBackGroundColor}; } legend Selection Criteria /legend ul class=k-check table width=100% border=0 tr thYear/th thLeague/th thSeason/th /tr tr td select t:type=Select t:id=yearSelect t:clientId=yearSelect id=yearSelect t:model=prop:yearSelectModel t:encoder=prop:yearValueEncoder t:value=prop:year blankOption=never / /td td select t:type=Select t:id=leagueSelect t:clientId=leagueSelect id=leagueSelect t:model=prop:leagueSelectModel t:encoder=prop:leagueValueEncoder t:value=prop:league blankOption=never / /td td select t:type=Select t:id=seasonSelect t:clientId=seasonSelect id=seasonSelect t:model=prop:seasonSelectModel t:encoder=prop:seasonValueEncoder t:value=prop:season blankOption=never / /td td style=width:20% t:submit t:id=go event=go class=button value=GO align=right/ /td /tr /table /ul /fieldset hr/ BPlayers/B t:If test=source div class=t-invisible/ t:grid t:id=grid source=source row=bean inPlace=true add=__id__ reorder=__id__ t:mixins=tynamo/BeanModelAdvisor p:__id__header /p:__id__header p:__id__cell t:pagelink t:page=Show context=showPageContextt:tynamo.identifier object=bean//t:pagelink /p:__id__cell /t:grid div class=t-invisible/ p:else BCENTERH3No objects to render/H3/CENTER/B /p:else /t:If div class=t-invisible/ /t:form /t:block table width=100% border=1 tr td t:delegate to=block:leadersQueryMainBlock / /td /tr /table /t:layout
RE: does this issue still have to be ignored ?
I didnt mean to come off negative... but its not a positive thing either... I dont have an error message on the console to offer except this... 127.0.0.1 - - [17/Jun/2013:05:07:41 +] POST /leadersquery.grid.columns:sort/pts/grid?t:ac=org.tynamo.examples.pphl.pages.LeadersQuery$0040cbd892 HTTP/1.1 500 8153 http://localhost:8080/leadersquery/org.tynamo.examples.pphl.pages.LeadersQuery$0040cbd892; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 I am wondering if it is left open to force me to become a trunk alterer If I could get away with adding a DIV that would be nice. But I get this when I do add a DIV and it still fails. Just not sure what to do with this sort column thing. Thanks for any help An unexpected application exception has occurred.org.apache.tapestry5.runtime.ComponentEventExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.contextptsgrideventTypesortlocationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 61div class=t-data-grid xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;2 3div t:id=pagerTop/4 5table t:id=table6thead t:id=columns/7tbody8 tr t:id=rows/9/tbody10/table11 org.apache.tapestry5.ioc.internal.OperationExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.locationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 6traceTriggering event 'sort' on LeadersQuery:grid.columnsTriggering event 'inplaceupdate' on LeadersQuery:grid.columnsorg.apache.tapestry5.runtime.ComponentEventExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.contextgrideventTypeinplaceupdatelocationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 6java.lang.IllegalStateExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.Filter stack frames Stack trace org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:90) org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateControllerImpl.cleanupAfterPartialZoneRender(AjaxFormUpdateControllerImpl.java:122) org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.renderMarkup(RenderCommandComponentEventResultProcessor.java:80) org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62) org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:159) org.apache.tapestry5.internal.services.PartialMarkupRendererTerminator.renderMarkup(PartialMarkupRendererTerminator.java:45) org.apache.tapestry5.services.TapestryModule$37.renderMarkup(TapestryModule.java:2141) org.apache.tapestry5.services.TapestryModule$36.renderMarkup(TapestryModule.java:2125) org.apache.tapestry5.services.TapestryModule$35.renderMarkup(TapestryModule.java:2107) org.apache.tapestry5.services.TapestryModule$34.renderMarkup(TapestryModule.java:2091) org.got5.tapestry5.jquery.services.js.JSModule$2.renderMarkup(JSModule.java:58) org.apache.tapestry5.services.TapestryModule$33.renderMarkup(TapestryModule.java:2073) org.apache.tapestry5.services.TapestryModule$32.renderMarkup(TapestryModule.java:2048) org.apache.tapestry5.internal.services.AjaxPartialResponseRendererImpl.renderPartialPageMarkup(AjaxPartialResponseRendererImpl.java:89) org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:58) org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.processResultValue(RenderCommandComponentEventResultProcessor.java:34) org.apache.tapestry5.internal.services.AjaxComponentInstanceEventResultProcessor.processResultValue(AjaxComponentInstanceEventResultProcessor.java:70) org.apache.tapestry5.internal.services.AjaxComponentInstanceEventResultProcessor.processResultValue(AjaxComponentInstanceEventResultProcessor.java:30) org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler$1.processResultValue(AjaxComponentEventRequestHandler.java:80) org.apache.tapestry5.corelib.components.Grid.onInPlaceUpdate(Grid.java:605) org.apache.tapestry5.corelib.components.Grid.dispatchComponentEvent(Grid.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:935) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057)
RE: does this issue still have to be ignored ?
Well I am not sure if the added DIV is actually working or not. One thing leads to another. I thought I had this boiled down to one symptom and one error. I apologize if I slipped. This is what I receive after buiding with the DIV stuff added. So I am guessing that the embedded DIV's I added are doing something. An unexpected application exception has occurred.org.apache.tapestry5.ioc.internal.OperationExceptionIndex: 0, Size: 0locationclasspath:org/tynamo/examples/pphl/pages/LeadersQuery.tml, line 94 5t:block id=leadersQueryMainBlock6 7 div class=t-invisible/8 9 t:form t:id=criteriaForm id=criteriaForm clientValidation=false 10 t:errors/ 11 12 div class=t-invisible/ 13 14 fieldset class=k-sub-group style=fieldset.k-sub-group { border:1px; background: ${adminLayout.dividerBackGroundColor}; }traceTriggering event 'action' on LeadersQuery:criteriaformorg.apache.tapestry5.runtime.ComponentEventExceptionIndex: 0, Size: 0context eventTypeactionlocationclasspath:org/tynamo/examples/pphl/pages/LeadersQuery.tml, line 9org.apache.tapestry5.ioc.internal.util.TapestryExceptionIndex: 0, Size: 0locationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 83 div t:id=pagerTop/4 5table t:id=table6thead t:id=columns/7tbody8 tr t:id=rows/9/tbody10/table11 12div t:id=pagerBottom/13 java.lang.IndexOutOfBoundsExceptionIndex: 0, Size: 0Filter stack frames Stack trace java.util.ArrayList.RangeCheck(ArrayList.java:547) java.util.ArrayList.get(ArrayList.java:322) org.apache.tapestry5.internal.grid.CollectionGridDataSource.getRowValue(CollectionGridDataSource.java:111) org.apache.tapestry5.corelib.components.Grid$CachingDataSource.getRowValue(Grid.java:318) org.apache.tapestry5.corelib.components.GridRows.setupForRow(GridRows.java:297) org.apache.tapestry5.corelib.components.GridRows$SetupForRowByIndex.execute(GridRows.java:88) org.apache.tapestry5.corelib.components.GridRows$SetupForRowByIndex.execute(GridRows.java:75) org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:661) org.apache.tapestry5.corelib.components.Form.advised$onAction_333c2862e032(Form.java:522) org.apache.tapestry5.corelib.components.Form$Invocation_onAction_333c2862e031.proceedToAdvisedMethod(Unknown Source) org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84) org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:45) org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) org.apache.tapestry5.corelib.components.Form.onAction(Form.java) org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:935) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1054) org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1053) org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:81) org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75) org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2476) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39) org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:41) org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
RE: does this issue still have to be ignored ?
I thought it might be helpful to post a couple of methods. I am hoping to find a workaround for this one and move on. Sorry this post turned into a twisted two kinda issue. Fist it was the missing DIV and now its the CollectionGridDataSource. My form properties are using @Persist because I want them to stick. Thanks for your patience @SetupRender public void setupRender() { beanType = rowClass = PlayerStats.class; collection = new ArrayList( TynamoUTIL.loadCollectionByYearAndLeagueAndSeason( hibernatePersistenceService, year, league, season, PlayerStats.class)); grid.getDataModel().get(gp).sortable(true); grid.getDataModel().get(g).sortable(true); grid.getDataModel().get(a).sortable(true); grid.getDataModel().get(pts).sortable(true); grid.getDataModel().get(ppg).sortable(true); grid.getDataModel().get(ppa).sortable(true); } public GridDataSource getSource() { beanType = rowClass = PlayerStats.class; return new CollectionGridDataSource(collection == null ? Collections.EMPTY_LIST : collection ); }
RE: does this issue still have to be ignored ?
Sorry I messed up this post. The original error sticks after I commented out telling my columns they are sortable. try { grid.getDataModel().get(gp).sortable(true); grid.getDataModel().get(g).sortable(true); grid.getDataModel().get(a).sortable(true); grid.getDataModel().get(pts).sortable(true); grid.getDataModel().get(ppg).sortable(true); grid.getDataModel().get(ppa).sortable(true); } catch (Exception ex) { ; } An unexpected application exception has occurred.org.apache.tapestry5.runtime.ComponentEventExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.contextgpgrideventTypesortlocationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 61div class=t-data-grid xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;2 3div t:id=pagerTop/4 5table t:id=table6thead t:id=columns/7tbody8 tr t:id=rows/9/tbody10/table11 org.apache.tapestry5.ioc.internal.OperationExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.locationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 6traceTriggering event 'sort' on LeadersQuery:grid.columnsTriggering event 'inplaceupdate' on LeadersQuery:grid.columnsorg.apache.tapestry5.runtime.ComponentEventExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.contextgrideventTypeinplaceupdatelocationclasspath:org/apache/tapestry5/corelib/components/Grid.tml, line 6java.lang.IllegalStateExceptionThe rendered content did not include any elements that allow for the positioning of the hidden form field's element.Filter stack frames Stack trace org.apache.tapestry5.corelib.internal.HiddenFieldPositioner.getElement(HiddenFieldPositioner.java:90) org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateControllerImpl.cleanupAfterPartialZoneRender(AjaxFormUpdateControllerImpl.java:122) org.apache.tapestry5.internal.services.RenderCommandComponentEventResultProcessor.renderMarkup(RenderCommandComponentEventResultProcessor.java:80) org.apache.tapestry5.internal.services.PageRenderQueueImpl$Bridge.renderMarkup(PageRenderQueueImpl.java:62) org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:159) org.apache.tapestry5.internal.services.PartialMarkupRendererTerminator.renderMarkup(PartialMarkupRendererTerminator.java:45) org.apache.tapestry5.services.TapestryModule$37.renderMarkup(TapestryModule.java:2141) org.apache.tapestry5.services.TapestryModule$36.renderMarkup(TapestryModule.java:2125) org.apache.tapestry5.services.TapestryModule$35.renderMarkup(TapestryModule.java:2107) org.apache.tapestry5.services.TapestryModule$34.renderMarkup(TapestryModule.java:2091)