You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike_R <Mi...@gmx.net> on 2007/05/08 13:12:23 UTC

T5: CDATA in head gives a not implemented error

Hi,

I was copying some google maps javascript
(http://www.google.com/uds/samples/places.html)  inside of the head of my
Border component.
Since the javascript code uses < and >, it's protected with //<![CDATA[

When I try to use the Border component with this CDATA block I get a message
stating 'not implemented yet: CDATA'.

Is this a known limitation, should I file a bug and how can I solve this?
When I put the javascript in a separate file the error seemed gone, haven't
tested any further though.

thanks for the help
Mike


-- 
View this message in context: http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: CDATA in head gives a not implemented error

Posted by Robert Zeigler <ro...@scazdl.org>.
This is a known limitation.  The tapestry template parser does not  
yet handle CDATA blocks.

Robert

On May 8, 2007, at 5/86:12 AM , Mike_R wrote:

>
> Hi,
>
> I was copying some google maps javascript
> (http://www.google.com/uds/samples/places.html)  inside of the head  
> of my
> Border component.
> Since the javascript code uses < and >, it's protected with //<! 
> [CDATA[
>
> When I try to use the Border component with this CDATA block I get  
> a message
> stating 'not implemented yet: CDATA'.
>
> Is this a known limitation, should I file a bug and how can I solve  
> this?
> When I put the javascript in a separate file the error seemed gone,  
> haven't
> tested any further though.
>
> thanks for the help
> Mike
>
>
> -- 
> View this message in context: http://www.nabble.com/T5%3A-CDATA-in- 
> head-gives-a-not-implemented-error-tf3708984.html#a10373906
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: CDATA in head gives a not implemented error

Posted by Hugo Palma <hu...@gmail.com>.
I've created an issue for this.
You can follow or vote for it here 
https://issues.apache.org/jira/browse/TAPESTRY-1818

Alexandru Dragomir wrote:
> As you mentioned , the workaround is to put the javascript (or at 
> least the
> one  that contains the  < and >) in a separate file.
> This should be fine for majority of cases.
> Alex
>
> On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
>>
>>
>> Hi,
>>
>> I was copying some google maps javascript
>> (http://www.google.com/uds/samples/places.html)  inside of the head 
>> of my
>> Border component.
>> Since the javascript code uses < and >, it's protected with //<![CDATA[
>>
>> When I try to use the Border component with this CDATA block I get a
>> message
>> stating 'not implemented yet: CDATA'.
>>
>> Is this a known limitation, should I file a bug and how can I solve 
>> this?
>> When I put the javascript in a separate file the error seemed gone,
>> haven't
>> tested any further though.
>>
>> thanks for the help
>> Mike
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906 
>>
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: T5: CDATA in head gives a not implemented error

Posted by Hugo Palma <hu...@gmail.com>.
Ok, i figure out what i was doing wrong. The trick is the starting tag. 
You have:

// <!-- //

which works fine. I was just using

<!--

Like http://www.javascripter.net/faq/hidingjs.htm and other sites give 
as an example.

Thanks...

Josh Canfield wrote:
> Define didn't work. Didn't work on a particular browser?
>
> I have this code in production and it seems to work fine in
> Firefox/IE/Safari.
>
>   <script>
>  //noinspection JSUnresolvedFunction
>     Event.observe(window, 'load',
>   function() {
>    var orderField = '${sortOrderField}';
>    var rowsId = 'vpl_rows${id}';
>    var rowIdPrefix = 'vpl_row_${id}_';
>    var sourceLister = '${sourceLister}';
>   // <!-- //
>    var props = {
>     dropOnEmpty: true,
>     containment: [rowsId],
>     tag: "div",
>     'only': [ 'vpl_row' ],
>     onUpdate: function() {
>      var orderList = '';
>      var rows = document.getElementById(rowsId);
>      var orderedNodes = rows.getElementsByClassName('vpl_row');
>      for (var i=0;i *<* orderedNodes.length;i++) {
>       var id = orderedNodes[i].id;
>       id = id.substring(id.lastIndexOf('_')+1);
>       orderList += id + ',';
>         }
>      document.getElementById(orderField).value = orderList;
>     }
>    };
>    if ( sourceLister ) {
>     props.containment[1] = 'vpl_rows' + sourceLister;
>     props.constraint = false;
>    }
>
>    //noinspection JSUnresolvedFunction
>             Sortable.create(rowsId, props);
>   }
>  );
>  // -->
>  </script>
>
> Josh
>
> On 10/12/07, Hugo Palma <hu...@gmail.com> wrote:
>   
>> I tried that and it didn't work.
>>
>> Josh Canfield wrote:
>>     
>>> You can use inline javascript in your templates, you just need to use
>>>       
>> the
>>     
>>> old trick that used to be used to hide js from the browser
>>>  http://www.javascripter.net/faq/hidingjs.htm
>>>
>>> <script> <!--
>>> // tapestry will move this up in the output
>>>
>>> // -->
>>> </script>
>>>
>>> Josh
>>>
>>> On 5/8/07, Alexandru Dragomir <al...@gmail.com> wrote:
>>>
>>>       
>>>> As you mentioned , the workaround is to put the javascript (or at least
>>>> the
>>>> one  that contains the  < and >) in a separate file.
>>>> This should be fine for majority of cases.
>>>> Alex
>>>>
>>>> On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> I was copying some google maps javascript
>>>>> (http://www.google.com/uds/samples/places.html)  inside of the head of
>>>>>
>>>>>           
>>>> my
>>>>
>>>>         
>>>>> Border component.
>>>>> Since the javascript code uses < and >, it's protected with
>>>>>           
>> //<![CDATA[
>>     
>>>>> When I try to use the Border component with this CDATA block I get a
>>>>> message
>>>>> stating 'not implemented yet: CDATA'.
>>>>>
>>>>> Is this a known limitation, should I file a bug and how can I solve
>>>>>
>>>>>           
>>>> this?
>>>>
>>>>         
>>>>> When I put the javascript in a separate file the error seemed gone,
>>>>> haven't
>>>>> tested any further though.
>>>>>
>>>>> thanks for the help
>>>>> Mike
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>>
>>>>>           
>> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
>>     
>>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>
>>>
>>>       
>
>
>
>   

Re: T5: CDATA in head gives a not implemented error

Posted by Josh Canfield <jo...@thedailytube.com>.
Define didn't work. Didn't work on a particular browser?

I have this code in production and it seems to work fine in
Firefox/IE/Safari.

  <script>
 //noinspection JSUnresolvedFunction
    Event.observe(window, 'load',
  function() {
   var orderField = '${sortOrderField}';
   var rowsId = 'vpl_rows${id}';
   var rowIdPrefix = 'vpl_row_${id}_';
   var sourceLister = '${sourceLister}';
  // <!-- //
   var props = {
    dropOnEmpty: true,
    containment: [rowsId],
    tag: "div",
    'only': [ 'vpl_row' ],
    onUpdate: function() {
     var orderList = '';
     var rows = document.getElementById(rowsId);
     var orderedNodes = rows.getElementsByClassName('vpl_row');
     for (var i=0;i *<* orderedNodes.length;i++) {
      var id = orderedNodes[i].id;
      id = id.substring(id.lastIndexOf('_')+1);
      orderList += id + ',';
        }
     document.getElementById(orderField).value = orderList;
    }
   };
   if ( sourceLister ) {
    props.containment[1] = 'vpl_rows' + sourceLister;
    props.constraint = false;
   }

   //noinspection JSUnresolvedFunction
            Sortable.create(rowsId, props);
  }
 );
 // -->
 </script>

Josh

On 10/12/07, Hugo Palma <hu...@gmail.com> wrote:
>
> I tried that and it didn't work.
>
> Josh Canfield wrote:
> > You can use inline javascript in your templates, you just need to use
> the
> > old trick that used to be used to hide js from the browser
> >  http://www.javascripter.net/faq/hidingjs.htm
> >
> > <script> <!--
> > // tapestry will move this up in the output
> >
> > // -->
> > </script>
> >
> > Josh
> >
> > On 5/8/07, Alexandru Dragomir <al...@gmail.com> wrote:
> >
> >> As you mentioned , the workaround is to put the javascript (or at least
> >> the
> >> one  that contains the  < and >) in a separate file.
> >> This should be fine for majority of cases.
> >> Alex
> >>
> >> On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
> >>
> >>> Hi,
> >>>
> >>> I was copying some google maps javascript
> >>> (http://www.google.com/uds/samples/places.html)  inside of the head of
> >>>
> >> my
> >>
> >>> Border component.
> >>> Since the javascript code uses < and >, it's protected with
> //<![CDATA[
> >>>
> >>> When I try to use the Border component with this CDATA block I get a
> >>> message
> >>> stating 'not implemented yet: CDATA'.
> >>>
> >>> Is this a known limitation, should I file a bug and how can I solve
> >>>
> >> this?
> >>
> >>> When I put the javascript in a separate file the error seemed gone,
> >>> haven't
> >>> tested any further though.
> >>>
> >>> thanks for the help
> >>> Mike
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> >>>
> >>
> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
> >>
> >>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>>
> >
> >
> >
> >
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Re: T5: CDATA in head gives a not implemented error

Posted by Hugo Palma <hu...@gmail.com>.
I tried that and it didn't work.

Josh Canfield wrote:
> You can use inline javascript in your templates, you just need to use the
> old trick that used to be used to hide js from the browser
>  http://www.javascripter.net/faq/hidingjs.htm
>
> <script> <!--
> // tapestry will move this up in the output
>
> // -->
> </script>
>
> Josh
>
> On 5/8/07, Alexandru Dragomir <al...@gmail.com> wrote:
>   
>> As you mentioned , the workaround is to put the javascript (or at least
>> the
>> one  that contains the  < and >) in a separate file.
>> This should be fine for majority of cases.
>> Alex
>>
>> On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
>>     
>>> Hi,
>>>
>>> I was copying some google maps javascript
>>> (http://www.google.com/uds/samples/places.html)  inside of the head of
>>>       
>> my
>>     
>>> Border component.
>>> Since the javascript code uses < and >, it's protected with //<![CDATA[
>>>
>>> When I try to use the Border component with this CDATA block I get a
>>> message
>>> stating 'not implemented yet: CDATA'.
>>>
>>> Is this a known limitation, should I file a bug and how can I solve
>>>       
>> this?
>>     
>>> When I put the javascript in a separate file the error seemed gone,
>>> haven't
>>> tested any further though.
>>>
>>> thanks for the help
>>> Mike
>>>
>>>
>>> --
>>> View this message in context:
>>>
>>>       
>> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
>>     
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>       
>
>
>
>   

Re: T5: CDATA in head gives a not implemented error

Posted by Josh Canfield <jo...@thedailytube.com>.
You can use inline javascript in your templates, you just need to use the
old trick that used to be used to hide js from the browser
 http://www.javascripter.net/faq/hidingjs.htm

<script> <!--
// tapestry will move this up in the output

// -->
</script>

Josh

On 5/8/07, Alexandru Dragomir <al...@gmail.com> wrote:
>
> As you mentioned , the workaround is to put the javascript (or at least
> the
> one  that contains the  < and >) in a separate file.
> This should be fine for majority of cases.
> Alex
>
> On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
> >
> >
> > Hi,
> >
> > I was copying some google maps javascript
> > (http://www.google.com/uds/samples/places.html)  inside of the head of
> my
> > Border component.
> > Since the javascript code uses < and >, it's protected with //<![CDATA[
> >
> > When I try to use the Border component with this CDATA block I get a
> > message
> > stating 'not implemented yet: CDATA'.
> >
> > Is this a known limitation, should I file a bug and how can I solve
> this?
> > When I put the javascript in a separate file the error seemed gone,
> > haven't
> > tested any further though.
> >
> > thanks for the help
> > Mike
> >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Re: T5: CDATA in head gives a not implemented error

Posted by Alexandru Dragomir <al...@gmail.com>.
As you mentioned , the workaround is to put the javascript (or at least the
one  that contains the  < and >) in a separate file.
This should be fine for majority of cases.
Alex

On 5/8/07, Mike_R <Mi...@gmx.net> wrote:
>
>
> Hi,
>
> I was copying some google maps javascript
> (http://www.google.com/uds/samples/places.html)  inside of the head of my
> Border component.
> Since the javascript code uses < and >, it's protected with //<![CDATA[
>
> When I try to use the Border component with this CDATA block I get a
> message
> stating 'not implemented yet: CDATA'.
>
> Is this a known limitation, should I file a bug and how can I solve this?
> When I put the javascript in a separate file the error seemed gone,
> haven't
> tested any further though.
>
> thanks for the help
> Mike
>
>
> --
> View this message in context:
> http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>