[jira] [Updated] (TAP5-2340) Make proxies honor Java 8 default methods

2014-05-28 Thread Peter Niederwieser (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Niederwieser updated TAP5-2340:
-

Attachment: plastic_default_methods.patch

The attached patch solves my immediate problem. I'm not sure if it's a complete 
solution.

> Make proxies honor Java 8 default methods
> -
>
> Key: TAP5-2340
> URL: https://issues.apache.org/jira/browse/TAP5-2340
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: plastic
>Affects Versions: 5.4
>Reporter: Peter Niederwieser
> Attachments: plastic_default_methods.patch
>
>
> MyInterface.java:
> {code}
> public interface MyInterface {
>   default int compute() { return 42; }
> }
> {code}
> PlasticSpec.groovy:
> {code}
> class PlasticSpec extends Specification {
>   def "plastic proxy for interface with default method"() {
> def manager = 
> PlasticManager.withClassLoader(getClass().classLoader).create()
> def proxy = manager.createProxy(MyInterface, {})
> def impl = proxy.newInstance()
> expect:
> impl.compute() == 42 // fails; actual: 0
>   }
>   def "manual implementation of interface with default method"() {
> def impl = new MyInterface() {}
> expect:
> impl.compute() == 42 // passes
>   }
> }
> {code}
> Tested with 5.4-beta-6.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (TAP5-2343) Allow compilation of Tapestry 5 codebase with JDK 8

2014-05-28 Thread Peter Niederwieser (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Niederwieser updated TAP5-2343:
-

Description: The attached patch changes build script and one Java source 
file for `gradlew compileJava compileTestJava` to succeed when running under 
JDK 8.  (was: Patches build script and one Java source file for `gradlew 
compileJava compileTestJava` to succeed when running under JDK 8.)

> Allow compilation of Tapestry 5 codebase with JDK 8
> ---
>
> Key: TAP5-2343
> URL: https://issues.apache.org/jira/browse/TAP5-2343
> Project: Tapestry 5
>  Issue Type: Improvement
>Affects Versions: 5.4
>Reporter: Peter Niederwieser
> Attachments: java_8_fixes.patch
>
>
> The attached patch changes build script and one Java source file for `gradlew 
> compileJava compileTestJava` to succeed when running under JDK 8.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (TAP5-2343) Allow compilation of Tapestry 5 codebase with JDK 8

2014-05-28 Thread Peter Niederwieser (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Niederwieser updated TAP5-2343:
-

Attachment: java_8_fixes.patch

> Allow compilation of Tapestry 5 codebase with JDK 8
> ---
>
> Key: TAP5-2343
> URL: https://issues.apache.org/jira/browse/TAP5-2343
> Project: Tapestry 5
>  Issue Type: Improvement
>Affects Versions: 5.4
>Reporter: Peter Niederwieser
> Attachments: java_8_fixes.patch
>
>
> Patches build script and one Java source file for `gradlew compileJava 
> compileTestJava` to succeed when running under JDK 8.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (TAP5-2343) Allow compilation of Tapestry 5 codebase with JDK 8

2014-05-28 Thread Peter Niederwieser (JIRA)
Peter Niederwieser created TAP5-2343:


 Summary: Allow compilation of Tapestry 5 codebase with JDK 8
 Key: TAP5-2343
 URL: https://issues.apache.org/jira/browse/TAP5-2343
 Project: Tapestry 5
  Issue Type: Improvement
Affects Versions: 5.4
Reporter: Peter Niederwieser
 Attachments: java_8_fixes.patch

Patches build script and one Java source file for `gradlew compileJava 
compileTestJava` to succeed when running under JDK 8.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (TAP5-1658) Submit context does not work inside Grid

2014-05-28 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade reassigned TAP5-1658:


Assignee: Jochen Kemnade

> Submit context does not work inside Grid
> 
>
> Key: TAP5-1658
> URL: https://issues.apache.org/jira/browse/TAP5-1658
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-core
>Affects Versions: 5.3.7, 5.4, 5.2
>Reporter: Stephan Windmüller
>Assignee: Jochen Kemnade
> Attachments: TestGrid.tar.gz
>
>
> About a year ago, bug #TAP-5-869 was about the usage of submit buttons with 
> context in loops. The bug was closed because using the defer parameter of the 
> submit button fixed the problem.
> Now I have the same problem, but this time in a Grid rather than a loop 
> component. Defer is set to false but every time I click on a button, only the 
> context of the last one is used.
> I created a small example demonstrating the problem, I will attach it to this 
> bugreport. Try clicking on every user and watch the console output: Always 
> the last user is printed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (TAP5-1658) Submit context does not work inside Grid

2014-05-28 Thread Jochen Kemnade (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011488#comment-14011488
 ] 

Jochen Kemnade commented on TAP5-1658:
--

I'm not completely sure but I think that if {{GridRows}} created a 
{{Heartbeat}} for every row, this would be fixed.

> Submit context does not work inside Grid
> 
>
> Key: TAP5-1658
> URL: https://issues.apache.org/jira/browse/TAP5-1658
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-core
>Affects Versions: 5.3.7, 5.4, 5.2
>Reporter: Stephan Windmüller
> Attachments: TestGrid.tar.gz
>
>
> About a year ago, bug #TAP-5-869 was about the usage of submit buttons with 
> context in loops. The bug was closed because using the defer parameter of the 
> submit button fixed the problem.
> Now I have the same problem, but this time in a Grid rather than a loop 
> component. Defer is set to false but every time I click on a button, only the 
> context of the last one is used.
> I created a small example demonstrating the problem, I will attach it to this 
> bugreport. Try clicking on every user and watch the console output: Always 
> the last user is printed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[CONF] Apache Tapestry > Download

2014-05-28 Thread Howard M. Lewis Ship (Confluence)














  


Howard M. Lewis Ship edited the page:
 


Download   






...
Tapestry 5.4 is under active development. There have been more than twenty alpha a series beta releases so far. See the subdirectories of https://repository.apache.org/content/groups/staging/org/apache/tapestry/., and several have been voted for general release. The most recent is 5.4-beta-6. 
   



 Section








 Column









  Tapestry 5.4-beta-6  
  Mirrors  
  Signature  
  MD5  


  Binary (zip)  
  Download  
  ASC  
  d143172da8c05515e31a410b528b599b  


  Source (zip)  
  Download  
  ASC  
  ef0a789dd58051fd950ec1c87182595c  

[jira] [Closed] (TAP5-2243) T5.4 tapestry-core integration test app1/xmlcontent page fails

2014-05-28 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade closed TAP5-2243.


   Resolution: Fixed
Fix Version/s: 5.4

This was fixed as part of TAP5-2200.

> T5.4 tapestry-core integration test app1/xmlcontent page fails
> --
>
> Key: TAP5-2243
> URL: https://issues.apache.org/jira/browse/TAP5-2243
> Project: Tapestry 5
>  Issue Type: Bug
>  Components: tapestry-core
>Affects Versions: 5.4
>Reporter: Chris Poulsen
> Fix For: 5.4
>
>
> This error is exposed by altering the selenium tests like explained in 
> https://issues.apache.org/jira/browse/TAP5-2239
> - Or simply by firing up the app1 test app from an editor and visiting the 
> page.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (TAP5-2200) Generating XML from pages and templates is not possible anymore

2014-05-28 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011169#comment-14011169
 ] 

Hudson commented on TAP5-2200:
--

FAILURE: Integrated in tapestry-trunk-freestyle #1222 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/1222/])
Closes TAP5-2200 : Generating XML from pages and templates is not possible 
anymore (thiagohp: rev ff2fcd8a70aea2d10d1d9742f196acc25f24fb7f)
* tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java
* 
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java
* 
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterFactoryImpl.java
* 
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
* 
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RawXML.java
* tapestry-core/src/test/app1/RawXML.tml


> Generating XML from pages and templates is not possible anymore
> ---
>
> Key: TAP5-2200
> URL: https://issues.apache.org/jira/browse/TAP5-2200
> Project: Tapestry 5
>  Issue Type: Bug
>Affects Versions: 5.4
>Reporter: Denis Delangle
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: month-of-tapestry, patch, regression
> Fix For: 5.4
>
> Attachments: tap5-2200.patch
>
>
> With Tapestry 5.4-alpha-22, I can't produce XML content with pages anymore. 
> Given the page 
> @ContentType("text/xml")
> public class ModuleInfo {
> ...
> }
> And the given template
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>   ${context.moduleName}
>   ${context.serverName}
>   ${context.serverAddress}
>   ${context.type}
>   ${context.client}
>   
>   
>name="${currentEntry.key}">${currentEntry.value}
>   
>   
> 
> I get the error message : 
>  "The root element of the rendered document was , not . A root 
> element of  is needed when linking JavaScript and stylesheet resources."
> My code was running fine with Tapestry 5.4-alpha-11



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (TAP5-2200) Generating XML from pages and templates is not possible anymore

2014-05-28 Thread Thiago H. de Paula Figueiredo (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiago H. de Paula Figueiredo resolved TAP5-2200.
-

   Resolution: Fixed
Fix Version/s: 5.4

> Generating XML from pages and templates is not possible anymore
> ---
>
> Key: TAP5-2200
> URL: https://issues.apache.org/jira/browse/TAP5-2200
> Project: Tapestry 5
>  Issue Type: Bug
>Affects Versions: 5.4
>Reporter: Denis Delangle
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: month-of-tapestry, patch, regression
> Fix For: 5.4
>
> Attachments: tap5-2200.patch
>
>
> With Tapestry 5.4-alpha-22, I can't produce XML content with pages anymore. 
> Given the page 
> @ContentType("text/xml")
> public class ModuleInfo {
> ...
> }
> And the given template
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>   ${context.moduleName}
>   ${context.serverName}
>   ${context.serverAddress}
>   ${context.type}
>   ${context.client}
>   
>   
>name="${currentEntry.key}">${currentEntry.value}
>   
>   
> 
> I get the error message : 
>  "The root element of the rendered document was , not . A root 
> element of  is needed when linking JavaScript and stylesheet resources."
> My code was running fine with Tapestry 5.4-alpha-11



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (TAP5-2200) Generating XML from pages and templates is not possible anymore

2014-05-28 Thread Thiago H. de Paula Figueiredo (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiago H. de Paula Figueiredo updated TAP5-2200:


Labels: month-of-tapestry patch regression  (was: patch regression)

> Generating XML from pages and templates is not possible anymore
> ---
>
> Key: TAP5-2200
> URL: https://issues.apache.org/jira/browse/TAP5-2200
> Project: Tapestry 5
>  Issue Type: Bug
>Affects Versions: 5.4
>Reporter: Denis Delangle
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: month-of-tapestry, patch, regression
> Attachments: tap5-2200.patch
>
>
> With Tapestry 5.4-alpha-22, I can't produce XML content with pages anymore. 
> Given the page 
> @ContentType("text/xml")
> public class ModuleInfo {
> ...
> }
> And the given template
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>   ${context.moduleName}
>   ${context.serverName}
>   ${context.serverAddress}
>   ${context.type}
>   ${context.client}
>   
>   
>name="${currentEntry.key}">${currentEntry.value}
>   
>   
> 
> I get the error message : 
>  "The root element of the rendered document was , not . A root 
> element of  is needed when linking JavaScript and stylesheet resources."
> My code was running fine with Tapestry 5.4-alpha-11



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (TAP5-2200) Generating XML from pages and templates is not possible anymore

2014-05-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011128#comment-14011128
 ] 

ASF subversion and git services commented on TAP5-2200:
---

Commit ff2fcd8a70aea2d10d1d9742f196acc25f24fb7f in tapestry-5's branch 
refs/heads/master from [~thiagohp]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=ff2fcd8 ]

Closes TAP5-2200 : Generating XML from pages and templates is not possible 
anymore


> Generating XML from pages and templates is not possible anymore
> ---
>
> Key: TAP5-2200
> URL: https://issues.apache.org/jira/browse/TAP5-2200
> Project: Tapestry 5
>  Issue Type: Bug
>Affects Versions: 5.4
>Reporter: Denis Delangle
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: month-of-tapestry, patch, regression
> Attachments: tap5-2200.patch
>
>
> With Tapestry 5.4-alpha-22, I can't produce XML content with pages anymore. 
> Given the page 
> @ContentType("text/xml")
> public class ModuleInfo {
> ...
> }
> And the given template
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>   ${context.moduleName}
>   ${context.serverName}
>   ${context.serverAddress}
>   ${context.type}
>   ${context.client}
>   
>   
>name="${currentEntry.key}">${currentEntry.value}
>   
>   
> 
> I get the error message : 
>  "The root element of the rendered document was , not . A root 
> element of  is needed when linking JavaScript and stylesheet resources."
> My code was running fine with Tapestry 5.4-alpha-11



--
This message was sent by Atlassian JIRA
(v6.2#6252)


git commit: Closes TAP5-2200 : Generating XML from pages and templates is not possible anymore

2014-05-28 Thread thiagohp
Repository: tapestry-5
Updated Branches:
  refs/heads/master ab66a31ea -> ff2fcd8a7


Closes TAP5-2200 : Generating XML from pages and templates is not possible 
anymore


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ff2fcd8a
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ff2fcd8a
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ff2fcd8a

Branch: refs/heads/master
Commit: ff2fcd8a70aea2d10d1d9742f196acc25f24fb7f
Parents: ab66a31
Author: Thiago H. de Paula Figueiredo 
Authored: Wed May 28 11:14:00 2014 -0300
Committer: Thiago H. de Paula Figueiredo 
Committed: Wed May 28 11:14:00 2014 -0300

--
 .../java/org/apache/tapestry5/dom/Document.java | 39 ++--
 .../internal/services/DocumentLinkerImpl.java   | 12 ++
 .../services/MarkupWriterFactoryImpl.java   |  5 ++-
 .../internal/services/MarkupWriterImpl.java |  6 +--
 tapestry-core/src/test/app1/RawXML.tml  |  1 +
 .../integration/app1/pages/RawXML.java  | 22 +++
 6 files changed, 77 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ff2fcd8a/tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java
--
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java
index b31ed3a..a741fd0 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/dom/Document.java
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008, 2009, 2010 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2009, 2010, 2014 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -44,18 +44,39 @@ public final class Document extends Node
 private final MarkupModel model;
 
 private final String encoding;
+
+private final String mimeType;
 
 /**
  * Non-element content that comes between the DOCTYPE and the root element.
  */
 private List preamble;
 
-public Document(MarkupModel model)
+/**
+ * Same as Document(model, null).
+ * @param model a {@link MarkupModel}.
+ */
+public Document(final MarkupModel model)
 {
 this(model, null);
 }
 
-public Document(MarkupModel model, String encoding)
+/**
+ * Same as Document(model, encoding, null).
+ * @param model a {@link MarkupModel}.
+ */
+public Document(final MarkupModel model, final String encoding) {
+this(model, encoding, null);
+}
+
+/**
+ * Creates a document instance with a given markup model, encoding and 
MIME type.
+ * @param model a {@link MarkupModel}.
+ * @param encoding the encoding.
+ * @param mimeType the MIME type.
+ * @since 5.4
+ */
+public Document(final MarkupModel model, final String encoding, final 
String mimeType)
 {
 super(null);
 
@@ -63,6 +84,7 @@ public final class Document extends Node
 
 this.model = model;
 this.encoding = encoding;
+this.mimeType = mimeType;
 }
 
 @Override
@@ -282,4 +304,15 @@ public final class Document extends Node
 {
 return newChild(new CData(null, content));
 }
+
+/**
+ * Returns the MIME type of this document.
+ * @return the MIME type.
+ * @since 5.4
+ */
+public String getMimeType()
+{
+return mimeType;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ff2fcd8a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
index cc11709..67d4dba 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
@@ -23,10 +23,15 @@ import 
org.apache.tapestry5.services.javascript.ModuleConfigurationCallback;
 import org.apache.tapestry5.services.javascript.ModuleManager;
 import org.apache.tapestry5.services.javascript.StylesheetLink;
 
+import java.util.Collections;
 import java.util.List;
+import java.util.Set;
 
 public class DocumentLinkerImpl implements DocumentLinker
 {
+
+private final static Set HTML_MIME_TYPES = 
CollectionFactory.newSet("text/html", "application/xml+xhtml");
+
 private final List c

git commit: Very small performance-relate change: just calling System.nanoTime() if actually using it.

2014-05-28 Thread thiagohp
Repository: tapestry-5
Updated Branches:
  refs/heads/master bb86ff40b -> ab66a31ea


Very small performance-relate change: just calling System.nanoTime() if
actually using it.

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/ab66a31e
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/ab66a31e
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/ab66a31e

Branch: refs/heads/master
Commit: ab66a31eaa9eb2eb2dbace31833731662515a131
Parents: bb86ff4
Author: Thiago H. de Paula Figueiredo 
Authored: Wed May 28 10:29:08 2014 -0300
Committer: Thiago H. de Paula Figueiredo 
Committed: Wed May 28 10:29:08 2014 -0300

--
 .../tapestry5/internal/services/PageResponseRendererImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/ab66a31e/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageResponseRendererImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageResponseRendererImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageResponseRendererImpl.java
index c103d89..71bf591 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageResponseRendererImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageResponseRendererImpl.java
@@ -72,10 +72,10 @@ public class PageResponseRendererImpl implements 
PageResponseRenderer
 }
 writer.toMarkup(pw);
 
-long endNanos = System.nanoTime();
 
 if (debugEnabled)
 {
+long endNanos = System.nanoTime();
 long elapsedNanos = endNanos - startNanos;
 double elapsedSeconds = ((float) elapsedNanos) / 10F;
 



[jira] [Closed] (TAP5-2301) Select needs a context to properly participate in AJAX pages

2014-05-28 Thread Thiago H. de Paula Figueiredo (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiago H. de Paula Figueiredo closed TAP5-2301.
---

Resolution: Fixed

> Select needs a context to properly participate in AJAX pages
> 
>
> Key: TAP5-2301
> URL: https://issues.apache.org/jira/browse/TAP5-2301
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.3, 5.4
>Reporter: Geoff Callender
>Assignee: Thiago H. de Paula Figueiredo
>  Labels: month-of-tapestry
>
> This is a request to bring Select into line with Form, EventLink, and 
> ActionLink, which already have a context.
> There are two issues:
> 1. Currently a containing component, C, can't handle 2 or more AJAX Select 
> components. When one Select sends an event, C has no idea of the value of the 
> other. A context would be a good place to carry this info.
> 2. A deeply nested component, C, cannot handle an event from an AJAX 
> sub-component unless C can reconstruct its context, ie. C has to be able to 
> restore its parameters. A context would allow this.
> This issue was discussed more fully in "Discussion on all AJAX requests 
> needing context": 
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Discussion-on-all-AJAX-requests-needing-context-tt5726132.html
> I propose that server-side, Select triggers a new event with the context 
> parameters before it triggers ON_VALUE_CHANGED, e.g..
> @Parameter 
> private Integer myParameter;
> public void onPrepareFromMySelect(Integer myParameter, String 
> otherSelectsValue) {
> this.myParameter = myParameter;
> this. otherSelectsValue = otherSelectsValue;
> }
> public void onValueChangedFromMySelect(Integer myChoice) {
> // Do something then return zone(s).
> }
> Grid needs a context too (!) but it looks like I'm not authorised to tag it 
> as a related issue: https://issues.apache.org/jira/browse/TAP5-2297 .



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (TAP5-1412) Update Multiple Individual Zones Within A Loop

2014-05-28 Thread Thiago H. de Paula Figueiredo (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-1412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011060#comment-14011060
 ] 

Thiago H. de Paula Figueiredo commented on TAP5-1412:
-

^^^ together with your code providing client ids (i.e. not letting Zone itself 
generate them).

> Update Multiple Individual Zones Within A Loop
> --
>
> Key: TAP5-1412
> URL: https://issues.apache.org/jira/browse/TAP5-1412
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.2
>Reporter: Mark Shead
>Priority: Minor
>  Labels: bulk-close-candidate
> Fix For: 5.3
>
>
> This is a use case that I cannot seem to find a way to do with Tapestry.  I 
> have asked on the list and there haven't been any suggested work arounds so 
> it might be a use case worth considering as an improvement.
> Given a form that contains a list that contains a zone there does not appear 
> to be anyway to update specific zones (from the loop) using the context at 
> which the zone was rendered.  For example:
> |__QTY__|_ITEM__|__PRICE___|
> |__1_|_soup__|$1|
> |__3_|_peas__|$3|
> Assume that the price  for each item is in a zone and the qty is in a text 
> box.  As the user changes the qty, the price should change to reflect the 
> correct price for that number of items.  This works fine.  However, if there 
> is some type of qty discount (buy 5 items get 10% of normal pricing) we can't 
> have a change from the soup qty text box update both the soup price and the 
> peas price without sticking the entire loop in a zone. (Sticking everything 
> in the zone will work in some cases, but there are others where you'd want to 
> build a multizone update to update the sections that need to be changed.)
> The ideal situation would seem to be to give the zone a context parameter--in 
> this case item.  When the zone is updated, it would make sure that the 
> property used as the context was set back to whatever value was used when the 
> zone was originally rendered. I'm not sure this would be possible because we 
> are talking about a context that is present on the target of the update--not 
> the trigger.
> Is something like this possible or is there another approach that will let 
> you update specific zones that are rendered within a loop?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (TAP5-1412) Update Multiple Individual Zones Within A Loop

2014-05-28 Thread Thiago H. de Paula Figueiredo (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-1412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiago H. de Paula Figueiredo closed TAP5-1412.
---

   Resolution: Fixed
Fix Version/s: 5.3

I believe this ticket is covered by AjaxResponseRenderer.

> Update Multiple Individual Zones Within A Loop
> --
>
> Key: TAP5-1412
> URL: https://issues.apache.org/jira/browse/TAP5-1412
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.2
>Reporter: Mark Shead
>Priority: Minor
>  Labels: bulk-close-candidate
> Fix For: 5.3
>
>
> This is a use case that I cannot seem to find a way to do with Tapestry.  I 
> have asked on the list and there haven't been any suggested work arounds so 
> it might be a use case worth considering as an improvement.
> Given a form that contains a list that contains a zone there does not appear 
> to be anyway to update specific zones (from the loop) using the context at 
> which the zone was rendered.  For example:
> |__QTY__|_ITEM__|__PRICE___|
> |__1_|_soup__|$1|
> |__3_|_peas__|$3|
> Assume that the price  for each item is in a zone and the qty is in a text 
> box.  As the user changes the qty, the price should change to reflect the 
> correct price for that number of items.  This works fine.  However, if there 
> is some type of qty discount (buy 5 items get 10% of normal pricing) we can't 
> have a change from the soup qty text box update both the soup price and the 
> peas price without sticking the entire loop in a zone. (Sticking everything 
> in the zone will work in some cases, but there are others where you'd want to 
> build a multizone update to update the sections that need to be changed.)
> The ideal situation would seem to be to give the zone a context parameter--in 
> this case item.  When the zone is updated, it would make sure that the 
> property used as the context was set back to whatever value was used when the 
> zone was originally rendered. I'm not sure this would be possible because we 
> are talking about a context that is present on the target of the update--not 
> the trigger.
> Is something like this possible or is there another approach that will let 
> you update specific zones that are rendered within a loop?



--
This message was sent by Atlassian JIRA
(v6.2#6252)