Users - what does this line say

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - what does this line say

puranisank

can I please get help in finding the following line:
<img src='<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")}</@ofbizContentUrl>' align="left" height="50" class='imageborder' border='0'> "

Purani
 




 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - what does this line say

Vinay Agarwal

The best way to understand that is to break it down.

1. The following should be obvious. All I did was to take out src url.

<img src='……' align="left" height="50" class='imageborder' border='0'>

    Here’s the src url

            <@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")}</@ofbizContentUrl>

2. Src url has the following form

            <@ofbizContentUrl>…..</@ofbizContentUrl>

    This is specifying that it is a content url and the prefix is defined in a file (I don’t remember the name but you can search on this mailing list, it was stated recently).

3. The remaining part is this

            ${requestAttributes.contentPathPrefix?if_exists}${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")}

    It is made up of two freemarker expressions each enclosed in ${…}

4. ${requestAttributes.contentPathPrefix?if_exists} is evaluated to the requestAttributes.contentPathPrefix if it exists, “” String otherwise.

5.  ${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")} is evaluated to managerSpecial.smallImageUrl if it exists, "/images/defaultImage.jpg" otherwise.

 

Vinay

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Purani S
Sent:
Thursday, March 16, 2006 9:16 PM
To: [hidden email]
Subject: [OFBiz] Users - what does this line say

 

can I please get help in finding the following line:
<img src='<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")}</@ofbizContentUrl>' align="left" height="50" class='imageborder' border='0'> "

Purani
 




 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - what does this line say

puranisank
In reply to this post by puranisank

Vinay, thanks for clearing the doubt.
Can I get help in the following error.
Method public java.lang.String org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException threw an exception when invoked on org.ofbiz.widget.screen.ScreenRenderer@4d4834 The problematic instruction: ---------- ==> ${screens.render(productsummaryScreen)} [on line 58, column 13 in categorydetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public java.lang.String org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException threw an exception when invoked on org.ofbiz.widget.screen.ScreenRenderer@4d4834 at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:133) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at

 


On Fri, 17 Mar 2006 Vinay Agarwal wrote :
>The best way to understand that is to break it down.
>
>1. The following should be obvious. All I did was to take out src url.
>
><img src='..' align="left" height="50" class='imageborder' border='0'>
>
>    Here's the src url
>
>
><@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${managerS
>pecial.smallImageUrl?default("/images/defaultImage.jpg")}</@ofbizContentUrl>
>
>2. Src url has the following form
>
>            <@ofbizContentUrl>...</@ofbizContentUrl>
>
>    This is specifying that it is a content url and the prefix is defined in
>a file (I don't remember the name but you can search on this mailing list,
>it was stated recently).
>
>3. The remaining part is this
>
>
>${requestAttributes.contentPathPrefix?if_exists}${managerSpecial.smallImageU
>rl?default("/images/defaultImage.jpg")}
>
>    It is made up of two freemarker expressions each enclosed in ${.}
>
>4. ${requestAttributes.contentPathPrefix?if_exists} is evaluated to the
>requestAttributes.contentPathPrefix if it exists, "" String otherwise.
>
>5.  ${managerSpecial.smallImageUrl?default("/images/defaultImage.jpg")} is
>evaluated to managerSpecial.smallImageUrl if it exists,
>"/images/defaultImage.jpg" otherwise.
>
>
>
>Vinay
>
>
>
>-----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
>On Behalf Of Purani S
>Sent: Thursday, March 16, 2006 9:16 PM
>To: [hidden email]
>Subject: [OFBiz] Users - what does this line say
>
>
>
>can I please get help in finding the following line:
><img
>src='<@ofbizContentUrl>${requestAttributes.contentPathPrefix?if_exists}${man
>agerSpecial.smallImageUrl?default("/images/defaultImage.jpg")}</@ofbizConten
>tUrl>' align="left" height="50" class='imageborder' border='0'> "
>
>Purani
>
>
>
>
>
><http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signa
>ture-home.htm/1507191490@Middle5?PARTNER=3>
>
>
>_______________________________________________
>Users mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/users




 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users