GWiki Features Developer View

Show this page as slide show

GWiki is not only an wiki application, but also an plattform to develop web base applications.




GWiki Features for developer


Introduction to GWiki Features.


Audience


Customizing Goals


Customize Tools

Knowledge:


Extending Goals

Extending Tools


Blueprint template

Define a form, which filled by the user.
A Blueprint template is a wiki page located in admin/blueprints.

{formlabel}
Fill this form for your template.
{formlabel}
Name:  {input:text|name=name|size=40|maxlength=10}.
{input:inputType=label|value=This is only a label and will not be included in resolved blueprint}
{formlabel}
This text will not shown in the evaluated wiki.
{formlabel}
A Textarea:
{input:textarea|name=thetext|cols=50|rows=10}
{formlabel}
{input:radio|value=First|name=radio} {input:label|value=First}
{input:radio|value=Second|name=radio|checked=true}{input:label|value=Second}
{input:checkbox|name=checkboxp|checked=true}{input:label|value=Choose it.}
{input:select|name=selectp|value=Second|values=First, Second, Third}
{formlabel}

Blueprint insert


Unknown macro:hr

Unknown macro:hr


Blueprint result


Extending Sample: Slide shows 1

Defining a new Meta template.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
	<bean id="config"
		class="de.micromata.genome.gwiki.model.config.GWikiMetaTemplate"
		singleton="false">
		<property name="elementType" value="gwiki" />
		<!--  1 Hour -->
		<property name="elementLifeTime" value="3600000" />
		<!--  no controlerId -->
		<!--  no controlerClass -->
		<property name="parts">
			<map>
				<entry key="Controler">
					<bean
						class="de.micromata.genome.gwiki.page.impl.GWikiDelegateToPageExecutableArtefakt">
						<property name="pageId" value="inc/s5template" />
						<property name="parts">
							<map>
								<entry key="MainPage">
									<bean
										class="de.micromata.genome.gwiki.page.impl.GWikiWikiPageArtefakt" />
								</entry>
							</map>
						</property>
					</bean>
				</entry>
			</map>
		</property>
	</bean>
</beans>

"inc/s5template" defines a new template


Extending Sample: Slide shows 2

The JSP Template

boolean showSlide = "true".equals(wikiContext.getRequestParameter('asSlide'));
if (showSlide) {
	String s5f = wikiContext.localUrl("static/s5");
	String s5h = """
		<meta name=\"version\" content=\"S5 1.1\" />
		<meta name=\"defaultView\" content=\"slideshow\" />
		<meta name=\"controlVis\" content=\"hidden\" />
	<link rel=\"stylesheet\" href=\"${s5f}/slides.css\" type=\"text/css\" media=\"projection\" id=\"slideProj\" />
	<link rel=\"stylesheet\" href=\"${s5f}/outline.css\" type=\"text/css\" media=\"screen\" id=\"outlineStyle\" />
	<link rel=\"stylesheet\" href=\"${s5f}/print.css\" type=\"text/css\" media=\"print\" id=\"slidePrint\" />
	<link rel=\"stylesheet\" href=\"${s5f}/opera.css\" type=\"text/css\" media=\"projection\" id=\"operaFix\" />
	<script src=\"${s5f}/slides.js\" type=\"text/javascript\"></script>
	"""
	;
	wikiContext.getRequiredHeader().add(s5h);
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<%
	wikiContext.include("inc/htmlHead");
%>
</head>
<body>
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<%
	wikiContext.setRequestAttribute('GWIKI_SLIDESHOW_SECTION', 'layout');
	MainPage.render(wikiContext);
%>
</div>
<div class="presentation">
<%	
} else {
	wikiContext.skinInclude('standardhead');
%>	<a target="slideshow" href="#" 
	onclick="window.open('<%=wikiContext.localUrl(wikiContext.getCurrentElement().getElementInfo().getId()) %>?asSlide=true', 'gwiki_slideshow', 'resizable, scrollbars'); return false;">As Slide</a><br/>
<%
}
%>
<%
wikiContext.setRequestAttribute('GWIKI_SLIDESHOW_SECTION', 'slides');
	MainPage.render(wikiContext);
%>
....

Extending Sample: Slide shows 3

Create some Macros


Extending Sample: Comments


Extending More

Using Taglibs inside wiki

{jsptaglib:prefix=c|uri=/WEB-INF/tlds/c-rt.tld}
Now use the macro:
{cset:var=x|value=Hallo}{cset}

{cout:value="This will printed via jsp: ${x}"}{cout}



Now use the macro:

This will printed via jsp: Hallo


Using Groovy

{groovy}
for (int i in 1..10) {
 out.println("Hello " + i + "<br/>");
}
{groovy}

Access to:


All is GWiki

Integrate Goals


Integrate for Internationalization


Integrate for GUI parts

Wicket Support

Content Management


Developing Applications

GWiki can be used as rapid development plattform.


Developing GWiki



Future plans in GWiki Development.


Developing GWiki Improvments


Developing GWiki New Core Features


Developing GWiki Web 2.0


Developing GWiki Ad Ons


Developing GWiki Cloud


End


Last modified 2016-04-20 22:33 by rkommer. ViewCount: 1812
By Roger Rene Kommer r.kommer@micromata.de and Micromata