Author: scabanovich
Date: 2007-07-23 09:28:20 -0400 (Mon, 23 Jul 2007)
New Revision: 2603
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java
Log:
EXIN-86 xml validation by meta for web.xml fixed
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java 2007-07-23
13:09:01 UTC (rev 2602)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/webapp/model/FileWebAppLoader.java 2007-07-23
13:28:20 UTC (rev 2603)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.jst.web.webapp.model;
+import java.util.Set;
+
import org.w3c.dom.*;
import org.jboss.tools.common.meta.*;
@@ -33,6 +35,22 @@
class FWLoaderUtil extends XModelObjectLoaderUtil {
boolean schema = false;
+ protected Set<String> getAllowedChildren(XModelEntity entity) {
+ Set<String> children = super.getAllowedChildren(entity);
+ if("WebAppResourceCollection".equals(entity.getName())) {
+ children.add("url-pattern");
+ children.add("http-method");
+ } else if("WebAppServiceRef".equals(entity.getName())) {
+ children.add("port-component-ref");
+ children.add("handler");
+ } else if("WebAppFilterMapping24".equals(entity.getName())) {
+ children.add("dispatcher");
+ } else if(entity.getName().startsWith("FileWebApp")) {
+ children.add("distributable");
+ }
+ return children;
+ }
+
protected boolean isSaveable(XModelEntity entity, String n, String v, String dv) {
if("load-on-startup".equals(n)) return false;
if(v == null) return false;