package mildo.wiwo.components;

import mildo.wiwo.data.WiwoPage;
import mildo.wiwo.parser.MediaWikiParser;

import com.webobjects.appserver.*;

// Generated by the WOLips Templateengine Plug-in at Apr 19, 2009 5:36:06 AM
public class ShowWiwoPageComp 
	extends mildo.wiwo.components.BaseComp 
{

	public ShowWiwoPageComp(WOContext context) {
        super(context);
    }
	
	private WiwoPage page2Show;
	
	public void setPage2Show(WiwoPage aValue) {
		page2Show = aValue;
	}
	
	public WiwoPage getPage2Show() {
		return page2Show;
	}
	
	// --------------------
	
	public String getHtmlCode() {
		if (page2Show != null) {
			MediaWikiParser theParser = new MediaWikiParser(context());
			return theParser.parse2Html(page2Show.wikiMarkup());
		} else {
			return "";
		}
	}
	
}