List Info

Thread: unparsed dynamic content?




unparsed dynamic content?
user name
2007-05-14 00:16:05
Hi,

What can cause the content not to be parsed?

Everything is fine, except this:
$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_
CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_
VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER
.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalen
darRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($n
umber)

Is it because it is not in scope?

I have included blojsom to the index page, "/"

<jsp:include page="/news/?flavor=index" />


Thank you,

Garrett

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

Re: unparsed dynamic content?
user name
2007-05-14 00:23:36
Hi Garret,

For some reason, your $BLOJSOM_CALENDAR_VTLHELPER object doesnot seem to exist in the Context. Which means, it is not available to tour velocity template. In which case instead of being parsed,&nbsp; the code is literally being printed.

For a good article on Velocity Templates please hit http://www.javaworld.com/javaworld/jw-12-2001/jw-1228-velocity.html

I an not using JSP with blojsom, so i probably don't know the intricacies, but this does not sound right to me :   <jsp:include page=";/news/?flavor=index&quot; />

the flavor=index part.

Shalini

On 5/14/07, Garrett Smith < dhtmlkitchengmail.com">dhtmlkitchengmail.com> wrote:
Hi,

What can cause the content not to be parsed?

Everything is fine, except this:
$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)

Is it because it is not in scope?

I have included blojsom to the index page, "/&quot;

<jsp:include page=";/news/?flavor=index&quot; />


Thank you,

Garrett

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net">Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users



--
Yesterday I played a blank tape at full blast. The mime next door went nuts.
~
Shalini

http://www.theessenceoftech.blogspot.com/
Re: unparsed dynamic content?
user name
2007-05-14 01:02:30
Hi Shalini,

If I use the default "asual.vm", e.g.
<jsp:include page="/news/" />

The calendar is rendered. If I use a different flavor,

If I use flavor=index, the calendar is not rendered.

The content of asual.vm now equals index.vm. Content:
<!-- Entries -->
							#parse("asual-header.vm")
							<div id="entries">
								#set($entryDate = "")
								#set($totalEntries = 0)
								#foreach($entry in $BLOJSOM_ENTRIES)
									#parse("asual-entry.vm")
								#end

							</div>
							<div id="column">
								#parse("asual-column.vm")
							</div>

Again, if I use flavor=index, I won't see the calendar.

index.vm and asual.vm have the exact same content.

I got it to work as desired, but I cannot explain why
index.vm doesn't
get the calendar in scope.

Garrett


On 5/13/07, Shalini Israni <shaliny.igmail.com> wrote:
> Hi Garret,
>
> For some reason, your $BLOJSOM_CALENDAR_VTLHELPER
object doesnot seem to
> exist in the Context. Which means, it is not available
to tour velocity
> template. In which case instead of being parsed,  the
code is literally
> being printed.
>
> For a good article on Velocity Templates please hit
> http://www.javaworld.com/javaworld/jw-12-2001
/jw-1228-velocity.html
>
> I an not using JSP with blojsom, so i probably don't
know the intricacies,
> but this does not sound right to me :  
<jsp:include
> page="/news/?flavor=index" />
>
> the flavor=index part.
>
> Shalini
>
>
> On 5/14/07, Garrett Smith <dhtmlkitchengmail.com> wrote:
> >
> > Hi,
> >
> > What can cause the content not to be parsed?
> >
> > Everything is fine, except this:
> >
>
$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_
CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_
VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER
.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalen
darRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($n
umber)
> >
> > Is it because it is not in scope?
> >
> > I have included blojsom to the index page,
"/"
> >
> > <jsp:include
page="/news/?flavor=index" />
> >
> >
> > Thank you,
> >
> > Garrett
> >
> >
>
------------------------------------------------------------
-------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2
express and take
> > control of your XML. No limits. Just data. Click
to get it now.
> > http://sourcefor
ge.net/powerbar/db2/
> > _______________________________________________
> > Blojsom-users mailing list
> > Blojsom-userslists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
> >
>
>
>
> --
> Yesterday I played a blank tape at full blast. The mime
next door went nuts.
> ~
> Shalini
>
> http://www.
theessenceoftech.blogspot.com/
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Blojsom-users mailing list
> Blojsom-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
>
>


-- 
http://dhtmlkitchen.com/


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

Re: unparsed dynamic content?
user name
2007-05-14 01:25:59
Hi Garret,

Asual is not a flavor. It is a velocity template file that is using other velocity template files (.vm files) in the #parse statements. Asual itself is a theme which consists of these .vm files. (Check out  the themes folder in the Source).

Flavors are - default, html etc...&nbsp; go to Admin Console ->Plugins->Mappings and see the table. The flavors are listed there. (Alternatively check the Plugins table in the Database)

So depending on what exactly you want to accomplish.. you have to change that statement of code. (i think maybe what you want to do is have your own theme)

Also, maybe you are thinking of index.vm as an index.html or an index.jsp (i.e default page for a webapp)... is not so...

Shalini



On 5/14/07, Garrett Smith < dhtmlkitchengmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dhtmlkitchengmail.com> wrote:
Hi Shalini,

If I use the default "asual.vm", e.g.
<jsp:include page=";/news/&quot; />

The calendar is rendered. If I use a different flavor,

If I use flavor=index, the calendar is not rendered.

The content of asual.vm now equals index.vm. Content:
&lt;!-- Entries -->
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;#parse(&quot;asual-header.vm&quot;)
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;<div id="entries";>
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; #set($entryDate = "&quot;)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;#set($totalEntries = 0)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;#foreach($entry in $BLOJSOM_ENTRIES)
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;#parse(&quot;asual-entry.vm&quot;)
 &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;#end

&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;</div>
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;<div id="column">
   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp;#parse("asual-column.vm&quot;)
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;</div&gt;

Again, if I use flavor=index, I won't see the calendar.

index.vm and asual.vm have the exact same content.

I got it to work as desired, but I cannot explain why index.vm doesn't
get the calendar in scope.

Garrett


On 5/13/07, Shalini Israni < shaliny.igmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">shaliny.igmail.com> wrote:
>; Hi Garret,
>
> For some reason, your $BLOJSOM_CALENDAR_VTLHELPER object doesnot seem to
> exist in the Context. Which means, it is not available to tour velocity
&gt; template. In which case instead of being parsed,&nbsp; the code is literally
> being printed.
&gt;
> For a good article on Velocity Templates please hit
> http://www.javaworld.com/javaworld/jw-12-2001/jw-1228-velocity.html
>
> I an not using JSP with blojsom, so i probably don't know the intricacies,
> but this does not sound right to me : &nbsp; <jsp:include
> page=";/news/?flavor=index&quot; />
>
> the flavor=index part.
>
> Shalini
&gt;
>
>; On 5/14/07, Garrett Smith < dhtmlkitchengmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dhtmlkitchengmail.com> wrote:
>; >
> > Hi,
> >
> > What can cause the content not to be parsed?
> >
> > Everything is fine, except this:
&gt; >
> $BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)$BLOJSOM_CALENDAR_VTLHELPER.getCalendarRow($number)
> >
> > Is it because it is not in scope?
>; >
> > I have included blojsom to the index page, "/&quot;
> >
> > <jsp:include page=";/news/?flavor=index&quot; />
&gt; >
> >
> > Thank you,
> >
> > Garrett
&gt; >
> >
> -------------------------------------------------------------------------
&gt; > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
&gt; > _______________________________________________
> > Blojsom-users mailing list
> > Blojsom-userslists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> Blojsom-userslists.sourceforge.net
> >
>; https://lists.sourceforge.net/lists/listinfo/blojsom-users
> >
>;
>
>
> --
> Yesterday I played a blank tape at full blast. The mime next door went nuts.
&gt; ~
> Shalini
&gt;
> http://www.theessenceoftech.blogspot.com/
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
&gt; Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
&gt; _______________________________________________
> Blojsom-users mailing list
> Blojsom-userslists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> Blojsom-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/blojsom-users
>
>


--
http://dhtmlkitchen.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users



--
Yesterday I played a blank tape at full blast. The mime next door went nuts.
~
Shalini

http://www.theessenceoftech.blogspot.com/
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )