Hi,

 

I've a few questions regarding how Shale handles views and suvbviews:

 

1.      Why a redirect to somepage.faces (in the index.jsp for example)
will output a blank screen. I used to do that in my regular My Faces
application, but it doesn't seem to work with Shale.
2.      Do I have to create a managed bean for each jsp page? Before
Shale I didn't have to do that, JSF would build the view from the jsp
file. From what I've got so far from the samples, I have to register a
managed bean for each view in Shale. If I run a <jsp:forward
page="menu.faces"/>, without creating the managed bean I get an error
saying that it could not find the bean #{menu}
3.      I tried a simple clay configuration (shown below). The idea was
to encapsulate a composite component inside a subview. When Shale
execute the clay tag lib I get an error asking for a bean #{subview}.
This error got me confused, I thought the subview was a implementation
of the <f:subview>  component. What is happening here?

 

-          >>>>>Clay configuration:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE view PUBLIC "-//Apache Software Foundation//DTD Shale Clay
View Configuration 1.0//EN"

 
"http://struts.apache.org/dtds/shale-clay-config_1_0.dtd";>

<view>

 

 <component jsfid="baseOutput" extends="outputText" allowBody="false">

   <attributes>

       <set name="style" value="color:#99CC66"/>

       <set name="value" value="Test"/>

   </attributes>

 </component>

 

 <component allowBody="false" extends="subview" jsfid="searchFormPanel">

            <element renderId="2" jsfid="baseOutput"/>

 </component>

 

</view>

 

 

?>>>>>>>>>The jsp :

 

<%@ taglib
uri="http://struts.apache.org/shale/clay-plugin"prefix="clay"%>

<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>

<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>

 

<f:view>

<html>

      <head>

            <title></title>

            <link rel="STYLESHEET" type="text/css" href="style.css">

      </head>

      <body>

            <clay:clay id="search" jsfid="searchFormPanel" />
<-- This line causes the error. If I use baseOutput instead, everything
goes fine.

      </body>     

</html>  

</f:view>

 

 

>>>>>>>>>>>>>>>>>Exception:

 

javax.servlet.ServletException: Cannot get value for expression
'#{subview}'
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
 
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationF
ilter.java:285)

 

Root Cause:

 

javax.faces.FacesException: Cannot get value for expression '#{subview}'
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:421)
 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:234)
 
org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.j
ava:383)
 
org.apache.shale.faces.ShaleViewHandler.renderView(ShaleViewHandler.java
:143)
 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352
)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
 
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationF
ilter.java:285)
 
 
Thanks in advance for the help.

 

 

Reply via email to