You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by acilo <ac...@yahoo.de> on 2009/05/10 09:45:08 UTC

How to realize frames in my own jspwiki

I programmed my own folder tree for my JSPWiki and want to place it on the
left side. I tried it with <div> Tags like this: 
<div style="width:20%; white-space:nowrap; float:left;">
     <wiki:Include page="tree.jsp"/>
</div>
<div style="width:80%; white-space:nowrap; float:right;">
     <wiki:Include page="ViewTemplate.jsp"/>
</div>   in Wiki.jsp. 
This works fine but when I click a link in the tree to open a page in the
right content , left and right content reload instead of right content
alone. 

I also tried it with Frames like this:
 <frameset cols="250,*">
  <frame name="Navigation" target="Dates" src="tree.jsp">
  <frame name="Dates" src="ViewTemplate.jsp">
  <noframes>
    <body>
      <p> no Frames possible </p>
    </body>
  </noframes>
</frameset>
But this doesn't work. There is nothing on screen. 

How can I fix this? Thank You!

-- 
View this message in context: http://www.nabble.com/How-to-realize-frames-in-my-own-jspwiki-tp23467855p23467855.html
Sent from the JspWiki - User mailing list archive at Nabble.com.


Re: How to realize frames in my own jspwiki

Posted by acilo <ac...@yahoo.de>.
Thank You! I realized it with Frames now, but I will think about to do it
with <div> Tags and store the tree with cookies.

-- 
View this message in context: http://www.nabble.com/How-to-realize-frames-in-my-own-jspwiki-tp23467855p23637315.html
Sent from the JspWiki - User mailing list archive at Nabble.com.


Re: How to realize frames in my own jspwiki

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> I also tried it with Frames like this:
> <frameset cols="250,*">
>  <frame name="Navigation" target="Dates" src="tree.jsp">
>  <frame name="Dates" src="ViewTemplate.jsp">
>  <noframes>
>    <body>
>      <p> no Frames possible </p>
>    </body>
>  </noframes>
> </frameset>
> But this doesn't work. There is nothing on screen.

You can't reference ViewTemplate.jsp directly; you need to reference  
one of the top-level files like Wiki.jsp.

The best is to use your first approach, and define a way to store the  
state in a cookie so that your tree.jsp knows how to open in the right  
bits of the tree opened.  You will need to do that anyway in order to  
store the state between different visits, so it's not that big of a  
problem.

You could also use AJAX, but then you end up with a problem that the  
location shown in the address bar will be different than the actual  
address of the page you're viewing, and then you're breaking things  
like bookmarking and back button, and that's not very nice either.

/Janne