de.tuberlin.cs.flp.jspwiki.tags
Class PageReferredByTag

java.lang.Object
  extended byWikiTagBase
      extended byde.tuberlin.cs.flp.jspwiki.tags.PageReferredByTag

public class PageReferredByTag
extends WikiTagBase

<wiki:PageReferredBy page='...'>
    ...
</wiki:PageReferredBy>

Implements a JSP-tag named "<wiki:PageReferredBy>" which includes its body into the page if this page is referred from the page given by parameter page. (I.e., if 'page' contains a link to this page.)

See Also:
Serialized Form

Field Summary
protected  java.lang.String m_pageName
          The name of the page which is tested whether it refers to the current page.
 
Constructor Summary
PageReferredByTag()
           
 
Method Summary
 int doWikiStartTag()
          Decides whether to include the body part or not.
 java.lang.String getPage()
          Returns the page name.
 void setPage(java.lang.String page)
          Sets the page name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_pageName

protected java.lang.String m_pageName
The name of the page which is tested whether it refers to the current page.

Constructor Detail

PageReferredByTag

public PageReferredByTag()
Method Detail

setPage

public void setPage(java.lang.String page)
Sets the page name.

Parameters:
page - The page name.

getPage

public java.lang.String getPage()
Returns the page name.

Returns:

doWikiStartTag

public final int doWikiStartTag()
                         throws java.io.IOException
Decides whether to include the body part or not. The body part is included if the page named by getPage() includes a link to the current page. Known bug: if this page's name contains special chars (e.g. German umlauts) an existing reference from the referring page may not be found.

Returns:
evaluation result code
Throws:
java.io.IOException - if an i/o error occurs