| From | Sent On | Attachments |
|---|---|---|
| Gregory Murray | Apr 10, 2007 10:44 pm | |
| Norbert Truchsess | Apr 11, 2007 12:03 am | |
| Norbert Truchsess | Apr 11, 2007 12:05 am | |
| Gregory Murray | Apr 11, 2007 12:26 am | |
| Gregory Murray | Apr 11, 2007 12:48 am | |
| Craig McClanahan | Apr 11, 2007 12:58 am | |
| Craig McClanahan | Apr 11, 2007 1:19 am | |
| Ed Burns | Apr 11, 2007 6:32 pm | |
| Ed Burns | Apr 11, 2007 7:52 pm | |
| Craig McClanahan | Apr 11, 2007 7:53 pm | |
| Ed Burns | Apr 11, 2007 8:28 pm | |
| Craig McClanahan | Apr 11, 2007 9:41 pm | |
| Craig McClanahan | Apr 11, 2007 9:44 pm | |
| Craig McClanahan | Apr 11, 2007 9:51 pm | |
| Norbert Truchsess | Apr 11, 2007 10:08 pm | |
| Norbert Truchsess | Apr 11, 2007 10:15 pm | |
| Craig McClanahan | Apr 12, 2007 12:19 am | |
| Norbert Truchsess | Apr 12, 2007 1:19 pm | |
| Norbert Truchsess | Apr 12, 2007 2:54 pm | |
| Norbert Truchsess | Apr 12, 2007 3:43 pm | |
| Gregory Murray | Apr 14, 2007 4:56 pm | |
| Gregory Murray | Apr 14, 2007 5:03 pm | |
| Craig McClanahan | Apr 14, 2007 5:06 pm | |
| Ed Burns | Apr 16, 2007 8:18 am | |
| Gregory Murray | Apr 16, 2007 8:32 am | |
| Ed Burns | Apr 16, 2007 8:55 am | |
| Gregory Murray | Apr 16, 2007 9:09 am | |
| Norb...@t-online.de | Apr 16, 2007 9:21 am | |
| Ed Burns | Apr 17, 2007 9:59 am | |
| Craig McClanahan | Apr 17, 2007 10:23 am | |
| Norbert Truchsess | Apr 17, 2007 1:05 pm | |
| Craig McClanahan | Apr 17, 2007 3:30 pm | |
| Gregory Murray | Apr 18, 2007 1:54 am | |
| Norb...@t-online.de | Apr 18, 2007 4:44 am | |
| Norbert Truchsess | Apr 19, 2007 1:40 pm |
| Subject: | Review: Issues: ajax-137, widgets-1: Fix DynaFaces | |
|---|---|---|
| From: | Norbert Truchsess (norb...@t-online.de) | |
| Date: | Apr 12, 2007 2:54:49 pm | |
| List: | net.java.dev.ajax.dev | |
Ed,
the change to 'buildDynamicResourceReference' is not the propper way to address the issue of 'do I ever render a service-url based on the sematics of a MethodExpression'. The method is in there for no other porpose then to allow exactly this.
This should be changed in jmaki.runtime.jsf.AjaxWrapperRenderer, where this method is being called. I'm going to make a proposal for this.
- Norbert
Norbert Truchsess schrieb:
I will look into this later today....
- Norbert
Ed Burns schrieb:
I was given the mandate to make sure DynaFaces worked with jMaki. I had to make some small changes, covered in issues
https://ajax.dev.java.net/issues/show_bug.cgi?id=137
https://widgets.dev.java.net/issues/show_bug.cgi?id=1
Here are the change-bundles.
Please review.
I won't check it in until review, but I will update the maven repo to have these changes so DynaFaces will build and work for Rajiv.
Issue: https://ajax.dev.java.net/issues/show_bug.cgi?id=137
SECTION: Changes
M jmaki/ajax-wrapper-comp-pom.xml
- update pom version to 1.0-SNAPSHOT
M jmaki/build.xml
- Fix maven repo related targets to use correct version number
- Add mvn.install.jar target to manually install ajax-wrapper-comp.jar into local repo.
M jmaki/shared/src/java/jmaki/runtime/jsf/AjaxWrapperRenderer.java
- Roll back Greg's change to uuid generation mechanism.
+ // edburns: Greg, I've commented out the above line because the uuid + // needs to be the actual jsf client id, otherwise, how can the value + // of the component be associated with the component instance that + // is the second argument to this method?
M jmaki/shared/src/java/jmaki/runtime/jsf/JsfUriManagerImpl.java
- buildDynamicResourceReference was not correctly implemented with respect to JSF. See diffs.
SECTION: Diffs
Index: jmaki/ajax-wrapper-comp-pom.xml =================================================================== RCS file: /cvs/ajax/ws/jmaki/ajax-wrapper-comp-pom.xml,v retrieving revision 1.2 diff -u -r1.2 ajax-wrapper-comp-pom.xml --- jmaki/ajax-wrapper-comp-pom.xml 22 Nov 2006 21:43:08 -0000 1.2 +++ jmaki/ajax-wrapper-comp-pom.xml 12 Apr 2007 03:15:15 -0000 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> - <groupId>com.sun.jmaki</groupId> + <groupId>jmaki</groupId> <artifactId>ajax-wrapper-comp</artifactId> - <version>0.6-SNAPSHOT</version> + <version>1.0-SNAPSHOT</version> <description>This is the master POM file for Sun's Implementation of - the jMaki.</description> + jMaki.</description> <url>http://ajax.dev.java.net/</url> <issueManagement> <system>issueZilla</system> Index: jmaki/build.xml =================================================================== RCS file: /cvs/ajax/ws/jmaki/build.xml,v retrieving revision 1.76 diff -u -r1.76 build.xml --- jmaki/build.xml 11 Apr 2007 14:56:48 -0000 1.76 +++ jmaki/build.xml 12 Apr 2007 03:15:15 -0000 @@ -371,14 +371,14 @@
<!-- Create the source distribution --> <mkdir dir="${basedir}/dist" /> - <jar destfile="${basedir}/dist/${name}-sources-0${jmaki.version}-SNAPSHOT.zip">
+ <jar destfile="${basedir}/dist/${name}-sources-${jmaki.version}.zip"> <zipfileset dir="${basedir}/.."
excludes="**/CVS/**,**/build/**,**/dist/**,**/target/**"/> </jar>
<delete dir="${basedir}/dist/maven-repo" /><!-- clean it --> <maven-repository-importer destdir="${basedir}/dist/maven-repo" version="${snapshot.version}"> - <artifact jar="${basedir}/shared/dist/${name}.jar" pom="ajax-wrapper-comp-pom.xml" srczip="${basedir}/dist/${name}-sources-0${jmaki.version}-SNAPSHOT.zip"/>
+ <artifact jar="${basedir}/shared/dist/${name}.jar" pom="ajax-wrapper-comp-pom.xml" srczip="${basedir}/dist/${name}-sources-${jmaki.version}.zip"/> </maven-repository-importer> </target>
@@ -388,7 +388,7 @@ <echo>importing to CVS...</echo> <cvs dest="${basedir}/dist/maven-repo"> <commandline> - <argument value="-d:pserver:${user.name}@rejuniper.sfbay.sun.com:/cvs" /> + <argument value="-d:pserver:${user.name}@cvs.dev.java.net:/cvs" /> <argument line="-z9 import -ko -W *.jar -kb -m" /> <argument value="deploying new jars to the java.net maven repository" />
@@ -398,5 +398,13 @@ </cvs> </target>
+<target name="mvn.install.jar" description="install ajax-wrapper-comp into the local maven repo."> + + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=jmaki -DartifactId=ajax-wrapper-comp -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=${basedir}/shared/dist/ajax-wrapper-comp.jar" /> + </exec> +</target> + + </project> Index: jmaki/shared/src/java/jmaki/runtime/jsf/AjaxWrapperRenderer.java =================================================================== RCS file: /cvs/ajax/ws/jmaki/shared/src/java/jmaki/runtime/jsf/AjaxWrapperRenderer.java,v
retrieving revision 1.4 diff -u -r1.4 AjaxWrapperRenderer.java
--- jmaki/shared/src/java/jmaki/runtime/jsf/AjaxWrapperRenderer.java 11 Apr 2007 17:40:46 -0000 1.4 +++ jmaki/shared/src/java/jmaki/runtime/jsf/AjaxWrapperRenderer.java 12 Apr 2007 03:15:15 -0000 @@ -112,8 +112,12 @@ // unique ids are unique to a page and not to an session meaning that if we inject // content from one page into another the same widget can be given the same id thus // the same id appears 2x in the same page. - ajaxCommon.setUuid(wrapper.getName().replace('.', '_') + "_" + nextId++); - //ajaxCommon.setUuid(wrapper.getClientId(context)); + // ajaxCommon.setUuid(wrapper.getName().replace('.', '_') + "_" + nextId++); + // edburns: Greg, I've commented out the above line because the uuid + // needs to be the actual jsf client id, otherwise, how can the value + // of the component be associated with the component instance that + // is the second argument to this method? + ajaxCommon.setUuid(wrapper.getClientId(context)); ajaxCommon.setTemplate(wrapper.getTemplate()); ajaxCommon.setArgs(wrapper.getArgs());
Index: jmaki/shared/src/java/jmaki/runtime/jsf/JsfUriManagerImpl.java =================================================================== RCS file: /cvs/ajax/ws/jmaki/shared/src/java/jmaki/runtime/jsf/JsfUriManagerImpl.java,v
retrieving revision 1.1 diff -u -r1.1 JsfUriManagerImpl.java --- jmaki/shared/src/java/jmaki/runtime/jsf/JsfUriManagerImpl.java 11 Apr 2007 17:28:23 -0000 1.1 +++ jmaki/shared/src/java/jmaki/runtime/jsf/JsfUriManagerImpl.java 12 Apr 2007 03:15:16 -0000 @@ -14,10 +14,12 @@ public class JsfUriManagerImpl implements UriManager,UriManagerFactory {
public String buildClassPathResourceReference(AjaxContext ctx, String resource) { - if (ctx.getIsExtensionMapped()) - return ctx.getApplicationRoot()+jsfRoot+resource; - else + if (ctx.getIsExtensionMapped()) { + return ctx.getApplicationRoot()+getJsfRoot()+resource; + } + else { return ctx.getServletRoot()+resource; + } }
public String buildWebAppResourceReference(AjaxContext ctx, String resource) { @@ -29,11 +31,37 @@ }
public String buildDynamicResourceReference(AjaxContext ctx, String resource) { - if (resource.startsWith("#{") && resource.endsWith("}")) { - resource = resource.substring(2, resource.length()-1)+AjaxWrapperPhaseListener.JMAKI_AJAX; - } - return jsfRoot==null ? ctx.getServletRoot()+resource : ctx.getApplicationRoot()+jsfRoot+resource; - } + String result = null; + FacesContext facesContext = FacesContext.getCurrentInstance(); + // PENDING(edburns): this is bogus! I'm sick of fixing this again and + // again. If resource is a JSF ValueExpression. This method + // must return something that, when appended to the context-root + // of this application, will cause the postback to just be + // sent back to the faces page. + + if (resource.startsWith("#{") && resource.endsWith("}")) { + String facesMapping = + Util.getFacesMapping(facesContext); + String viewId = facesContext.getViewRoot().getViewId(); + String resultPath = null; + if (ctx.getIsExtensionMapped()) { + resultPath = ""; + } + else { + resultPath = facesMapping + "/" + viewId; + } + result = ctx.getServletRoot() + resultPath; + } + else { + result = ctx.getServletRoot() + + resource.substring(2,resource.length()-1) + + AjaxWrapperPhaseListener.JMAKI_AJAX; + } + return result; + } +//resource = +// } +// return jsfRoot==null ? resource : ctx.getApplicationRoot()+jsfRoot+resource;
public UriManager getInstance(ServletContext ctx) { if (!this.isInitialized) init(ctx); @@ -43,16 +71,45 @@ private boolean isInitialized = false;
private void init(ServletContext ctx) { - if (ctx.getInitParameter(AjaxInitParameters.JSFROOT)!=null) { - jsfRoot = ctx.getInitParameter(AjaxInitParameters.JSFROOT); - } else - jsfRoot = "/faces"; if (ctx.getInitParameter(AjaxInitParameters.EXTERNALROOT)!=null) { - externalRoot = ctx.getInitParameter(AjaxInitParameters.EXTERNALROOT); - } + externalRoot = ctx.getInitParameter(AjaxInitParameters.EXTERNALROOT); + } + + // Use either a user specified JSF Root + // (Can't see why this would be necessary) or a heuristic. + if (ctx.getInitParameter(AjaxInitParameters.JSFROOT)!=null) { + initTimeJsfRoot = ctx.getInitParameter(AjaxInitParameters.JSFROOT); + } + else { + initTimeJsfRoot = "/faces"; + } + this.isInitialized = true; } - - private String jsfRoot = null; + private String externalRoot = null; + + private String initTimeJsfRoot = null; + + private String jsfRoot = null; + + private String getJsfRoot() { + if (null == jsfRoot) { + FacesContext facesContext = FacesContext.getCurrentInstance(); + // If we can't get a FacesContext, just use the initTime value + if (null != facesContext) { + jsfRoot = initTimeJsfRoot; + } + else { + jsfRoot = Util.getFacesMapping(facesContext); + // If the the FacesServlet is extension mapped... + if (!Util.isPrefixMapped(jsfRoot)) { + // the jsfRoot is the empty string, and care + // must be taken to append the proper mapping + jsfRoot = ""; + } + } + } + return jsfRoot; + } }
Issue: https://widgets.dev.java.net/issues/show_bug.cgi?id=1
SECTION: Changes
A code/widgets/scriptaculous/jmaki-resources-scriptaculous-pom.xml
- pom for putting the jar in the maven repo.
M code/widgets/scriptaculous/src/resources/scriptaculous/inplace/component.js
- If the widget set an outResult property use that as the result. That's the contract!
M code/widgets/scriptaculous/build.xml M code/widgets/dojo/build.xml
- added target to install into local maven repo
SECTION: Diffs
Index: code/widgets/scriptaculous/jmaki-resources-scriptaculous-pom.xml ===================================================================
--- code/widgets/scriptaculous/jmaki-resources-scriptaculous-pom.xml (revision 0) +++ code/widgets/scriptaculous/jmaki-resources-scriptaculous-pom.xml (revision 0) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>jmaki</groupId> + <artifactId>jmaki-resources-scriptaculous</artifactId> + <version>1.0-SNAPSHOT</version> + <description>This is the master POM file for Sun's Implementation of + jMaki.</description> + <url>http://ajax.dev.java.net/</url> + <issueManagement> + <system>issueZilla</system> + <url>https://ajax.dev.java.net/servlets/ProjectIssues</url> + </issueManagement> + <mailingLists> + <mailingList> + <name>Sun's jMaki Implementation Dev List</name> + <post>de...@ajax.dev.java.net</post> + <archive>https://ajax.dev.java.net/servlets/SummarizeList?listName=dev</archive>
+ </mailingList> + </mailingLists> + <developers> + <developer> + <id>gmurray71</id> + <name>Gregory.Murray</name> + <email>Greg...@sun.com</email> + <organization>Sun Microsystems, Inc.</organization> + <roles> + <role>project-owner</role> + </roles> + <timezone>-9</timezone> + </developer> + </developers> + <contributors> + <contributor> + <name>Ed Burns</name> + </contributor> + </contributors> + <licenses> + <license> + <name>Berkeley License</name> + <url>http://developers.sun.com/berkeley_license.html</url> + <distribution>repo</distribution> + </license> + </licenses> + <organization> + <name>Sun Microsystems, Inc</name> + <url>http://www.sun.com/</url> + </organization> + <dependencies> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet.jsp</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.faces</groupId> + <artifactId>jsf-api</artifactId> + <version>1.1_02</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> Index: code/widgets/scriptaculous/src/resources/scriptaculous/inplace/component.js
===================================================================
--- code/widgets/scriptaculous/src/resources/scriptaculous/inplace/component.js (revision 126) +++ code/widgets/scriptaculous/src/resources/scriptaculous/inplace/component.js (working copy) @@ -21,9 +21,8 @@ } else { result = Form.serialize(form); + if (!wargs.service) wInstance.wrapper.element.innerHTML = value; } - result = Form.serialize(form); - if (!wargs.service) wInstance.wrapper.element.innerHTML = value; return result; }, onComplete: function(transport, element) { Index: code/widgets/scriptaculous/build.xml =================================================================== --- code/widgets/scriptaculous/build.xml (revision 126) +++ code/widgets/scriptaculous/build.xml (working copy) @@ -46,6 +46,14 @@ </jar> </target>
+<target name="mvn.install.jar" description="install jmaki-resources-scriptaculous into the local maven repo."> + + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=jmaki -DartifactId=jmaki-resources-scriptaculous -Dversion=1.6.4 -Dpackaging=jar -Dfile=${basedir}/dist/jmaki-resources-scriptaculous.jar " /> + </exec> +</target> + + <target name="clean"> <delete dir="${build.dir}" /> <delete dir="dist" /> Index: code/widgets/dojo/build.xml =================================================================== --- code/widgets/dojo/build.xml (revision 126) +++ code/widgets/dojo/build.xml (working copy) @@ -47,5 +47,13 @@ includes="META-INF/**"/> </jar> </target> + +<target name="mvn.install.jar" description="install jmaki-resources-dojo into the local maven repo."> + + <exec executable="mvn"> + <arg line="install:install-file -DgroupId=jmaki -DartifactId=jmaki-resources-dojo -Dversion=0.4.2 -Dpackaging=jar -Dfile=${basedir}/dist/jmaki-resources-dojo.jar " /> + </exec> +</target> + </project>





