myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "urswagner@bluemail.ch" <urswag...@bluemail.ch>
Subject AW: Re: jsp:include
Date Fri, 08 Sep 2006 23:09:38 GMT


Thanks does not help. I use a table based layout.
As a "workaround" I do not use jsp:include and copy! the complete 
code of loginframe.jsp into the jsp file. It is not elegant but it 
works.

----Urspr√ľngliche Nachricht----
Von: mkienenb@gmail.com
Datum: 08.09.2006 19:05
An: "MyFaces Discussion"<users@myfaces.apache.org>, 
<urswagner@bluemail.ch>
Betreff: Re: jsp:include

One suggestion.

Don't put subview in your included fragment.
Instead use it around your jsp:include.

<f:subview id="loginFrame">
    <jsp:include page="inc/loginframe.jsp" />
</f:subview>

This will prevent duplicate id problems as you can give each 
include a
different subview id.

I don't see why this would make any difference to your problem, 
though.


On 9/6/06, urswagner@bluemail.ch <urswagner@bluemail.ch> wrote:
> Hello
>
> If I include the jsp the form is not rendered around the table.
> Watch the JPG file.
> If I call direct loginframe.faces everything is correctly
> rendered.
>
> Urs
>
> The code
>
> 1) Include statement in other jsp files.
>
> <jsp:include page="inc/loginframe.jsp" />
>
> 2) the loginframe.jsp content is
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
> <f:subview id="loginFrame">
> <h:outputText value="Herzlich willkommen #{websession.username}"
>         rendered="#{websession.loggedIn}" />
> <h:form rendered="#{!websession.loggedIn}">
>         <table border="0" cellspacing="0" class="frame">
>                 <tr>
>                         <td colspan="2" class="frametitle"><h:
outputText
>                                 value="#{login.loginTitle}" 
/></td>
>                 </tr>
>                 <tr>
>                         <td colspan="2"><t:messages /></td>
>                 </tr>
>                 <tr>
>                         <td class="framelabel"><h:outputLabel 
for="username"
>                                 value="#{login.usernameLabel}" 
styleClass="loginlabel" /></td>
>                         <td class="frameinput"><h:inputText id="
username"
>                                 value="#{login.username}" 
required="true" size="15" /></td>
>                 </tr>
>                 <tr>
>                         <td class="framelabel"><h:outputLabel 
for="password"
>                                 value="#{login.passwordLabel}" 
styleClass="loginlabel" /></td>
>                         <td class="frameinput"><h:inputSecret id="
password"
>                                 value="#{login.password}" 
required="true" size="15" /></td>
>                 </tr>
>                 <tr>
>                         <td colspan="2" class="framebutton"><h:
commandButton id="
> loginButton"
>                                 action="#{login.login}" value="#
{login.loginLabel}" /></td>
>                 </tr>
>                 <tr class="framerow">
>                         <td colspan="2" class="framelink"><h:
commandLink
>                                 action="#{register.register}" 
value="#{login.doRegisterText}"
> /></td>
>                 </tr>
>         </table>
> </h:form>
> </f:subview>
>
>




Mime
View raw message