Re: opinion on modal dialog
2011-08-12 23:52, Vangel V. Ajanovski: Hi Christian, I looked into this in more detail, but I don't really understand what kind of validation problems are you preventing with the two zones (so efectively you have surrounded the form with three extra divs, and I have just two. div dialogzone div dialoglayout div newproviderzone form I may be wrong but I think when you have the zone=gridZone on the form and there are (server-side) validation failures, you won't see them because only the grid is refreshed, not the form. That's why i pack my form in a separate zone. The other thing is that I prefer to create a component for the dialog. So the structure is: div dialogzone div dialog With dialog component consisting of div formzone form - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Zone inside a form with fadeout works each second time ...
Hi! I have zone inside a form in which I intend to give a response message to the user whereafter it is faded out. I.e. Your changes where saved ... Everything works like a charm except the fact that the message is only faded out each second time. There are no javascript error reported in the console. Surely I am missing something ... T5 rocks by the way! As if you didn't already know Thanks in advance! Gunnar Eketrapp div id=transaction t:form t:id=transactionForm t:zone=transactionZone class=input-form fieldset t:zone t:id=transactionZone id=transactionZone t:update=fade t:if test=noticediv class=notice${notice}/div/t:if /t:zone table trthVer/ththMotpart/ththDatum/ththBelopp/ththTyp/th/tr tr tdt:textfield name=verification size=4 value=transaction.verification //td tdt:textfield t:id=counterpart name=counterpart size=20 value=transaction.counterpart //td tdt:textfield t:id=date name=date size=10 value=transaction.date //td tdt:textfield t:id=amount name=amount size=12 value=transaction.amount //td tdt:select name=type model=typeModel value=transaction.type encoder=typeEncoder //td /tr tr td colspan=5bNotering:/b#160;t:textfield t:id=note name=note size=80 value=transaction.note //td /tr /table /fieldset p t:submit t:id=okTransaction value=Spara / t:submit t:id=cancelTransaction value=Tillbaka / /p /t:form /div
Re: Zone inside a form with fadeout works each second time ...
How are you persisting your message ? For a post request tapestry uses redirect after post and so if you don't persist the message it will be lost. For such situations we have @Persist(PersistenceConstants.Flash) which stores the value in a session till it is read for the first time Regards Taha On Aug 13, 2011, at 4:11 PM, Gunnar Eketrapp gunnar.eketr...@gmail.com wrote: Hi! I have zone inside a form in which I intend to give a response message to the user whereafter it is faded out. I.e. Your changes where saved ... Everything works like a charm except the fact that the message is only faded out each second time. There are no javascript error reported in the console. Surely I am missing something ... T5 rocks by the way! As if you didn't already know Thanks in advance! Gunnar Eketrapp div id=transaction t:form t:id=transactionForm t:zone=transactionZone class=input-form fieldset t:zone t:id=transactionZone id=transactionZone t:update=fade t:if test=noticediv class=notice${notice}/div/t:if /t:zone table trthVer/ththMotpart/ththDatum/ththBelopp/ththTyp/th/tr tr tdt:textfield name=verification size=4 value=transaction.verification //td tdt:textfield t:id=counterpart name=counterpart size=20 value=transaction.counterpart //td tdt:textfield t:id=date name=date size=10 value=transaction.date //td tdt:textfield t:id=amount name=amount size=12 value=transaction.amount //td tdt:select name=type model=typeModel value=transaction.type encoder=typeEncoder //td /tr tr td colspan=5bNotering:/b#160;t:textfield t:id=note name=note size=80 value=transaction.note //td /tr /table /fieldset p t:submit t:id=okTransaction value=Spara / t:submit t:id=cancelTransaction value=Tillbaka / /p /t:form /div - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: opinion on modal dialog
On 08/13/2011 10:35 AM, Christian Köberl wrote: I may be wrong but I think when you have the zone=gridZone on the form and there are (server-side) validation failures, you won't see them because only the grid is refreshed, not the form. OK, thanks I will check if this is the case. I thought I would solve all this with separating the zones completely. smime.p7s Description: S/MIME Cryptographic Signature
Re: link transformation T5.2.5 (SOLVED)
I got link transformation working. For those of you who are interested in it's basically something like this: public class YourLinkTransformer implements PageRenderLinkTransformer, ComponentEventLinkTransformer { private final ComponentEventLinkEncoder _cele; private final ObjectLocator _objectLocator; public YourLinkTransformer(final ObjectLocator objectLocator, @Symbol(SymbolConstants.ENCODE_LOCALE_INTO_PATH) boolean encodeLocaleIntoPath) { _objectLocator = objectLocator; _cele = objectLocator.autobuild(ComponentEventLinkEncoderImpl.class); } public Link transformPageRenderLink(final Link defaultLink, final PageRenderRequestParameters parameters) { return _cele.createPageRenderLink(parameters); } public Link transformComponentEventLink(final Link defaultLink, final ComponentEventRequestParameters parameters) { return _cele.createComponentEventLink(parameters, false); } public PageRenderRequestParameters decodePageRenderRequest(final Request request) { final Request request1 = modifyRequest(request); return _cele.decodePageRenderRequest(request1); } public ComponentEventRequestParameters decodeComponentEventRequest(final Request request) { final Request request1 = modifyRequest(request); return _cele.decodeComponentEventRequest(request1); } // // // private Request modifyRequest(final Request request) { final String[] pathElements = StringUtils.split(request.getPath(), '/'); // do whatever you need to change your pathelement and create a new URL. this code does nothing at all as in == out final StringBuilder sb = new StringBuilder(/); for (int i = 0; i pathElements.length; ++i) { sb.append(/).append(pathElements[i]); } return new ChangedRequest(request, sb.toString()); } private static class ChangedRequest implements Request { private final Request _request; private final String _newPath; private ChangedRequest(final Request request, final String newPath) { _request = request; _newPath = newPath; } public Session getSession(final boolean create) { return _request.getSession(create); } public String getContextPath() { return _request.getContextPath(); } public ListString getParameterNames() { return _request.getParameterNames(); } public String getParameter(final String name) { return _request.getParameter(name); } public String[] getParameters(final String name) { return _request.getParameters(name); } public String getPath() { return _newPath; } public Locale getLocale() { return _request.getLocale(); } public ListString getHeaderNames() { return _request.getHeaderNames(); } public long getDateHeader(final String name) { return _request.getDateHeader(name); } public String getHeader(final String name) { return _request.getHeader(name); } public boolean isXHR() { return _request.isXHR(); } public boolean isSecure() { return _request.isSecure(); } public String getServerName() { return _request.getServerName(); } public boolean isRequestedSessionIdValid() { return _request.isRequestedSessionIdValid(); } public Object getAttribute(final String name) { return _request.getAttribute(name); } public void setAttribute(final String name, final Object value) { _request.setAttribute(name, value); } public String getMethod() { return _request.getMethod(); } public int getLocalPort() { return _request.getLocalPort(); } public int getServerPort() { return _request.getServerPort(); } } } Am 11.08.11 12:28, schrieb Jens Breitenstein: Hi All! I am stuck with URL transformation and hopefully someone can point me into the right direction... Basically I have something like this: http://localhost:8080/MYCONTEXT/de/whatever In case the user sets a global filtering criteria I want to transparently make it appear in the URL like: http//localhost:8080/MYCONTEXT/de/MYFILTER/whatever As T5 sees MYFILTER it tries to find a page MYFILTER which fails. When looking at decodePageRenderRequest I am able to detect the filter, but removing it and passing the modified URL fails
component inheritance T5.2.5
hi All! I have some trouble concerning component inheritance. My scenario is something like: A.tml div xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; xmlns:p=tapestry:parameter class=mini-basket-items t:extension-point id=MBIV a href=${valueForA}/ /t:extension-point /div A.class -- public class A { public String getValueForA() { return a; } } B.class -- public class B extends A { public String getValueForA() { return b; } } there is no tml provided by B thus A's tml should be fully reused. the expression valueForA always returns a and the overridden method in class B is never called. is there additional configuration required to make it working? Thanks again Jens - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Javadoc not in the maven builds of the tapestry 5.3
Hi guys,I am using tapestry version 5.3 in NetBeans and Maven (from maven central repo)I canapos;t see the javadoc artifacts, so there is no documentation hinting within the IDE.Is this a gradle or a setup issue or am I doing something wrong?I believe there was javadoc in maven central in the 5.2 versions. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Supporting @EJB annotation in Tapestry classes
Hi guys, I am developing a front-end in Tapestry for an EJB application (EJB 3.1/JEE 6) Its getting really annoying to build Tapestry services for each of the EJBs. Do you have any suggestions on how to support @EJB annotation instead? Thanks! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org