You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jason Kary <jk...@cisco.com> on 2001/09/17 21:59:23 UTC

Trying to track down a bug in CVS HEAD.

Hello.

Is anyone else having trouble with $page not working?  I can not seem to
get it too work....  I've been tracing the problem but I am stuck and
need some pointers.

I have a page as followings:

$page.getTitle()
$page.getData().getContextPath()
$page

When the template is processed I get:

$page.getTitle()
$page.getData().getContextPath()


No $page..... The module code isn't doing anything special.  Can anyone
help shed some light on where to look next?  Here are the logs:



Take Care.
JK



Re: Trying to track down a bug in CVS HEAD.

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason Kary <jk...@cisco.com> writes:

> Here is the src layout file that I am using:
> 
> <link src="$ui.getStylecss()" />
> 
> <table width="100%">
>    <tr>
>       <td colspan="2">
>       $renderer.render("navigations", $data, "/bugrat/DefaultTop.vm")
>    </td>
>    </tr>
>    <tr>
>     <td align="center" valign="top">
>       $renderer.render("screens", $data, $template)
>    </td>
>    </tr>
> </table>
> 
> Attached is the translated code.   I've tested my Tomcat instance with a jsp
> page <%=request.getContextPath()%> and it returns /admin (which is correct).
> 
> Thoughts?

I think you forgot the output.

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Trying to track down a bug in CVS HEAD.

Posted by Jason Kary <jk...@cisco.com>.
Hi,

Here is the src layout file that I am using:

<link src="$ui.getStylecss()" />

<table width="100%">
   <tr>
      <td colspan="2">
      $renderer.render("navigations", $data, "/bugrat/DefaultTop.vm")
   </td>
   </tr>
   <tr>
    <td align="center" valign="top">
      $renderer.render("screens", $data, $template)
   </td>
   </tr>
</table>

Attached is the translated code.   I've tested my Tomcat instance with a jsp
page <%=request.getContextPath()%> and it returns /admin (which is correct).

Thoughts?

JK




Daniel Rall wrote:

> Jason Kary <jk...@cisco.com> writes:
>
> > Hello!
> >
> > Thank you for the quick response.  Ok You right. That is fixed.  Now I was
> > trying to solve a bigger problem, hence I was trying to get the template to
> > print out the ContextPath.
> >
> > $ui.getStylecss()  seems to be returning the absolute path to the style
> > sheet?  Are you seeing this bug?
>
> Could you provide an example?  I'm not sure what the expected behavior
> is, but at a cursory glance it appears that it's operating as
> advirtised...
>
>     /**
>      * Retrieve the URL for the style sheet that is part
>      * of a skin. The style is stored in the
>      * WEBAPP/resources/ui/skins/<SKIN> directory with the
>      * filename skin.css
>      */
>     public String getStylecss()
>     {
>         StringBuffer sb = new StringBuffer();
>
>         sb.append(Turbine.getServerScheme()).
>            append("://").
>            append(Turbine.getServerName()).
>            append(":").
>            append(Turbine.getServerPort()).
>            append(Turbine.getApplicationRoot()).
>            append("/").
>            append(resourcesDirectory).
>            append(SKINS_DIRECTORY).
>            append("/").
>            append(getSkin()).
>            append("/").
>            append(SKIN_CSS_FILE);
>
>         return sb.toString();
>     }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Trying to track down a bug in CVS HEAD.

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason Kary <jk...@cisco.com> writes:

> Hello!
> 
> Thank you for the quick response.  Ok You right. That is fixed.  Now I was
> trying to solve a bigger problem, hence I was trying to get the template to
> print out the ContextPath.
> 
> $ui.getStylecss()  seems to be returning the absolute path to the style
> sheet?  Are you seeing this bug?

Could you provide an example?  I'm not sure what the expected behavior
is, but at a cursory glance it appears that it's operating as
advirtised...


    /**
     * Retrieve the URL for the style sheet that is part
     * of a skin. The style is stored in the
     * WEBAPP/resources/ui/skins/<SKIN> directory with the
     * filename skin.css
     */
    public String getStylecss()
    {
        StringBuffer sb = new StringBuffer();

        sb.append(Turbine.getServerScheme()).
           append("://").
           append(Turbine.getServerName()).
           append(":").
           append(Turbine.getServerPort()).
           append(Turbine.getApplicationRoot()).
           append("/").
           append(resourcesDirectory).
           append(SKINS_DIRECTORY).
           append("/").
           append(getSkin()).
           append("/").
           append(SKIN_CSS_FILE);

        return sb.toString();
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Trying to track down a bug in CVS HEAD.

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/17/01 1:46 PM, "Jason Kary" <jk...@cisco.com> wrote:

> Hello!
> 
> Thank you for the quick response.  Ok You right. That is fixed.  Now I was
> trying to solve a bigger problem, hence I was trying to get the template to
> print out the ContextPath.

You can get access to the RunData through $data

> $ui.getStylecss()  seems to be returning the absolute path to the style
> sheet?  Are you seeing this bug?

Sorry. We don't use that tool in Scarab.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Trying to track down a bug in CVS HEAD.

Posted by Jason Kary <jk...@cisco.com>.
Hello!

Thank you for the quick response.  Ok You right. That is fixed.  Now I was
trying to solve a bigger problem, hence I was trying to get the template to
print out the ContextPath.

$ui.getStylecss()  seems to be returning the absolute path to the style
sheet?  Are you seeing this bug?

JK


Jon Stevens wrote:

> on 9/17/01 12:59 PM, "Jason Kary" <jk...@cisco.com> wrote:
>
> > Hello.
> >
> > Is anyone else having trouble with $page not working?  I can not seem to
> > get it too work....  I've been tracing the problem but I am stuck and
> > need some pointers.
> >
> > I have a page as followings:
> >
> > $page.getTitle()
>
> This should work...assuming that you have set the title.
>
> > $page.getData().getContextPath()
> > $page
>
> $page.toString() returns "" which is what I would expect in your output
> below.
>
> > When the template is processed I get:
> >
> > $page.getTitle()
> > $page.getData().getContextPath()
>
> Something seems wrong with something you are doing. I'm not sure where you
> have gotten the $page.getData() method from.
>
> -jon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Trying to track down a bug in CVS HEAD.

Posted by Jon Stevens <jo...@latchkey.com>.
on 9/17/01 12:59 PM, "Jason Kary" <jk...@cisco.com> wrote:

> Hello.
> 
> Is anyone else having trouble with $page not working?  I can not seem to
> get it too work....  I've been tracing the problem but I am stuck and
> need some pointers.
> 
> I have a page as followings:
> 
> $page.getTitle()

This should work...assuming that you have set the title.

> $page.getData().getContextPath()
> $page

$page.toString() returns "" which is what I would expect in your output
below.

> When the template is processed I get:
> 
> $page.getTitle()
> $page.getData().getContextPath()

Something seems wrong with something you are doing. I'm not sure where you
have gotten the $page.getData() method from.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org