You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by madan chowdary <ma...@yahoo.com> on 2007/03/31 10:59:37 UTC

[ Tobago ] vanishing when panel refreshs

Hi All,

I have a panel which gets refreshed partially when a button is clicked.

In that panel, i used <f:verbatim/> to display <hr/> .

When this panel gets refreshed partially , then the contents under <f:verbatim/> are vanished.

Not only the <hr/> , anything inside <f:verbatim> are not being displayed when panel gets refreshed.

Here is a sample code i wrote after i faced this issue, 

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
<f:view>
    <tc:page label="#{bundle.pageTitle}" id="page">
        <tc:panel height="300px" width="300px" id="cartpopup">
            <f:facet name="layout">
                <tc:gridLayout rows="*;*;*;*"/>
            </f:facet>
            <tc:panel>
                <tc:out value="Test for components being vanished under <f:verbatim/> when panel is being refreshed"/>
            </tc:panel>
            <tc:panel></tc:panel>
            <tc:panel>
                <f:facet name="layout">
                    <tc:gridLayout rows="20px;20px;20px"/>
                </f:facet>
                <tc:panel/>
                <tc:panel>
                    <f:verbatim><input type="text" name="hello" /></f:verbatim>
                </tc:panel>
                <tc:panel/>
            </tc:panel>
            <tc:panel>
                <tc:button action="" label="clickHere">
                    <tc:attribute name="renderedPartially" value=":page:cartpopup"/>
                </tc:button>
            </tc:panel>
        </tc:panel>                        
    </tc:page>
</f:view>

Am i missing anything or is this a bug ?

Regards,
Madan




		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Re: [ Tobago ] vanishing when panel refreshs

Posted by Volker Weber <v....@inexso.de>.
Hi,

it's not a bug, it's just the behavior of f:verbatim. the content of
f:verbatim is not saved and therefore not availiable on ajax requests.

if possible try <tc:out escape="false" value="<hr/>">

Regards,
  Volker

2007/3/31, madan chowdary <ma...@yahoo.com>:
>
> Hi All,
>
> I have a panel which gets refreshed partially when a button is clicked.
>
> In that panel, i used <f:verbatim/> to display <hr/> .
>
> When this panel gets refreshed partially , then the contents under
> <f:verbatim/> are vanished.
>
> Not only the <hr/> , anything inside <f:verbatim> are not being displayed
> when panel gets refreshed.
>
> Here is a sample code i wrote after i faced this issue,
>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/tobago/component"
> prefix="tc" %>
> <%@ taglib uri="http://myfaces.apache.org/tobago/extension"
> prefix="tx" %>
> <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
> <f:view>
>     <tc:page label="#{bundle.pageTitle}" id="page">
>         <tc:panel height="300px" width="300px" id="cartpopup">
>             <f:facet name="layout">
>                 <tc:gridLayout rows="*;*;*;*"/>
>             </f:facet>
>             <tc:panel>
>                 <tc:out value="Test for components being vanished under
> <f:verbatim/> when panel is being refreshed"/>
>             </tc:panel>
>             <tc:panel></tc:panel>
>             <tc:panel>
>                 <f:facet name="layout">
>                     <tc:gridLayout rows="20px;20px;20px"/>
>                 </f:facet>
>                 <tc:panel/>
>                 <tc:panel>
>                     <f:verbatim><input type="text" name="hello"
> /></f:verbatim>
>                 </tc:panel>
>                 <tc:panel/>
>             </tc:panel>
>             <tc:panel>
>                 <tc:button action="" label="clickHere">
>                     <tc:attribute name="renderedPartially"
> value=":page:cartpopup"/>
>                 </tc:button>
>             </tc:panel>
>         </tc:panel>
>     </tc:page>
> </f:view>
>
> Am i missing anything or is this a bug ?
>
> Regards,
> Madan
>
>  ________________________________
>  Here's a new way to find what you're looking for - Yahoo! Answers