https://issues.apache.org/jira/browse/EXTSCRIPT-135


git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/branches/1_0_final_prepare@958516 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/BaseWeaver.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/BaseWeaver.java
index e793f92..b336589 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/BaseWeaver.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/BaseWeaver.java
@@ -380,18 +380,26 @@
     }
 
     protected boolean isFullyRecompiled() {
-        FacesContext context = FacesContext.getCurrentInstance();
-        return context != null && context.getExternalContext().getRequestMap().containsKey(this.getClass().getName() + "_recompiled");
+        try {
+            FacesContext context = FacesContext.getCurrentInstance();
+            return context != null && context.getExternalContext().getRequestMap().containsKey(this.getClass().getName() + "_recompiled");
+        } catch (UnsupportedOperationException ex) {
+            //still in startup
+            return false;
+        }
     }
 
     public void markAsFullyRecompiled() {
-        FacesContext context = FacesContext.getCurrentInstance();
-        if (context != null) {
-            //mark the request as tainted with recompile
-            Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
-            requestMap.put(this.getClass().getName() + "_recompiled", Boolean.TRUE);
+        try {
+            FacesContext context = FacesContext.getCurrentInstance();
+            if (context != null) {
+                //mark the request as tainted with recompile
+                Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
+                requestMap.put(this.getClass().getName() + "_recompiled", Boolean.TRUE);
+            }
+            WeavingContext.getRefreshContext().setRecompileRecommended(getScriptingEngine(), Boolean.FALSE);
+        } catch (UnsupportedOperationException ex) {
         }
-        WeavingContext.getRefreshContext().setRecompileRecommended(getScriptingEngine(), Boolean.FALSE);
     }
 
     /**
@@ -471,6 +479,8 @@
             fullRecompile();
             //we update our dependencies and annotation info prior to going
             //into the refresh cycle
+
+
             fullClassScan();
         }
 
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/refresh/RefreshContext.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/refresh/RefreshContext.java
index c395ad6..08f5b41 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/refresh/RefreshContext.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/refresh/RefreshContext.java
@@ -246,22 +246,31 @@
     }
 
     public boolean isDependencyScanned(int scriptingEngine) {
-        FacesContext ctx = FacesContext.getCurrentInstance();
-        if (ctx == null) {
+        try {
+            FacesContext ctx = FacesContext.getCurrentInstance();
+            if (ctx == null) {
+                return false;
+            }
+            Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
+            Boolean retVal = (Boolean) requestMap.get("isDependencyScanned_" + scriptingEngine);
+            return (retVal == null) ? false : retVal;
+        } catch (UnsupportedOperationException ex) {
+            //still in startup
             return false;
         }
-        Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
-        Boolean retVal = (Boolean) requestMap.get("isDependencyScanned_" + scriptingEngine);
-        return (retVal == null) ? false : retVal;
     }
 
     public void setDependencyScanned(int scriptingEngine, Boolean val) {
-        FacesContext ctx = FacesContext.getCurrentInstance();
-        if (ctx == null) {
-            return;
+        try {
+            FacesContext ctx = FacesContext.getCurrentInstance();
+            if (ctx == null) {
+                return;
+            }
+            Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
+            requestMap.put("isDependencyScanned_" + scriptingEngine, val);
+        } catch (UnsupportedOperationException ex) {
+            //still in startup
         }
-        Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
-        requestMap.put("isDependencyScanned_" + scriptingEngine, val);
     }
 
     public FileChangedDaemon getDaemon() {
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/servlet/StartupServletContextPluginChainLoader.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/servlet/StartupServletContextPluginChainLoader.java
index df4e200..d5b036b 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/servlet/StartupServletContextPluginChainLoader.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/servlet/StartupServletContextPluginChainLoader.java
@@ -66,7 +66,8 @@
     private void initCompileAndScan() {
         if (WeavingContext.isScriptingEnabled()) {
             _log.info("[EXT-SCRIPTING] Compiling all sources for the first time");
-            WeavingContext.getWeaver().postStartupActions();
+            //WeavingContext.getWeaver().postStartupActions();
+            WeavingContext.getWeaver().fullRecompile();
         }
     }
 
@@ -94,6 +95,7 @@
 
     public void postInit(ServletContextEvent evt) {
         //tell the system that the startup phase is done
+        WeavingContext.getWeaver().fullClassScan();
         evt.getServletContext().setAttribute(ScriptingConst.CTX_ATTR_STARTUP, new AtomicBoolean(Boolean.FALSE));
     }
 
diff --git a/extscript-core-root/extscript-myfaces12-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java b/extscript-core-root/extscript-myfaces12-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
index 761c8c1..d2712f4 100644
--- a/extscript-core-root/extscript-myfaces12-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
+++ b/extscript-core-root/extscript-myfaces12-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
@@ -95,13 +95,17 @@
     }
 
     private final boolean alreadyWovenInRequest(String clazz) {
-        //portlets now can be enabled thanks to the jsf2 indirections regarding the external context
-        ServletRequest req = (ServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
-        if (req.getAttribute(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz) == null) {
-            req.setAttribute(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz, "");
-            return false;
+        try {//portlets now can be enabled thanks to the jsf2 indirections regarding the external context
+            ServletRequest req = (ServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
+            if (req.getAttribute(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz) == null) {
+                req.setAttribute(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz, "");
+                return false;
+            }
+            return true;
+        } catch(UnsupportedOperationException ex) {
+            //still in startup no additional weaving here
+            return true;
         }
-        return true;
     }
 
 }
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
index 153da05..c0e22c5 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/RenderkitProxy.java
@@ -56,7 +56,7 @@
         weaveDelegate();
         //wo do it brute force here because we have sometimes casts and hence cannot rely on proxies
         //renderers itself are flyweight patterns which means they are shared over objects
-        
+
         renderer = (Renderer) reloadInstance(renderer, ScriptingConst.ARTIFACT_TYPE_RENDERER);
 
         _delegate.addRenderer(componentFamily, rendererType, renderer);
@@ -78,7 +78,6 @@
         return rendr;
     }
 
-
     private ClientBehaviorRenderer handleAnnotationChangeBehaviorRenderer(String s) {
         ClientBehaviorRenderer rendr2;
 
@@ -117,7 +116,6 @@
         return (ResponseStream) reloadInstance(_delegate.createResponseStream(outputStream), ScriptingConst.ARTIFACT_TYPE_RESPONSESTREAM);
     }
 
-
     @Override
     public void addClientBehaviorRenderer(String s, ClientBehaviorRenderer renderer) {
 
@@ -182,13 +180,19 @@
     }
 
     private boolean alreadyWovenInRequest(String clazz) {
-        //portlets now can be enabled thanks to the jsf2 indirections regarding the external context
-        Map<String, Object> req = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
-        if (req.get(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz) == null) {
-            req.put(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz, "");
-            return false;
+        try {//portlets now can be enabled thanks to the jsf2 indirections regarding the external context
+
+            //portlets now can be enabled thanks to the jsf2 indirections regarding the external context
+            Map<String, Object> req = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
+            if (req.get(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz) == null) {
+                req.put(ScriptingConst.SCRIPTING_REQUSINGLETON + clazz, "");
+                return false;
+            }
+            return true;
+        } catch (UnsupportedOperationException ex) {
+            //still in startup no additional weaving here
+            return true;
         }
-        return true;
     }
 
 }
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
index 3f1a30c..b1822c4 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
@@ -28,6 +28,16 @@
 /**
  * @author Werner Punz (latest modification by $Author$)
  * @version $Revision$ $Date$
+ *
+ * Problem the resource request is issued on servlet level before
+ * our compile triggers can trigger from the phase listener
+ * this is evil
+ *
+ * We probably have to reissue the compile from the resource handler
+ * directly upfront :-( or mark the resource handler as something like double tainted!
+ *
+ * This problem will resolve itself with async compile
+ *
  */
 
 public class ResourceHandlerProxy extends ResourceHandler {
@@ -67,6 +77,7 @@
     }
 
     public boolean libraryExists(String libraryName) {
+        weaveDelegate();
         return _delegate.libraryExists(libraryName);
     }
 
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/resources/META-INF/faces-config.xml b/extscript-core-root/extscript-myfaces2-extensions/src/main/resources/META-INF/faces-config.xml
index ea514b2..27941dd 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/resources/META-INF/faces-config.xml
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/resources/META-INF/faces-config.xml
@@ -83,6 +83,7 @@
         </resource-handler>
     </application>
 
+
     <!--
     <application>
         <system-event-listener>
@@ -92,5 +93,6 @@
         </system-event-listener>
 
     </application>
-   -->
+    -->
+
 </faces-config>
\ No newline at end of file
diff --git a/extscript-examples/myfaces20-example/src/main/conf/dev/web.xml b/extscript-examples/myfaces20-example/src/main/conf/dev/web.xml
index 55478ff..93c07da 100644
--- a/extscript-examples/myfaces20-example/src/main/conf/dev/web.xml
+++ b/extscript-examples/myfaces20-example/src/main/conf/dev/web.xml
@@ -39,7 +39,7 @@
         </description>
         <param-name>org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS</param-name>
         <param-value>
-            /Users/werpu2/development/workspace/extension-scripting4/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy
+            /Users/werpu2/development/workspace/1_0_final_prepare/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/groovy
         </param-value>
     </context-param>
 
@@ -50,7 +50,7 @@
         </description>
         <param-name>org.apache.myfaces.extensions.scripting.java.LOADER_PATHS</param-name>
         <param-value>
-            /Users/werpu2/development/workspace/extension-scripting4/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java
+            /Users/werpu2/development/workspace/1_0_final_prepare/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java
         </param-value>
     </context-param>
 
@@ -58,7 +58,7 @@
         <description>resource paths for our custom JSF2 resource resolver</description>
         <param-name>org.apache.myfaces.extensions.scripting.resources.LOADER_PATHS</param-name>
         <param-value>
-            /Users/werpu2/development/workspace/extension-scripting4/extscript-examples/myfaces20-example/src/main/webapp
+            /Users/werpu2/development/workspace/1_0_final_prepare/extscript-examples/myfaces20-example/src/main/webapp
         </param-value>
     </context-param>
 
diff --git a/extscript-examples/myfaces20-example/src/main/java/org/apache/myfaces/blank/FormBean.java b/extscript-examples/myfaces20-example/src/main/java/org/apache/myfaces/blank/FormBean.java
new file mode 100644
index 0000000..630802d
--- /dev/null
+++ b/extscript-examples/myfaces20-example/src/main/java/org/apache/myfaces/blank/FormBean.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.blank;
+
+
+import javax.faces.FacesException;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+import javax.faces.bean.SessionScoped;
+import javax.script.ScriptException;
+import java.io.File;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ */
+
+/**
+ * @author Ramo Karahasan
+ *
+ */
+@ManagedBean
+@SessionScoped
+public class FormBean {
+	private String company = "Maritim Rhein-Main Hotel Darmstadt";
+	private String branche = "Hotellerie";
+	private String position = "Hotelier";
+	private String surname = "Mustermann";
+	private String firstname = "Max";
+	private String name;
+	private String street = "Am Kavalleriesand 6";
+	private String zipCode = "64293";
+	private String city = "Darmstadt";
+	private String country = "Deutschland";
+	private String phonenumber = "+49 6151 303-0";
+	private String faxnumber = "+49 6151 303-111";
+	private Boolean rendered = Boolean.FALSE;
+
+	public String getCompany() {
+
+		return company;
+	}
+	public void setCompany(String company) {
+		this.company = company;
+	}
+	public String getBranche() {
+
+		return branche;
+	}
+	public void setBranche(String branche) {
+		this.branche = branche;
+	}
+	public String getSurname() {
+
+		return surname;
+	}
+	public void setSurname(String surname) {
+		this.surname = surname;
+	}
+	public String getFirstname() {
+
+		return firstname;
+	}
+	public void setFirstname(String firstname) {
+		this.firstname = firstname;
+	}
+	public String getStreet() {
+
+		return street;
+	}
+	public void setStreet(String street) {
+		this.street = street;
+	}
+	public String getZipCode() {
+
+		return zipCode;
+	}
+	public void setZipCode(String zipCode) {
+		this.zipCode = zipCode;
+	}
+	public String getCity() {
+
+		return city;
+	}
+	public void setCity(String city) {
+		this.city = city;
+	}
+	public String getCountry() {
+
+		return country;
+	}
+	public void setCountry(String country) {
+		this.country = country;
+	}
+	public String getPosition() {
+
+		return position;
+	}
+	public void setPosition(String position) {
+		this.position = position;
+	}
+	public String getName() {
+		//name = firstname + " " + surname;
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getPhonenumber() {
+
+		return phonenumber;
+	}
+	public void setPhonenumber(String phonenumber) {
+		this.phonenumber = phonenumber;
+	}
+	public String getFaxnumber() {
+
+		return faxnumber;
+	}
+	public void setFaxnumber(String faxnumber) {
+		this.faxnumber = faxnumber;
+	}
+
+
+
+
+	public Boolean getRendered() {
+
+		return rendered;
+	}
+	public void setRendered(Boolean rendered) {
+		this.rendered = rendered;
+	}
+
+	public String changeRendered(){
+		if(this.rendered == false){
+			this.rendered = true;
+		}else{
+			this.rendered = false;
+		}
+		return null;
+	}
+
+}
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
index 022065d..8ef5bfb 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer1.java
@@ -41,11 +41,13 @@
  * class to the other
  */
 
+
+@FacesRenderer(componentFamily = "javax.faces.Input", rendererType = "at.irian.JavaTestRenderer")
 public class JavaTestRenderer1 extends HtmlTextRendererBase {
 
     static Logger log = Logger.getLogger(JavaTestRenderer1.class.getName());
 
-    private static final String MSG2 = "Hello world from Renderer 1";
+    private static final String MSG2 = "Hello world from Renderer 1 ";
 
     public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
         super.encodeBegin(context, component);
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer2.java b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer2.java
index 4f2078b..f1139f4 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer2.java
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/componentTest/JavaTestRenderer2.java
@@ -33,11 +33,9 @@
  * @version $Revision$ $Date$
  */
 
-@FacesRenderer(componentFamily = "javax.faces.Input", rendererType = "at.irian.JavaTestRenderer")
-
 public class JavaTestRenderer2 extends HtmlTextareaRendererBase {
 
-    private static final String MSG = "<h2> Hello world from Renderer 2 </h2>";
+    private static final String MSG = "<h2> Hello world from Renderer 2</h2>";
     private static final String MSG2 = "<h3> hello world second var<h3>";
 
 
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/tmp/ajaxPage.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/tmp/ajaxPage.xhtml
new file mode 100644
index 0000000..d3bc019
--- /dev/null
+++ b/extscript-examples/myfaces20-example/src/main/webapp/tmp/ajaxPage.xhtml
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+        >
+
+<h:head>
+
+</h:head>
+
+<h:body>
+    <style type="text/css">
+        #clicable:hover {
+            background-color: yellow;
+        }
+    </style>
+    <h:form id="bla" prependId="false">
+        <div id="clicable" onclick="document.getElementById('editBtn').click();">
+            <h:panelGroup id="show1" styleClass="profilInfo">
+                <h:panelGroup rendered="#{!formBean.rendered}">
+                    <div class="profilInfo">
+                        <span class="profil_firmenname"><h:outputText value="#{formBean.company}"/></span>
+                        <span class="profil_content"><h:outputText value="#{formBean.branche}"/></span>
+                    </div>
+                    <div class="profilInfo">
+					<span id="profil_ansprechpartner">
+					<h:outputText value="#{formBean.name}"/>
+					</span>
+                        <span class="profil_content"><h:outputText value="#{formBean.position}"/></span><br/>
+                    </div>
+                    <div class="profilInfo">
+                        <span class="profil_content"><h:outputText value="#{formBean.street}"/></span>
+                        <span class="profil_content"><h:outputText value="#{formBean.city} "/></span>
+                        <span class="profil_content"><h:outputText value="#{formBean.country}"/></span>
+
+                    </div>
+                    <div class="profilInfo">
+                        <h:panelGrid columns="2" styleClass="short-profile short-profile-alignment">
+                            <h:outputText value="Tel:"/>
+                            <h:outputText value="#{formBean.phonenumber}"/>
+                            <h:outputText value="Fax:"/>
+                            <h:outputText value="#{formBean.faxnumber}"/>
+                            <h:outputText value="E-Mail:"/>
+                            <h:link value="info.dam@maritim.de">
+                            </h:link>
+                        </h:panelGrid>
+                    </div>
+                    <h:commandButton id="editBtn" style="display:none;" action="#{formBean.changeRendered}"
+                                     value="Edit">
+                        <f:ajax execute="@form" render="popupHolder show1"/>
+                    </h:commandButton>
+                </h:panelGroup>
+            </h:panelGroup>
+        </div>
+        <br/>
+        <h:panelGroup id="popupHolder">
+            <h:panelGroup id="editPanel" rendered="#{formBean.rendered}">
+                <div class="profilInfo">
+                    <span class="profil_firmenname"><h:outputLabel value="Firma: "/><h:inputText
+                            value="#{formBean.company}"/></span>
+                    <span class="profil_content"><h:outputLabel value="Branche: "/><h:inputText
+                            value="#{formBean.branche}"/></span>
+                </div>
+                <div class="profilInfo">
+					<span id="profil_ansprechpartner"><h:outputLabel value="Name, Vorname: "/>
+					<h:inputText value="#{formBean.name}" style="float:left;"/>
+					</span>
+                    <span class="profil_content"><h:outputLabel value="Position: "/><h:inputText
+                            value="#{formBean.position}"/></span><br/>
+                </div>
+                <div class="profilInfo">
+                    <span class="profil_content"><h:outputLabel value="Strasse: "/><h:inputText
+                            value="#{formBean.street}"/></span>
+                    <span class="profil_content"><h:outputLabel value="Ort: "/><h:inputText
+                            value="#{formBean.city}"/></span>
+                    <span class="profil_content"><h:outputLabel value="Land: "/><h:inputText
+                            value="#{formBean.country}"/></span>
+
+                </div>
+                <div class="profilInfo">
+                    <h:panelGrid columns="2" styleClass="short-profile short-profile-alignment">
+                        <h:outputLabel value="Tel:"/>
+                        <h:inputText value="#{formBean.phonenumber}"/>
+                        <h:outputLabel value="Fax: "/>
+                        <h:inputText value="#{formBean.faxnumber}"/>
+                        <h:outputLabel value="E-Mail:"/>
+                        <h:link value="info.dam@maritim.de">
+                        </h:link>
+                    </h:panelGrid>
+                </div>
+            </h:panelGroup>
+
+
+            <h:commandButton action="#{formBean.changeRendered}" value="Aktualisieren" rendered="#{formBean.rendered}">
+                <f:ajax execute="@form" render="popupHolder show1"/>
+            </h:commandButton>
+        </h:panelGroup>
+    </h:form>
+
+
+</h:body>
+</html>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index aeceb17..ebe7ab7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
 
     <properties>
         <myfaces12.version>1.2.8</myfaces12.version>
-        <myfaces2.version>2.0.0</myfaces2.version>
+        <myfaces2.version>2.0.1-SNAPSHOT</myfaces2.version>
         <groovy.version>1.7.1</groovy.version>
         <extval.version>2.0.3</extval.version>
     </properties>