Seam SVN: r11790 - in modules/remoting/trunk/examples/model/src/main/resources: META-INF and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 20:44:54 -0500 (Mon, 07 Dec 2009)
New Revision: 11790
Added:
modules/remoting/trunk/examples/model/src/main/resources/import.sql
Removed:
modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql
Log:
still some packaging issues...
Deleted: modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql 2009-12-08 01:41:58 UTC (rev 11789)
+++ modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql 2009-12-08 01:44:54 UTC (rev 11790)
@@ -1,3 +0,0 @@
-insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
-
-
Added: modules/remoting/trunk/examples/model/src/main/resources/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/import.sql (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/resources/import.sql 2009-12-08 01:44:54 UTC (rev 11790)
@@ -0,0 +1,3 @@
+insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
+
+
15 years
Seam SVN: r11789 - branches/community/Seam_2_2/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 20:41:58 -0500 (Mon, 07 Dec 2009)
New Revision: 11789
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/security/RememberMe.java
Log:
fix base64 encoding issue (see http://www.seamframework.org/Community/AdvanceAuthentication)
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/security/RememberMe.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/security/RememberMe.java 2009-12-07 15:51:10 UTC (rev 11788)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/security/RememberMe.java 2009-12-08 01:41:58 UTC (rev 11789)
@@ -219,7 +219,7 @@
sb.append(username);
sb.append(":");
sb.append(value);
- return Base64.encodeBytes(sb.toString().getBytes());
+ return Base64.encodeBytes(sb.toString().getBytes(), Base64.DONT_BREAK_LINES);
}
public String getCookiePath()
15 years
Seam SVN: r11788 - in modules/remoting/trunk/examples/model/src/main: resources and 2 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 10:51:10 -0500 (Mon, 07 Dec 2009)
New Revision: 11788
Added:
modules/remoting/trunk/examples/model/src/main/resources/
modules/remoting/trunk/examples/model/src/main/resources/META-INF/
modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql
modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml
modules/remoting/trunk/examples/model/src/main/resources/META-INF/seam-model-ds.xml
Removed:
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml
Log:
move persistence config to correct location
Added: modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/resources/META-INF/import.sql 2009-12-07 15:51:10 UTC (rev 11788)
@@ -0,0 +1,3 @@
+insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
+
+
Added: modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml 2009-12-07 15:51:10 UTC (rev 11788)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="model">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>modelDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <!-- These are the default for JBoss EJB 3, but not for Hibernate EntityManager -->
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+</persistence>
Added: modules/remoting/trunk/examples/model/src/main/resources/META-INF/seam-model-ds.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/META-INF/seam-model-ds.xml (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/resources/META-INF/seam-model-ds.xml 2009-12-07 15:51:10 UTC (rev 11788)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>modelDatasource</jndi-name>
+ <use-java-context>false</use-java-context>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ </local-tx-datasource>
+
+</datasources>
Deleted: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql 2009-12-07 15:30:54 UTC (rev 11787)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql 2009-12-07 15:51:10 UTC (rev 11788)
@@ -1,3 +0,0 @@
-insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
-
-
Deleted: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml 2009-12-07 15:30:54 UTC (rev 11787)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml 2009-12-07 15:51:10 UTC (rev 11788)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="model">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>modelDatasource</jta-data-source>
- <properties>
- <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
- <property name="hibernate.show_sql" value="true"/>
- <!-- These are the default for JBoss EJB 3, but not for Hibernate EntityManager -->
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
- <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
- </properties>
- </persistence-unit>
-</persistence>
Deleted: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml 2009-12-07 15:30:54 UTC (rev 11787)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml 2009-12-07 15:51:10 UTC (rev 11788)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE datasources
- PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-<datasources>
-
- <local-tx-datasource>
- <jndi-name>modelDatasource</jndi-name>
- <use-java-context>false</use-java-context>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- </local-tx-datasource>
-
-</datasources>
15 years
Seam SVN: r11787 - in modules/remoting/trunk: src/main/java/org/jboss/seam/remoting and 2 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 10:30:54 -0500 (Mon, 07 Dec 2009)
New Revision: 11787
Modified:
modules/remoting/trunk/pom.xml
modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java
modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelRegistry.java
modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
Log:
fix various model handler exceptions
Modified: modules/remoting/trunk/pom.xml
===================================================================
--- modules/remoting/trunk/pom.xml 2009-12-07 15:30:05 UTC (rev 11786)
+++ modules/remoting/trunk/pom.xml 2009-12-07 15:30:54 UTC (rev 11787)
@@ -80,6 +80,14 @@
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- non portable dependency -->
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
+ <version>1.0.0</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified: modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
===================================================================
--- modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java 2009-12-07 15:30:05 UTC (rev 11786)
+++ modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java 2009-12-07 15:30:54 UTC (rev 11787)
@@ -69,7 +69,7 @@
final Element env = doc.getRootElement();
final RequestContext ctx = new RequestContext(env.element("header"));
- if (!ctx.getConversationId().isEmpty())
+ if (ctx.getConversationId() != null && !ctx.getConversationId().isEmpty())
{
// this is non portable ;/
conversationManager.beginOrRestoreConversation(ctx.getConversationId());
Modified: modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java
===================================================================
--- modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java 2009-12-07 15:30:05 UTC (rev 11786)
+++ modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelHandler.java 2009-12-07 15:30:54 UTC (rev 11787)
@@ -63,7 +63,7 @@
final Element env = doc.getRootElement();
final RequestContext ctx = new RequestContext(env.element("header"));
- if (!ctx.getConversationId().isEmpty())
+ if (ctx.getConversationId() != null && !ctx.getConversationId().isEmpty())
{
conversationManager.beginOrRestoreConversation(ctx.getConversationId());
}
@@ -73,7 +73,7 @@
for (Element modelElement : (List<Element>) env.element("body").elements("model"))
{
String operation = modelElement.attributeValue("operation");
- String id = modelElement.attributeValue("id");
+ String callId = modelElement.attributeValue("callId");
if ("fetch".equals(operation))
{
@@ -89,24 +89,31 @@
Element paramsElement = actionElement.element("params");
Element refsElement = actionElement.element("refs");
- action = new Call(beanManager, id, targetElement.getTextTrim(),
- qualifiersElement.getTextTrim(), methodElement.getTextTrim());
+ action = new Call(beanManager, callId, targetElement.getTextTrim(),
+ qualifiersElement != null ? qualifiersElement.getTextTrim() : null,
+ methodElement != null ? methodElement.getTextTrim() : null);
- for (Element refElement : (List<Element>) refsElement.elements("ref"))
+ if (refsElement != null)
{
- action.getContext().createWrapperFromElement(refElement);
+ for (Element refElement : (List<Element>) refsElement.elements("ref"))
+ {
+ action.getContext().createWrapperFromElement(refElement);
+ }
+
+ for (Wrapper w : action.getContext().getInRefs().values())
+ {
+ w.unmarshal();
+ }
}
- for (Wrapper w : action.getContext().getInRefs().values())
+ if (paramsElement != null)
{
- w.unmarshal();
+ for (Element paramElement : (List<Element>) paramsElement.elements("param"))
+ {
+ action.addParameter(action.getContext().createWrapperFromElement(
+ (Element) paramElement.elements().get(0)));
+ }
}
-
- for (Element paramElement : (List<Element>) paramsElement.elements("param"))
- {
- action.addParameter(action.getContext().createWrapperFromElement(
- paramElement));
- }
}
for (Element beanElement : (List<Element>) modelElement.elements("bean"))
@@ -117,8 +124,8 @@
model.addBean(beanElement.attributeValue("alias"),
beanNameElement.getTextTrim(),
- beanQualifierElement.getTextTrim(),
- beanPropertyElement.getTextTrim());
+ beanQualifierElement != null ? beanQualifierElement.getTextTrim() : null,
+ beanPropertyElement != null ? beanPropertyElement.getTextTrim() : null);
}
// TODO Unmarshal expressions - don't support this until security implications investigated
Modified: modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelRegistry.java
===================================================================
--- modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelRegistry.java 2009-12-07 15:30:05 UTC (rev 11786)
+++ modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/model/ModelRegistry.java 2009-12-07 15:30:54 UTC (rev 11787)
@@ -4,11 +4,11 @@
import java.util.HashMap;
import java.util.Map;
-import javax.enterprise.context.ConversationScoped;
+import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
-@ConversationScoped
+@SessionScoped
public class ModelRegistry implements Serializable
{
private static final long serialVersionUID = -2952670948046596460L;
Modified: modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
===================================================================
--- modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-07 15:30:05 UTC (rev 11786)
+++ modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-07 15:30:54 UTC (rev 11787)
@@ -863,7 +863,7 @@
Seam.Remoting.Model.prototype.createFetchRequest = function(a) { // a = action
var callId = "" + Seam.Remoting.__callId++;
- var d = "<model operation=\"fetch\" callId=\"" + callId + ">";
+ var d = "<model operation=\"fetch\" callId=\"" + callId + "\">";
var refs = new Array();
if (a) {
@@ -897,7 +897,7 @@
if (this.beans.length > 0) {
for (var i = 0; i < this.beans.length; i++) {
var b = this.beans[i];
- d += "<bean alias=\"" + b.alias + "\"><name>" + b.name + "</name>";
+ d += "<bean alias=\"" + b.alias + "\"><name>" + b.bean + "</name>";
if (b.qualifiers && b.qualifiers.length > 0) {
d += "<qualifiers>";
for (var j = 0; j < b.qualifiers.length; j++) {
15 years
Seam SVN: r11786 - in modules/remoting/trunk/examples/model/src/main: webapp and 1 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 10:30:05 -0500 (Mon, 07 Dec 2009)
New Revision: 11786
Added:
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml
modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml
Modified:
modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/CustomerAction.java
modules/remoting/trunk/examples/model/src/main/webapp/model.html
Log:
add persistence to example
Modified: modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/CustomerAction.java
===================================================================
--- modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/CustomerAction.java 2009-12-07 14:17:26 UTC (rev 11785)
+++ modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/CustomerAction.java 2009-12-07 15:30:05 UTC (rev 11786)
@@ -6,29 +6,35 @@
import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import org.jboss.seam.remoting.annotations.WebRemote;
+
@ConversationScoped
public class CustomerAction implements Serializable
{
private static final long serialVersionUID = 8350706339578435242L;
- @Inject EntityManager entityManager;
+ @PersistenceContext EntityManager entityManager;
@Inject Conversation conversation;
private Customer customer;
+ @WebRemote
public void createCustomer()
{
conversation.begin();
customer = new Customer();
}
+ @WebRemote
public void editCustomer(Integer customerId)
{
conversation.begin();
customer = entityManager.find(Customer.class, customerId);
}
+ @WebRemote
public void saveCustomer()
{
if (customer.getCustomerId() == null)
Added: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/import.sql 2009-12-07 15:30:05 UTC (rev 11786)
@@ -0,0 +1,3 @@
+insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
+
+
Added: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/persistence.xml 2009-12-07 15:30:05 UTC (rev 11786)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="model">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>modelDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <!-- These are the default for JBoss EJB 3, but not for Hibernate EntityManager -->
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ </properties>
+ </persistence-unit>
+</persistence>
Added: modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml (rev 0)
+++ modules/remoting/trunk/examples/model/src/main/webapp/WEB-INF/seam-model-ds.xml 2009-12-07 15:30:05 UTC (rev 11786)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>modelDatasource</jndi-name>
+ <use-java-context>false</use-java-context>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ </local-tx-datasource>
+
+</datasources>
Modified: modules/remoting/trunk/examples/model/src/main/webapp/model.html
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/model.html 2009-12-07 14:17:26 UTC (rev 11785)
+++ modules/remoting/trunk/examples/model/src/main/webapp/model.html 2009-12-07 15:30:05 UTC (rev 11786)
@@ -18,10 +18,25 @@
<script type="text/javascript">
//<![CDATA[
+ function loadCustomer() {
+ var customerId = document.getElementById("customerId").value;
+
+ var callback = function(result) { alert("got result: " + result); };
+ var model = new Seam.Remoting.Model();
+
+ model.addBean("customer", "org.jboss.seam.remoting.examples.model.CustomerAction", "customer");
+ model.fetch(new Seam.Remoting.Action()
+ .setBeanType("org.jboss.seam.remoting.examples.model.CustomerAction")
+ .setMethod("editCustomer")
+ .addParam(customerId));
+ }
// ]]>
- }
- </script>
+ </script>
+
+ <label for="customerId">Customer ID</label><input type="text" id="customerId" value="1"/>
+
+ <button onclick="javascript:loadCustomer()">Load customer</button>
</body>
15 years
Seam SVN: r11785 - in modules/remoting/trunk/src/main: resources/org/jboss/seam/remoting and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 09:17:26 -0500 (Mon, 07 Dec 2009)
New Revision: 11785
Modified:
modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java
modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
Log:
fixed compiler error, more js stuff
Modified: modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java
===================================================================
--- modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java 2009-12-07 12:21:48 UTC (rev 11784)
+++ modules/remoting/trunk/src/main/java/org/jboss/seam/remoting/Remoting.java 2009-12-07 14:17:26 UTC (rev 11785)
@@ -16,6 +16,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.jboss.seam.remoting.model.ModelHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
===================================================================
--- modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-07 12:21:48 UTC (rev 11784)
+++ modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-07 14:17:26 UTC (rev 11785)
@@ -791,6 +791,50 @@
}
}
+Seam.Remoting.processModelResponse = function(doc) {
+ var headerNode;
+ var bodyNode;
+ var inScope = typeof(Seam) == "undefined" ? false : true;
+ if (!inScope) return;
+
+ var context = new Seam.Remoting.__Context;
+
+ if (doc.documentElement) {
+ for (var i = 0; i < doc.documentElement.childNodes.length; i++) {
+ var node = doc.documentElement.childNodes.item(i);
+ if (node.tagName == "header")
+ headerNode = node;
+ else if (node.tagName == "body")
+ bodyNode = node;
+ }
+ }
+ if (headerNode) {
+ var contextNode;
+ for (var i = 0; i < headerNode.childNodes.length; i++) {
+ var node = headerNode.childNodes.item(i);
+ if (node.tagName == "context") {
+ contextNode = node;
+ break;
+ }
+ }
+ if (contextNode && context) {
+ Seam.Remoting.unmarshalContext(contextNode, context);
+ if (context.getConversationId() && Seam.Remoting.getContext().getConversationId() == null)
+ Seam.Remoting.getContext().setConversationId(context.getConversationId());
+ }
+ }
+ if (bodyNode) {
+ for (var i = 0; i < bodyNode.childNodes.length; i++) {
+ var n = bodyNode.childNodes.item(i);
+ if (n.tagName == "model") Seam.Remoting.processModel(n, context);
+ }
+ }
+}
+
+Seam.Remoting.processModel = function(n, ctx) {
+
+}
+
Seam.Remoting.Model = function() {
this.expressions = new Array();
this.beans = new Array();
@@ -814,7 +858,7 @@
var r = this.createFetchRequest(action);
var env = Seam.Remoting.createEnvelope(Seam.Remoting.createHeader(), r.data);
Seam.Remoting.pendingCalls.put(r.id, r);
- Seam.Remoting.sendAjaxRequest(env, Seam.Remoting.PATH_MODEL, this.processFetchResponse, false);
+ Seam.Remoting.sendAjaxRequest(env, Seam.Remoting.PATH_MODEL, Seam.Remoting.processModelResponse, false);
}
Seam.Remoting.Model.prototype.createFetchRequest = function(a) { // a = action
15 years
Seam SVN: r11784 - modules.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 07:21:48 -0500 (Mon, 07 Dec 2009)
New Revision: 11784
Removed:
modules/trunk/
Log:
removed modules/trunk
15 years
Seam SVN: r11783 - modules.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 07:04:17 -0500 (Mon, 07 Dec 2009)
New Revision: 11783
Removed:
modules/wicket/
Log:
removed wicket module
15 years
Seam SVN: r11782 - modules.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 07:03:55 -0500 (Mon, 07 Dec 2009)
New Revision: 11782
Removed:
modules/web/
Log:
removed web module
15 years
Seam SVN: r11781 - modules.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-12-07 07:02:48 -0500 (Mon, 07 Dec 2009)
New Revision: 11781
Removed:
modules/ui/
Log:
removed ui module
15 years