You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Danny Robinson <da...@gmail.com> on 2006/12/05 16:19:57 UTC

Re: chooseDate in facelets gives PPR error

I've fixed this issue (which only manifests itself in Facelets).  it seems
that PPR breaks (at least in dateChooser) if you use the following

                <f:facet name="metaContainer">
                    <f:verbatim>
                        <script language="text/javascript"

src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>
                    </f:verbatim>
                </f:facet>

which results in the following rendered output (note the single element
rather than a closing </script>)

<script language="JavaScript"
src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"/>

However, the following

                <f:facet name="metaContainer">
                    <h:outputText escape="false"><script
type="text/javascript"
src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script></h:outputText>
                </f:facet>

results in the correct output of

<script type="text/javascript"
src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>

Thanks,

Danny

On 11/27/06, Danny Robinson <da...@gmail.com> wrote:
>
> Has anyone had any success using the chooseDate component through
> facelets?  In both IE & Firefox I get problems when it performs any ppr
> actions (e.g. click 'next month').  Using the exact same components
> through a regular JSF page works just fine.
>
> Here's my tags:
>                         <tr:inputDate chooseId="picker" label="Label 1" />
>                             <tr:chooseDate id="picker"></tr:chooseDate>
>
> and here's the line that Firefox identifies as problematic (error - 'a2
> has no properties')
>
> function _firePartialChange(a0)
> {
> ...
> a2.contentDocument.location.replace(a1);
> ...
> }
>
> Thanks,
>
> Danny
> --
> Chordiant Software Inc.
> www.chordiant.com




-- 
Chordiant Software Inc.
www.chordiant.com

Re: Re: chooseDate in facelets gives PPR error

Posted by Danny Robinson <da...@gmail.com>.
Mattias,

Thanks for the example. You're absolutely right I didn't need it.

I was trying to ensure my popup component ran in both worlds, and had simply
copied the same component structure for both pages and then added my
ui:composition tags.

Thanks both for your assistance.

Danny

On 12/6/06, Matthias Wessendorf <ma...@apache.org> wrote:
>
> Danny,
>
> I have no problems when adding the choose/inputDate duo to my page
> containing a metaContainer facet.
>
> Why are you using the <f:verbatim> ? No need for verbatim in facelets.
>
> here is my page which uses dojo dnd integration (and now the date
> components)
>
> Thx,
> Matthias
>
>
>
>
> <!--
>   Copyright 2006 The Apache Software Foundation.
>
>   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
>
>   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.
> -->
> <tr:document
>    xmlns:ui="http://java.sun.com/jsf/facelets"
>    xmlns:h="http://java.sun.com/jsf/html"
>    xmlns:f="http://java.sun.com/jsf/core"
>    xmlns:tr="http://myfaces.apache.org/trinidad"
>    title="Dojo Integration to Trinidad"
>     onload="init();">
>
>    <f:facet name="metaContainer">
> <style>
> .drag-zone
> {
>   border: 1px #B6B9B4 solid;
>   width: 150px;
>   overflow:auto;
>   height: 120px;
> }
>
> li{
>   cursor:move;
> }
> </style>
> <script type="text/javascript">
>         var djConfig = { isDebug: true };
> </script>
>
>
>
>    <script src="#{facesContext.externalContext.requestContextPath
> }/dojo.js"/>
> <script>
>         dojo.require("dojo.dnd.*");
>         dojo.require("dojo.event.*");
> </script>
>    <script src="#{facesContext.externalContext.requestContextPath
> }/foo.js"/>
> <script>
>         dojo.event.connect(dojo, "loaded", "init");
> </script>
>
>    </f:facet>
>
>
>   <tr:form>
>
>   <tr:inputDate chooseId="picker" label="Label 1" />
>   <tr:chooseDate id="picker" />
>
>   </tr:form>
>
> <ul id="dragList1" class="drag-zone">
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
>   <li>Bitburger 0,5 Liter </li>
> </ul>
> <ul id="dragList2" class="drag-zone">
> </ul>
>
> </tr:document>
>



-- 
Chordiant Software Inc.
www.chordiant.com

Re: Re: chooseDate in facelets gives PPR error

Posted by Matthias Wessendorf <ma...@apache.org>.
Danny,

I have no problems when adding the choose/inputDate duo to my page
containing a metaContainer facet.

Why are you using the <f:verbatim> ? No need for verbatim in facelets.

here is my page which uses dojo dnd integration (and now the date components)

Thx,
Matthias




<!--
  Copyright 2006 The Apache Software Foundation.

  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

  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.
-->
<tr:document
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:h="http://java.sun.com/jsf/html"
   xmlns:f="http://java.sun.com/jsf/core"
   xmlns:tr="http://myfaces.apache.org/trinidad"
   title="Dojo Integration to Trinidad"
    onload="init();">

   <f:facet name="metaContainer">
<style>
.drag-zone
{
  border: 1px #B6B9B4 solid;
  width: 150px;
  overflow:auto;
  height: 120px;
}

li{
  cursor:move;
}
</style>
<script type="text/javascript">
	var djConfig = { isDebug: true };
</script>



   <script src="#{facesContext.externalContext.requestContextPath}/dojo.js"/>
<script>
	dojo.require("dojo.dnd.*");
	dojo.require("dojo.event.*");
</script>
   <script src="#{facesContext.externalContext.requestContextPath}/foo.js"/>
<script>
	dojo.event.connect(dojo, "loaded", "init");
</script>

   </f:facet>


  <tr:form>

  <tr:inputDate chooseId="picker" label="Label 1" />
  <tr:chooseDate id="picker" />

  </tr:form>

<ul id="dragList1" class="drag-zone">
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
  <li>Bitburger 0,5 Liter </li>
</ul>
<ul id="dragList2" class="drag-zone">
</ul>

</tr:document>

Re: Re: chooseDate in facelets gives PPR error

Posted by Danny Robinson <da...@gmail.com>.
Using facelets 1.1.

On 12/5/06, Adam Winer <aw...@gmail.com> wrote:
>
> What version of Facelets are you using?  This should work fine
> in Facelets 1.1, but break in Facelets 1.0.
>
> -- Adam
>
>
> On 12/5/06, Danny Robinson <da...@gmail.com> wrote:
> > I've fixed this issue (which only manifests itself in Facelets).  it
> seems
> > that PPR breaks (at least in dateChooser) if you use the following
> >
> >                 <f:facet name="metaContainer">
> >                     <f:verbatim>
> >                         <script language="text/javascript"
> >
> > src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>
> >                     </f:verbatim>
> >                 </f:facet>
> >
> > which results in the following rendered output (note the single element
> > rather than a closing </script>)
> >
> > <script language="JavaScript"
> > src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"/>
> >
> > However, the following
> >
> >                 <f:facet name="metaContainer">
> >                     <h:outputText escape="false"><script
> > type="text/javascript"
> >
> src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script></h:outputText>
> >                 </f:facet>
> >
> > results in the correct output of
> >
> > <script type="text/javascript"
> > src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>
> >
> > Thanks,
> >
> > Danny
> >
> > On 11/27/06, Danny Robinson <da...@gmail.com> wrote:
> > >
> > > Has anyone had any success using the chooseDate component through
> > > facelets?  In both IE & Firefox I get problems when it performs any
> ppr
> > > actions (e.g. click 'next month').  Using the exact same components
> > > through a regular JSF page works just fine.
> > >
> > > Here's my tags:
> > >                         <tr:inputDate chooseId="picker" label="Label
> 1" />
> > >                             <tr:chooseDate
> id="picker"></tr:chooseDate>
> > >
> > > and here's the line that Firefox identifies as problematic (error -
> 'a2
> > > has no properties')
> > >
> > > function _firePartialChange(a0)
> > > {
> > > ...
> > > a2.contentDocument.location.replace(a1);
> > > ...
> > > }
> > >
> > > Thanks,
> > >
> > > Danny
> > > --
> > > Chordiant Software Inc.
> > > www.chordiant.com
> >
> >
> >
> >
> > --
> > Chordiant Software Inc.
> > www.chordiant.com
> >
> >
>



-- 
Chordiant Software Inc.
www.chordiant.com

Re: Re: chooseDate in facelets gives PPR error

Posted by Adam Winer <aw...@gmail.com>.
What version of Facelets are you using?  This should work fine
in Facelets 1.1, but break in Facelets 1.0.

-- Adam


On 12/5/06, Danny Robinson <da...@gmail.com> wrote:
> I've fixed this issue (which only manifests itself in Facelets).  it seems
> that PPR breaks (at least in dateChooser) if you use the following
>
>                 <f:facet name="metaContainer">
>                     <f:verbatim>
>                         <script language="text/javascript"
>
> src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>
>                     </f:verbatim>
>                 </f:facet>
>
> which results in the following rendered output (note the single element
> rather than a closing </script>)
>
> <script language="JavaScript"
> src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"/>
>
> However, the following
>
>                 <f:facet name="metaContainer">
>                     <h:outputText escape="false"><script
> type="text/javascript"
> src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script></h:outputText>
>                 </f:facet>
>
> results in the correct output of
>
> <script type="text/javascript"
> src="/TrinidadPopupSandbox/adf/jsLibs/trPanelPopup.js"></script>
>
> Thanks,
>
> Danny
>
> On 11/27/06, Danny Robinson <da...@gmail.com> wrote:
> >
> > Has anyone had any success using the chooseDate component through
> > facelets?  In both IE & Firefox I get problems when it performs any ppr
> > actions (e.g. click 'next month').  Using the exact same components
> > through a regular JSF page works just fine.
> >
> > Here's my tags:
> >                         <tr:inputDate chooseId="picker" label="Label 1" />
> >                             <tr:chooseDate id="picker"></tr:chooseDate>
> >
> > and here's the line that Firefox identifies as problematic (error - 'a2
> > has no properties')
> >
> > function _firePartialChange(a0)
> > {
> > ...
> > a2.contentDocument.location.replace(a1);
> > ...
> > }
> >
> > Thanks,
> >
> > Danny
> > --
> > Chordiant Software Inc.
> > www.chordiant.com
>
>
>
>
> --
> Chordiant Software Inc.
> www.chordiant.com
>
>