You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ta...@janheck.de on 2006/08/22 14:59:11 UTC
Problems with InlineEditBox
Hello,
i have got a problem with the InlineEditBox Component in Tapestry:
My Page-Specification:
<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry
Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<page-specification class="pages.Home">
<description>Partial Page Rendering example with forms</description>
<property name="editedText" persist="session" initial-value="literal:Untertitel hier eingeben"/>
<component id="editText" type="tacos:InlineEditBox" >
<binding name="listener" value="listener:processEdit" />
<binding name="value" value="ognl:editedText" />
<binding name="direct" value="ognl:false" />
</component>
</page-specification>
My Home.java:
package pages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.html.BasePage;
public abstract class Home extends BasePage {
public void starte(IRequestCycle cycle){
IPage page = cycle.getPage("Seite");
cycle.activate(page);
}
/** Logger */
private static final Log log = LogFactory.getLog(Home.class);
/**
* Processes a newly selected value.
* @param newValue
*/
public void processEdit(String newValue)
{
log.debug("processEdit(" + newValue + ")");
if (newValue != null) {
setEditedText("--" + newValue + "--");
}
}
/** Gets the value */
public abstract String getEditedText();
/** Sets the value */
public abstract void setEditedText(String value);
}
My Home.html:
<html jwcid="@Shell"
title="TestEventListener1"
ajaxEnabled="true"
browserLogLevel="DEBUG" >
<body jwcid="@Body">
<h1>Test EventListener 1</h1>
<div id="notes">
<div class="note" >
<h2>Sample Text</h2>
<p>
This is a block of sample text.
<div jwcid="editText">Dancing(edit me)</div> is fun.
</p>
</div>
</div>
</body>
</html>
Can anybody help me?
Thx
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problems with InlineEditBox
Posted by andyhot <an...@di.uoa.gr>.
current Tacos works with Tapestry 4.0.x
tapestry@janheck.de wrote:
> Hello,
>
> i have got a problem with the InlineEditBox Component in Tapestry:
>
> My Page-Specification:
> <?xml version="1.0"?>
> <!DOCTYPE page-specification PUBLIC
> "-//Apache Software Foundation//Tapestry
> Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
>
> <page-specification class="pages.Home">
> <description>Partial Page Rendering example with forms</description>
>
> <property name="editedText" persist="session" initial-value="literal:Untertitel hier eingeben"/>
> <component id="editText" type="tacos:InlineEditBox" >
> <binding name="listener" value="listener:processEdit" />
> <binding name="value" value="ognl:editedText" />
> <binding name="direct" value="ognl:false" />
> </component>
>
> </page-specification>
>
> My Home.java:
> package pages;
>
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.apache.tapestry.IPage;
> import org.apache.tapestry.IRequestCycle;
> import org.apache.tapestry.html.BasePage;
>
>
> public abstract class Home extends BasePage {
>
>
> public void starte(IRequestCycle cycle){
> IPage page = cycle.getPage("Seite");
> cycle.activate(page);
> }
>
>
>
> /** Logger */
> private static final Log log = LogFactory.getLog(Home.class);
>
> /**
> * Processes a newly selected value.
> * @param newValue
> */
> public void processEdit(String newValue)
> {
> log.debug("processEdit(" + newValue + ")");
> if (newValue != null) {
> setEditedText("--" + newValue + "--");
> }
> }
>
> /** Gets the value */
> public abstract String getEditedText();
> /** Sets the value */
> public abstract void setEditedText(String value);
> }
>
> My Home.html:
> <html jwcid="@Shell"
> title="TestEventListener1"
> ajaxEnabled="true"
> browserLogLevel="DEBUG" >
> <body jwcid="@Body">
> <h1>Test EventListener 1</h1>
> <div id="notes">
>
> <div class="note" >
> <h2>Sample Text</h2>
>
> <p>
> This is a block of sample text.
> <div jwcid="editText">Dancing(edit me)</div> is fun.
> </p>
> </div>
>
> </div>
> </body>
> </html>
>
> Can anybody help me?
>
> Thx
>
> Jan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org