[jira] [Commented] (TAP5-1844) Datefield not fires onchange event on changes
[ https://issues.apache.org/jira/browse/TAP5-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13227461#comment-13227461 ] Michael Wyraz commented on TAP5-1844: - Patch for 5.3 Branch: Index: tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js === --- tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js (Revision 1299618) +++ tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js (Arbeitskopie) @@ -114,7 +114,10 @@ var date = this.datePicker.getDate(); var resultHandler = function(result) { -this.field.value = result; + if (this.field.value != result) { +this.field.value = result; +if (this.field.onchange) this.field.onchange(); + } this.hidePopup(); Datefield not fires onchange event on changes - Key: TAP5-1844 URL: https://issues.apache.org/jira/browse/TAP5-1844 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3.1 Reporter: Michael Wyraz It's a regression to TAPESTRY-238 in datefield.js when setting the field's value, onchange() must be called if it exists -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1858) Cookie service should allow to set path, domain AND maxAge
[ https://issues.apache.org/jira/browse/TAP5-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13227462#comment-13227462 ] Michael Wyraz commented on TAP5-1858: - Patch for 5.3 Branch: ### Eclipse Workspace Patch 1.0 #P tapestry5-trunk Index: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java === --- tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java (revision 1299621) +++ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/CookiesImpl.java (working copy) @@ -121,7 +121,20 @@ cookieSink.addCookie(cookie); } + +public void writeCookieValue(String name, String value, String path, String domain, int maxAge) +{ +Cookie cookie = new Cookie(name, value); +if (path==null) cookie.setPath(request.getContextPath() + /); +else cookie.setPath(path); +if (domain!=null) cookie.setDomain(domain); +if (maxAge!=0) cookie.setMaxAge(maxAge); +else cookie.setMaxAge(defaultMaxAge); +cookie.setSecure(request.isSecure()); +cookieSink.addCookie(cookie); +} + public void removeCookieValue(String name) { Cookie cookie = new Cookie(name, null); Index: tapestry-core/src/main/java/org/apache/tapestry5/services/Cookies.java === --- tapestry-core/src/main/java/org/apache/tapestry5/services/Cookies.java (revision 1299621) +++ tapestry-core/src/main/java/org/apache/tapestry5/services/Cookies.java (working copy) @@ -67,6 +67,11 @@ void writeCookieValue(String name, String value, String path, String domain); /** + * As with {@link #writeCookieValue(String, String, String)} but an explicit domain,path and maximum age may be set. + */ +void writeCookieValue(String name, String value, String path, String domain, int maxAge); + +/** * Removes a previously written cookie, by writing a new cookie with a maxAge of 0. */ void removeCookieValue(String name); Cookie service should allow to set path, domain AND maxAge -- Key: TAP5-1858 URL: https://issues.apache.org/jira/browse/TAP5-1858 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.3.2 Reporter: Michael Wyraz Cookie service should allow to set path, domain AND maxAge with one method. Currently there is one method for setting the path, another for cookies with maxAge but none for cookies with maxAge+path. There should be a method like this: void writeDomainCookieValue(String name, String value, String path, String domain, int maxAge) { Cookie cookie = new Cookie(name, value); if (path==null) cookie.setPath(request.getContextPath() + /); else cookie.setPath(path); if (domain!=null) cookie.setDomain(domain); if (maxAge!=0) cookie.setMaxAge(maxAge); else cookie.setMaxAge(defaultMaxAge); cookie.setSecure(request.isSecure()); cookieSink.addCookie(cookie); } Each other method should call this one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1844) Datefield not fires onchange event on changes
[ https://issues.apache.org/jira/browse/TAP5-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13205371#comment-13205371 ] Michael Wyraz commented on TAP5-1844: - To fix this, in datefeild.js change this.field.value = result; to: if (this.field.value != result) { this.field.value = result; if (this.field.onchange) this.field.onchange(); } Datefield not fires onchange event on changes - Key: TAP5-1844 URL: https://issues.apache.org/jira/browse/TAP5-1844 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3.1 Reporter: Michael Wyraz It's a regression to TAPESTRY-238 in datefield.js when setting the field's value, onchange() must be called if it exists -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1800) LinkSubmit/Submit should store evet and context in ComponentAction
[ https://issues.apache.org/jira/browse/TAP5-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13174127#comment-13174127 ] Michael Wyraz commented on TAP5-1800: - I tested the same with the Submit component and can confirm that the issue applies there as well. LinkSubmit/Submit should store evet and context in ComponentAction -- Key: TAP5-1800 URL: https://issues.apache.org/jira/browse/TAP5-1800 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.3, 5.4 Reporter: Michael Wyraz When using multiple LinkSubmit (e.g. in a Loop), the event and context from the last one is fired, independent of which is clicked. The reason is that the parameter event and context are determined during the execution of the ComponentAction by accessing the component's fields. So when the acion is defered (which is default), these fields contain the values from the last usage of the component. A workaround is to det defer=false. To fix it, simply store event and context to the process submission (beside the clientId which is already there). The same issue might apply to Submit, it has the same code (untested). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1765) PerThread scope is not honored when service is created using autobuild
[ https://issues.apache.org/jira/browse/TAP5-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13166214#comment-13166214 ] Michael Wyraz commented on TAP5-1765: - In our productive appplications after a while of running, on every event-request an error about multipart decoding occurs. I revired the code and I'm very sure it's relatet to it. This breaks running appplications in a almost non reproducible way. So I'd consider this bug as bein critical. If possible please try to do a bugfix release. @Denis how could you fix it in your code? PerThread scope is not honored when service is created using autobuild -- Key: TAP5-1765 URL: https://issues.apache.org/jira/browse/TAP5-1765 Project: Tapestry 5 Issue Type: Bug Components: tapestry-ioc Affects Versions: 5.3 Reporter: Denis Stepanov Assignee: Howard M. Lewis Ship Priority: Minor Fix For: 5.3.1, 5.4 Bug is possible to reproduce by modifying IOC test class PerThreadModule: from: @Scope(ScopeConstants.PERTHREAD) public StringHolder buildStringHolder() { return new StringHolderImpl(); } to: @Scope(ScopeConstants.PERTHREAD) public StringHolder buildStringHolder(@Autobuild StringHolderImpl impl) { return impl; } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1470) Group CSS together to avoid IE's restriction of 31 external css files
[ https://issues.apache.org/jira/browse/TAP5-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13130423#comment-13130423 ] Michael Wyraz commented on TAP5-1470: - The code still works almost unchanged in Tapestry 5.3. PLease consider to add it to the codebase (maybe by making it optional via settings). Group CSS together to avoid IE's restriction of 31 external css files - Key: TAP5-1470 URL: https://issues.apache.org/jira/browse/TAP5-1470 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-core Affects Versions: 5.2, 5.1 Reporter: Michael Wyraz IE is restricted to load 31 external CSS per page. All other are ignored. Also the number of @import declarations are restricted to 30 per css declaration. The following change to DocumentLinkerImpl beraks the imported css into blocks. A new block starts when more than 30 @import occured of when the media attribute changes. protected void addStylesheetsToHead(Element root, ListIncludedStylesheet stylesheets) { int count = stylesheets.size(); if (count == 0) return; // This only applies when the document is an HTML document. This may need to change in the // future, perhaps configurable, to allow for html and xhtml and perhaps others. Does SVG // use stylesheets? String rootElementName = root.getName(); // Not an html document, don't add anything. if (!rootElementName.equals(html)) return; Element head = findOrCreateElement(root, head, true); Element existing = findExistingElement(head, link); // Create a temporary container element. Element tempContainer = head.element(temp-container); for (int i = 0; i count; i++) stylesheets.get(i).add(tempContainer); tempContainer.remove(); Element container = head.element(css-container); // Fix für IE: Immer wenn der media Typ wechselt oder 30 CSS erreicht sind, wird ein neues CSS-Tag aufgemacht Element style=null; int cssCount=Integer.MAX_VALUE; String lastMedia=all; for (Node _css: tempContainer.getChildren()) { if (!(_css instanceof Element)) continue; Element css=(Element) _css; String href=css.getAttribute(href); String media=css.getAttribute(media); if (media==null) media=all; if (cssCount30 || !media.equalsIgnoreCase(lastMedia)) { style=container.element(style, type,text/css, media,media); lastMedia=media; cssCount=0; } style.text(@import url(+href+);); cssCount++; } if (existing != null) container.moveBefore(existing); container.pop(); } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira