You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gp...@apache.org on 2012/08/24 21:07:38 UTC
svn commit: r1377053 - in
/myfaces/core/branches/2.1.x-client-window/client-window-example/src:
main/java/org/apache/myfaces/example/clientWindow/
main/java/org/apache/myfaces/example/flash/
main/java/org/apache/myfaces/example/windowScope/ test/java/o...
Author: gpetracek
Date: Fri Aug 24 19:07:38 2012
New Revision: 1377053
URL: http://svn.apache.org/viewvc?rev=1377053&view=rev
Log:
MYFACES-3588 fixed checkstyle issues
Modified:
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java
myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/DisableClientWindow.java Fri Aug 24 19:07:38 2012
@@ -1,17 +1,20 @@
/*
- * Copyright 2012 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.example.clientWindow;
@@ -35,5 +38,5 @@ public class DisableClientWindow extends
ClientWindow.disableClientWindowUrlQueryParameter(context);
super.encodeBegin(context);
}
-
+
}
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/clientWindow/EnableClientWindow.java Fri Aug 24 19:07:38 2012
@@ -1,17 +1,20 @@
/*
- * Copyright 2012 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.example.clientWindow;
@@ -34,5 +37,5 @@ public class EnableClientWindow extends
{
ClientWindow.enableClientWindowUrlQueryParameter(context);
super.encodeBegin(context);
- }
+ }
}
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/FlashBean.java Fri Aug 24 19:07:38 2012
@@ -15,10 +15,9 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
-*/
+ */
package org.apache.myfaces.example.flash;
-import java.awt.event.ActionEvent;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@@ -31,7 +30,7 @@ public class FlashBean
{
return "flash2";
}
-
+
public String gotoFlash3()
{
return "flash3";
@@ -39,7 +38,7 @@ public class FlashBean
public String gotoFlash1()
{
- return "flash1";
+ return "flash1";
}
}
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/flash/HelloWorldFlashBean.java Fri Aug 24 19:07:38 2012
@@ -15,7 +15,7 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
-*/
+ */
package org.apache.myfaces.example.flash;
import javax.faces.application.FacesMessage;
@@ -28,53 +28,63 @@ import javax.faces.event.PhaseEvent;
/**
* A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
- *
+ *
*/
@ManagedBean(name="helloWorldFlashBean")
@RequestScoped
-public class HelloWorldFlashBean {
+public class HelloWorldFlashBean
+{
//Log log = LogFactory.getLog(HelloWorldFlashBean.class);
-
+
private int before = 0;
-
+
private int after = 0;
-
- public void beforePhase(PhaseEvent phaseEvent){
-
- FacesContext facesContext = FacesContext.getCurrentInstance();
- before++;
- facesContext.addMessage(null, new FacesMessage("This is the message for phase before "+phaseEvent.getPhaseId().toString()+" : "+before+" "+facesContext.getExternalContext().getFlash().get("lastName")));
+
+ public void beforePhase(PhaseEvent phaseEvent)
+ {
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ before++;
+ facesContext.addMessage(null, new FacesMessage("This is the message for phase before " +
+ phaseEvent.getPhaseId().toString() + " : " + before + " " +
+ facesContext.getExternalContext().getFlash().get("lastName")));
//log.info("This is the message for phase before "+phaseEvent.getPhaseId().toString()+" : "+before);
}
-
- public void afterPhase(PhaseEvent phaseEvent){
- FacesContext facesContext = FacesContext.getCurrentInstance();
- after++;
- facesContext.addMessage(null, new FacesMessage("This is the message for phase after "+phaseEvent.getPhaseId().toString()+" : "+after+" "+facesContext.getExternalContext().getFlash().get("lastName")));
+ public void afterPhase(PhaseEvent phaseEvent)
+ {
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ after++;
+ facesContext.addMessage(null, new FacesMessage("This is the message for phase after " +
+ phaseEvent.getPhaseId().toString() + " : " + after + " " +
+ facesContext.getExternalContext().getFlash().get("lastName")));
//log.info("This is the message for phase after "+phaseEvent.getPhaseId().toString()+" : "+after);
}
//properties
private String name;
-
+
private String lastName;
-
+
/**
* default empty constructor
*/
- public HelloWorldFlashBean(){
+ public HelloWorldFlashBean()
+ {
}
-
+
//-------------------getter & setter
- public String getName() {
+ public String getName()
+ {
return name;
}
- public void setName(String name) {
+ public void setName(String name)
+ {
this.name = name;
}
-
+
public String getLastName()
{
return lastName;
@@ -88,60 +98,63 @@ public class HelloWorldFlashBean {
/**
* Method that is backed to a submit button of a form.
*/
- public String send(){
+ public String send()
+ {
//do real logic, return a string which will be used for the navigation system of JSF
-
+
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Flash flash = externalContext.getFlash();
-
+
flash.put("name", getName());
flash.setKeepMessages(true);
facesContext.addMessage(null, new FacesMessage("var name put on flash scope"));
-
+
return "success";
}
-
- public String sendPutNow(){
+
+ public String sendPutNow()
+ {
//do real logic, return a string which will be used for the navigation system of JSF
-
+
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Flash flash = externalContext.getFlash();
-
+
flash.putNow("name", getName());
flash.keep("name");
flash.setKeepMessages(true);
facesContext.addMessage(null, new FacesMessage("var name putNow on flash scope"));
-
+
return "success";
}
-
+
public String keepRedirect()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Flash flash = externalContext.getFlash();
-
+
flash.putNow("name", getName());
flash.keep("name");
-
+
return "flashKeep2.xhtml?faces-redirect=true";
}
-
+
public String keepPostback()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Flash flash = externalContext.getFlash();
-
+
flash.keep("name"); // does not work here anymore
-
+
return "flashKeep3.xhtml";
}
-
- public String back(){
+
+ public String back()
+ {
return "back";
}
}
\ No newline at end of file
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/SubKeyMap.java Fri Aug 24 19:07:38 2012
@@ -28,7 +28,7 @@ import java.util.Set;
/**
* NOTE: Class copied from trinidad to be used on FlashImpl.
- *
+ *
* Map that wraps another to provide an isolated namespace using
* a prefix. This is especially handy for storing properties on
* the session in a structured manner without putting them into
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScope.java Fri Aug 24 19:07:38 2012
@@ -1,17 +1,20 @@
/*
- * Copyright 2012 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.example.windowScope;
@@ -23,6 +26,6 @@ import java.util.Map;
*/
public abstract class WindowScope implements Map<String, Object>
{
-
-
+
+
}
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeELResolver.java Fri Aug 24 19:07:38 2012
@@ -1,17 +1,20 @@
/*
- * Copyright 2012 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.example.windowScope;
@@ -65,7 +68,7 @@ public class WindowScopeELResolver exten
}
}
}
-
+
@Override
public boolean isReadOnly(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
@@ -94,7 +97,7 @@ public class WindowScopeELResolver exten
return false;
}
-
+
@Override
public Object getValue(ELContext elContext, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
@@ -152,7 +155,7 @@ public class WindowScopeELResolver exten
}
return null;
}
-
+
// get the FacesContext from the ELContext
protected FacesContext facesContext(ELContext context)
{
@@ -168,7 +171,7 @@ public class WindowScopeELResolver exten
{
return WindowScopeImpl.getCurrentInstance(facesContext.getExternalContext());
}
-
+
@Override
public Class<?> getType(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/main/java/org/apache/myfaces/example/windowScope/WindowScopeImpl.java Fri Aug 24 19:07:38 2012
@@ -1,17 +1,20 @@
/*
- * Copyright 2012 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.example.windowScope;
@@ -29,12 +32,12 @@ public class WindowScopeImpl extends Win
{
private static final String WINDOW_PREFIX = "oam.Window";
-
+
/**
* Key for the cached render FlashMap instance on the request map.
*/
static final String WINDOW_MAP = WINDOW_PREFIX + ".WINDOWMAP";
-
+
/**
* Key on application map to keep current instance
*/
@@ -44,15 +47,15 @@ public class WindowScopeImpl extends Win
* Session map prefix to flash maps
*/
static final String WINDOW_SESSION_MAP_SUBKEY_PREFIX = WINDOW_PREFIX + ".SCOPE";
-
+
/**
* Token separator.
*/
static final char SEPARATOR_CHAR = '.';
-
+
public WindowScopeImpl(ExternalContext externalContext)
{
-
+
}
public int size()
@@ -114,7 +117,7 @@ public class WindowScopeImpl extends Win
{
return getActiveWindowScopeMap().entrySet();
}
-
+
private Map<String, Object> getActiveWindowScopeMap()
{
FacesContext context = FacesContext.getCurrentInstance();
@@ -129,7 +132,7 @@ public class WindowScopeImpl extends Win
}
return map;
}
-
+
/**
* Create a new subkey-wrapper of the session map with the given prefix.
* This wrapper is used to implement the maps for the flash scope.
@@ -142,11 +145,11 @@ public class WindowScopeImpl extends Win
return new SubKeyMap<Object>(sessionMap, prefix);
}
-
+
public static WindowScope getCurrentInstance(ExternalContext context)
{
Map<String, Object> applicationMap = context.getApplicationMap();
-
+
WindowScope flash = (WindowScope) applicationMap.get(WINDOW_INSTANCE);
if (flash == null)
{
Modified: myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java?rev=1377053&r1=1377052&r2=1377053&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java (original)
+++ myfaces/core/branches/2.1.x-client-window/client-window-example/src/test/java/org/apache/myfaces/example/clientWindow/CheckFaceletsFileTestCase.java Fri Aug 24 19:07:38 2012
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.example.clientWindow;
-import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -41,11 +40,11 @@ public class CheckFaceletsFileTestCase e
super.setUpServletObjects();
servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES",
"org.apache.myfaces.example");
-
+
}
/**
* Check all .xhtml can be parsed by facelets compiler
- *
+ *
* @throws Exception
*/
@Test
@@ -53,7 +52,7 @@ public class CheckFaceletsFileTestCase e
{
Compiler compiler = vdl.createCompiler(facesContext);
FaceletFactory factory = vdl.createFaceletFactory(facesContext, compiler);
-
+
checkFaceletsFiles(factory, "/");
}
@@ -76,17 +75,18 @@ public class CheckFaceletsFileTestCase e
/**
* Check a if a single view can be built.
- *
+ *
* @throws Exception
*/
@Test
- public void testSingleFaceletsFile() throws Exception {
+ public void testSingleFaceletsFile() throws Exception
+ {
//Step 1: initialize beans
-
+
//Step 2: build view
UIViewRoot root = facesContext.getViewRoot();
vdl.buildView(facesContext, root, "helloWorld.xhtml");
-
+
//Step 3: render view
FastWriter fw = new FastWriter();
ResponseWriter rw = facesContext.getResponseWriter();
@@ -95,9 +95,10 @@ public class CheckFaceletsFileTestCase e
root.encodeAll(facesContext);
//System.out.println(fw);
}
-
+
@Test
- public void testCanBuildViews() throws Exception {
+ public void testCanBuildViews() throws Exception
+ {
//Step 1: initialize beans
/*
List<String> viewPaths = new ArrayList<String>();
@@ -132,7 +133,7 @@ public class CheckFaceletsFileTestCase e
vdl.buildView(facesContext, root, viewPath);
}*/
}
-
+
private void addViewFacelets(List<String> viewPaths, String pathBase)
{
Set<String> paths = externalContext.getResourcePaths(pathBase);
@@ -149,7 +150,7 @@ public class CheckFaceletsFileTestCase e
}
}
-
+
@Override
protected String getDirectory()
{