You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcus Thiesen <ma...@freiheit.com> on 2007/01/31 10:48:23 UTC

Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Hi List,

I'm currently playing with the new and fancy AJAX components in Tapestry 4.1.1 
but I can't get them to work.

My minimal test case is:

Java:
package pages;

import org.apache.tapestry.annotations.EventListener;
import org.apache.tapestry.html.BasePage;

public abstract class TestInlineEditPage extends BasePage {

	public abstract String getText();
	
	
	@EventListener(events = "onSave", targets="testEdit")
	public void onTextUpdate()
	{
		System.out.println("Event listener called");
	}
		
	
}

HTML Template:
<html jwcid="@Shell" title="Test" browserLogLevel="DEBUG"
          consoleEnabled="true"
          debugEnabled="false"
>

<body jwcid="@Body">

    <div jwcid="testEdit" />

</body>
</html>

Mapping file:
<?xml version="1.0" encoding="UTF-8"?>
<!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.TestInlineEditPage">

    <component id="testEdit" type="InlineEditBox" >
        <binding name="value" value="text" />
    </component>
</page-specification>


What I see when I access the above page is more or less plain nothing (the 
generated HTML is at the end of this mail). The JavaScript error console 
shows as last error:

Error: impl is not a constructor
Source File: http://localhost:8080/testapp/assets/static/dojo/dojo.js
Line: 1021

I played with this for about 5 hours now. The example application 
(TimeTracker) works for me. I copied the setup (hivemodule.xml and web.xml) 
configuration more or less as is into my application. I tried different 
versions of Tapestry (current 4.1.2-SNAPSHOT, the version that comes with the 
prebuild example application) with no effect. 

I have the feeling that I'm missing something quit obvious but have no idea 
what it is.

Any suggestions?

Have fun,
	Marcus

Generated HTML Listing:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Page: TestInlineEdit -->
<!-- Generated: Wed Jan 31 10:36:43 CET 2007 -->
<html>
<head>
<meta name="generator" content="Tapestry Application Framework, version 
4.1.2" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Test</title>
<script type="text/javascript">djConfig = 
{"isDebug":false,"debugContainerId":"debug","baseRelativePath":"/testapp/assets/static/dojo/","preventBackButtonFix":false,"parseWidgets":false,"locale":"af"} 
</script>

 <script type="text/javascript" 
src="/testapp/assets/static/dojo/dojo.js"></script>
<script type="text/javascript">
dojo.registerModulePath("tapestry", "/testapp/assets/static/tapestry");

</script>
<script type="text/javascript" 
src="/testapp/assets/static/tapestry/core.js"></script>
<script type="text/javascript">
dojo.require("tapestry.namespace");
</script>
</head>


<body id="Body">
<script type="text/javascript"><!--
dojo.require("tapestry.widget.Widget");
dojo.require("tapestry.event");
// --></script>

    <div id="testEdit"></div>

<script type="text/javascript"><!--
dojo.addOnLoad(function(e) {
tapestry.widget.synchronizeWidgetState("testEdit", "InlineEditBox", 
{"widgetId":"testEdit","mode":"text","minWidth":100,"minHeight":200,"doFade":false}, 
false);
    
    var inlineBox=dojo.widget.byId("testEdit");
    
        inlineBox.enable();
tapestry.cleanConnect(dojo.widget.byId("testEdit"), "onSave", "event846691032");
                tapestry.event846691032=function(e){
                    var content={beventname:"onSave"};
                    tapestry.event.buildEventProperties(e, content);
                    if (!content["beventtarget.id"]) 
content["beventtarget.id"]="testEdit";
                    
tapestry.bind("/testapp/directevent.svc?component=testEdit&page=TestInlineEdit&session=T", 
content);
                };
                dojo.event.connect(dojo.widget.byId("testEdit"), "onSave", 
tapestry, "event846691032");});
// --></script></body>

</html>
<!-- Render time: ~ 16 ms -->

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor [SOLVED ]

Posted by Marcus Thiesen <ma...@freiheit.com>.
Am Mittwoch 31 Januar 2007 18:55 schrieb Shing Hing Man:
> I created that jira. Marcus has a different problem
> from the one mentioned in the jira.
>
> Shing

Ok, stupid me. It works.

I had a validation filter in my tomcat (from http://tuckey.org/validation/)
and it caused the problem.

I still believe that I tried a couple of times without it, but a collegue of 
mine proved me wrong today.

So nothing to see here, go on,

	Marcus

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Shing Hing Man <ma...@yahoo.com>.
I created that jira. Marcus has a different problem
from the one mentioned in the jira.

Shing


--- "Leffel, Daniel" <dl...@ebay.com> wrote:

> I haven't been able to use it, but I suspect it is
> because of this bug:
>
https://issues.apache.org/jira/browse/TAPESTRY-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> 
> I've been waiting for the fix.
> 
> -----Original Message-----
> From: Marcus Thiesen
> [mailto:marcus.thiesen@freiheit.com] 
> Sent: Wednesday, January 31, 2007 5:59 AM
> To: Tapestry users
> Subject: Re: Can't get InlineEditBox to work, quits
> with Javascript Error: impl is not a constructor
> 
> Am Mittwoch 31 Januar 2007 14:01 schrieb Shing Hing
> Man:
> > To be more specific, the following is the version
> of
> > Tapestry 4.1.2 Snapshot I am using.
> >
> >
>
org.apache.tapestry:tapestry-framework:4.1.2-20070121.182918-9
> >
> >
>
org.apache.tapestry:tapestry-contrib:4.1.2-20070121.182918-7
> >
> >
>
org.apache.tapestry:tapestry-annotations:4.1.2-20070121.182918-7
> >
> 
> Same here, only that today a new framework snapshot
> was released.
> 
> I don't consider the library version as the problem,
> because I tested my 
> application with the very same libraries the
> TimeTracker (which is working, 
> even for me) application uses. 
> 
> > I am using Java 1.5. I have tested the exmaple  in
> > Jetty and tomcat. So servlet container is unlikely
> > the cause of your problem.
> 
> That is true. I can run the TimeTracker application
> inside the very same 
> tomcat and it works. Java version doesn't seem to be
> the problem either.
> 
> So there has to be something in my
> web.xml/application configuration etc. that 
> causes this stuff to happen. I even checked all
> other libs on the classpath 
> for other dojo.js files etc.
> 
> I still fear that it might be something you
> naturally did when setting up my 
> example application that I just don't know and
> therefore only I have these 
> problems.
> 
> > Maybe  someone else whom have used the
> InlineEditBox
> > component could inform us whether they have any
> > problem with it.
> 
> Yes, please, help :).
> 
> >
> > Shing
> >
> 
> Thanks,
> 	Marcus
> 
> -- 
> Marcus Thiesen
> Bachelor of Science (BSc)
> 
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> 
> 0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4
> 
> Bücher kaufen und Freie Software fördern |
> http://bookzilla.de/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by "Leffel, Daniel" <dl...@ebay.com>.
I haven't been able to use it, but I suspect it is because of this bug:
https://issues.apache.org/jira/browse/TAPESTRY-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

I've been waiting for the fix.

-----Original Message-----
From: Marcus Thiesen [mailto:marcus.thiesen@freiheit.com] 
Sent: Wednesday, January 31, 2007 5:59 AM
To: Tapestry users
Subject: Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Am Mittwoch 31 Januar 2007 14:01 schrieb Shing Hing Man:
> To be more specific, the following is the version of
> Tapestry 4.1.2 Snapshot I am using.
>
> org.apache.tapestry:tapestry-framework:4.1.2-20070121.182918-9
>
> org.apache.tapestry:tapestry-contrib:4.1.2-20070121.182918-7
>
> org.apache.tapestry:tapestry-annotations:4.1.2-20070121.182918-7
>

Same here, only that today a new framework snapshot was released.

I don't consider the library version as the problem, because I tested my 
application with the very same libraries the TimeTracker (which is working, 
even for me) application uses. 

> I am using Java 1.5. I have tested the exmaple  in
> Jetty and tomcat. So servlet container is unlikely
> the cause of your problem.

That is true. I can run the TimeTracker application inside the very same 
tomcat and it works. Java version doesn't seem to be the problem either.

So there has to be something in my web.xml/application configuration etc. that 
causes this stuff to happen. I even checked all other libs on the classpath 
for other dojo.js files etc.

I still fear that it might be something you naturally did when setting up my 
example application that I just don't know and therefore only I have these 
problems.

> Maybe  someone else whom have used the InlineEditBox
> component could inform us whether they have any
> problem with it.

Yes, please, help :).

>
> Shing
>

Thanks,
	Marcus

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Marcus Thiesen <ma...@freiheit.com>.
Am Mittwoch 31 Januar 2007 14:01 schrieb Shing Hing Man:
> To be more specific, the following is the version of
> Tapestry 4.1.2 Snapshot I am using.
>
> org.apache.tapestry:tapestry-framework:4.1.2-20070121.182918-9
>
> org.apache.tapestry:tapestry-contrib:4.1.2-20070121.182918-7
>
> org.apache.tapestry:tapestry-annotations:4.1.2-20070121.182918-7
>

Same here, only that today a new framework snapshot was released.

I don't consider the library version as the problem, because I tested my 
application with the very same libraries the TimeTracker (which is working, 
even for me) application uses. 

> I am using Java 1.5. I have tested the exmaple  in
> Jetty and tomcat. So servlet container is unlikely
> the cause of your problem.

That is true. I can run the TimeTracker application inside the very same 
tomcat and it works. Java version doesn't seem to be the problem either.

So there has to be something in my web.xml/application configuration etc. that 
causes this stuff to happen. I even checked all other libs on the classpath 
for other dojo.js files etc.

I still fear that it might be something you naturally did when setting up my 
example application that I just don't know and therefore only I have these 
problems.

> Maybe  someone else whom have used the InlineEditBox
> component could inform us whether they have any
> problem with it.

Yes, please, help :).

>
> Shing
>

Thanks,
	Marcus

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Shing Hing Man <ma...@yahoo.com>.
To be more specific, the following is the version of
Tapestry 4.1.2 Snapshot I am using. 

org.apache.tapestry:tapestry-framework:4.1.2-20070121.182918-9
        
org.apache.tapestry:tapestry-contrib:4.1.2-20070121.182918-7
     
org.apache.tapestry:tapestry-annotations:4.1.2-20070121.182918-7

I am using Java 1.5. I have tested the exmaple  in
Jetty and tomcat. So servlet container is unlikely 
the cause of your problem.

I am using maven 2 to pull down the latest Tapestry
4.1.2 Snapshots from the following repository.
   <repository>
        <id>apache.snapshots</id>
       
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
    </repository>

Maybe  someone else whom have used the InlineEditBox 
component could inform us whether they have any
problem with it. 

Shing 




--- Marcus Thiesen <ma...@freiheit.com>
wrote:

> Hi Shing,
> 
> > When you click on 'Hello world', the static text
> will
> > be replaced by an  editiable text box, and there
> are
> > also the Save and cancel buttons.
> 
> Yes, I've seen the widget in action, but it doesn't
> work for me.
> 
> >
> > I am using your code/page with the  additional
> > @Initial to initialise the property
> > text.
> 
> 
> As do I.
> 
> >
> > I have deployed your example at the following
> > (friendly urls is used).
> >
> >
>
http://lombok.demon.co.uk/testTapestry41/inlineEditBox/TestInlineEditPage.h
> >tml
> >
> 
> That works for me :/.
> 
> > There is nothing in my hivemodule.xml .application
> > that are related to the component InlineEditBox.
> >
> 
> But anything has to be different... is this somehow
> Java (1.6) and/or Tomcat 
> Version (2.5.20) specific?
> 
> > Just to remind you that I am using Tapetsry 4.1.2
> > Snapshot.
> 
> I'm using a snapshot as well, namely the 4.1.2
> snapshot from today and the 
> annotations and contrib snapshot from the 21st. 
> 
> Anyway, it seems that your example renders slightly
> different Javascript. Your 
> page has two "tapestry.cleanConnect" blocks, whereas
> my page only shows one. 
> But whene we both are using the same version of
> tapestry, something has to 
> trigger this behaviour that is not in my code.
> 
> >
> > Shing
> >
> >
> 
> Have fun,
> 	Marcus
> 
> -- 
> Marcus Thiesen
> Bachelor of Science (BSc)
> 
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> 
> 0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4
> 
> Bücher kaufen und Freie Software fördern |
> http://bookzilla.de/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Marcus Thiesen <ma...@freiheit.com>.
Hi Shing,

> When you click on 'Hello world', the static text will
> be replaced by an  editiable text box, and there are
> also the Save and cancel buttons.

Yes, I've seen the widget in action, but it doesn't work for me.

>
> I am using your code/page with the  additional
> @Initial to initialise the property
> text.


As do I.

>
> I have deployed your example at the following
> (friendly urls is used).
>
> http://lombok.demon.co.uk/testTapestry41/inlineEditBox/TestInlineEditPage.h
>tml
>

That works for me :/.

> There is nothing in my hivemodule.xml .application
> that are related to the component InlineEditBox.
>

But anything has to be different... is this somehow Java (1.6) and/or Tomcat 
Version (2.5.20) specific?

> Just to remind you that I am using Tapetsry 4.1.2
> Snapshot.

I'm using a snapshot as well, namely the 4.1.2 snapshot from today and the 
annotations and contrib snapshot from the 21st. 

Anyway, it seems that your example renders slightly different Javascript. Your 
page has two "tapestry.cleanConnect" blocks, whereas my page only shows one. 
But whene we both are using the same version of tapestry, something has to 
trigger this behaviour that is not in my code.

>
> Shing
>
>

Have fun,
	Marcus

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Shing Hing Man <ma...@yahoo.com>.
> I don't see the Save button or anything that should
> be dynamically rendered 
> into the page.


When you click on 'Hello world', the static text will
be replaced by an  editiable text box, and there are
also the Save and cancel buttons.

I am using your code/page with the  additional 
@Initial to initialise the property 
text. 

I have deployed your example at the following
(friendly urls is used).

http://lombok.demon.co.uk/testTapestry41/inlineEditBox/TestInlineEditPage.html

There is nothing in my hivemodule.xml .application
that are related to the component InlineEditBox. 

Just to remind you that I am using Tapetsry 4.1.2
Snapshot.

Shing



--- Marcus Thiesen <ma...@freiheit.com>
wrote:

> Hi Shing,
> 
> Am Mittwoch 31 Januar 2007 11:39 schrieb Shing Hing
> Man:
> > I have run the page/code given in your original
> mail
> > with property text set to 'Hello world'.
> > After I edit 'Hello world' and click the save
> button,
> > the listener method onTextUpdate is called.
> >
> > I have no javascript errors and I am using
> Tapestry
> > 4.1.2 Snapshot.
> 
> So the main question is what is the difference
> between your setup and mine?
> 
> I don't see the Save button or anything that should
> be dynamically rendered 
> into the page.
> 
> Can I have a look at your configuration files for
> the application 
> (web.xml/.application file/hivemodules.xml)?
> 
> Or is this an encoding issue of some sort?
> 
> I have no idea, I only see that my example still
> doesn't work for me.
> 
> >
> > Shing
> 
> Have fun,
> 	Marcus
> 
> -- 
> Marcus Thiesen
> Bachelor of Science (BSc)
> 
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> 
> 0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4
> 
> Bücher kaufen und Freie Software fördern |
> http://bookzilla.de/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Marcus Thiesen <ma...@freiheit.com>.
Hi Shing,

Am Mittwoch 31 Januar 2007 11:39 schrieb Shing Hing Man:
> I have run the page/code given in your original mail
> with property text set to 'Hello world'.
> After I edit 'Hello world' and click the save button,
> the listener method onTextUpdate is called.
>
> I have no javascript errors and I am using Tapestry
> 4.1.2 Snapshot.

So the main question is what is the difference between your setup and mine?

I don't see the Save button or anything that should be dynamically rendered 
into the page.

Can I have a look at your configuration files for the application 
(web.xml/.application file/hivemodules.xml)?

Or is this an encoding issue of some sort?

I have no idea, I only see that my example still doesn't work for me.

>
> Shing

Have fun,
	Marcus

-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bookzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Shing Hing Man <ma...@yahoo.com>.
I have run the page/code given in your original mail
with property text set to 'Hello world'.
After I edit 'Hello world' and click the save button,
the listener method onTextUpdate is called. 

I have no javascript errors and I am using Tapestry
4.1.2 Snapshot.



Shing




--- Marcus Thiesen <ma...@freiheit.com>
wrote:

> Hey Shing,
> 
> Am Mittwoch 31 Januar 2007 11:07 schrieb Shing Hing
> Man:
> > The displayed html is blank because you have not
> given
> >
> > the property text a value.
> >
> 
> Well, this didn't really do the trick. I see that
> the generated Javscript 
> changed to 
> 
> tapestry.widget.synchronizeWidgetState("testEdit",
> "InlineEditBox", 
> {"widgetId":"testEdit","value":"Hello 
>
World","mode":"text","minWidth":100,"minHeight":200,"doFade":false},
> false);
> 
> so it sees the "Hello World" but nothing is
> displayed and I still get a 
> JavaScript Error in my error console. Furthermore,
> if I change my template 
> from
> 
> <div jwcid="testEdit" />
> 
> to 
> 
> <div jwcid="testEdit">Here should be an edit</div>
> 
> I see this text, which I think should actually be
> overwritten by the 
> Javascript of the InlineEditBox. So it looks more
> like the script doesn't 
> run. 
> 
> BTW, shouldn't an EditBox work regardless of a value
> set (in case you wan't to 
> use it for an initial value?)
> 
> > Shing
> 
> Have fun,
> 	Marcus
> 
> 
> -- 
> Marcus Thiesen
> Bachelor of Science (BSc)
> 
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> 
> 0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4
> 
> Bücher kaufen und Freie Software fördern |
> http://bokzilla.de/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Marcus Thiesen <ma...@freiheit.com>.
Hey Shing,

Am Mittwoch 31 Januar 2007 11:07 schrieb Shing Hing Man:
> The displayed html is blank because you have not given
>
> the property text a value.
>

Well, this didn't really do the trick. I see that the generated Javscript 
changed to 

tapestry.widget.synchronizeWidgetState("testEdit", "InlineEditBox", 
{"widgetId":"testEdit","value":"Hello 
World","mode":"text","minWidth":100,"minHeight":200,"doFade":false}, false);

so it sees the "Hello World" but nothing is displayed and I still get a 
JavaScript Error in my error console. Furthermore, if I change my template 
from

<div jwcid="testEdit" />

to 

<div jwcid="testEdit">Here should be an edit</div>

I see this text, which I think should actually be overwritten by the 
Javascript of the InlineEditBox. So it looks more like the script doesn't 
run. 

BTW, shouldn't an EditBox work regardless of a value set (in case you wan't to 
use it for an initial value?)

> Shing

Have fun,
	Marcus


-- 
Marcus Thiesen
Bachelor of Science (BSc)

freiheit.com technologies gmbh
Straßenbahnring 22 / 20251 Hamburg, Germany
fon       +49 (0)40 / 890584-0
fax       +49 (0)40 / 890584-20

0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4

Bücher kaufen und Freie Software fördern | http://bokzilla.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can't get InlineEditBox to work, quits with Javascript Error: impl is not a constructor

Posted by Shing Hing Man <ma...@yahoo.com>.
The displayed html is blank because you have not given

the property text a value. 

Try  giving the property text an initial value by

@InitialValue("literal:Hello World")
	public abstract String getText();

or set it in the pageBeginRender method.

Shing


--- Marcus Thiesen <ma...@freiheit.com>
wrote:

> Hi List,
> 
> I'm currently playing with the new and fancy AJAX
> components in Tapestry 4.1.1 
> but I can't get them to work.
> 
> My minimal test case is:
> 
> Java:
> package pages;
> 
> import
> org.apache.tapestry.annotations.EventListener;
> import org.apache.tapestry.html.BasePage;
> 
> public abstract class TestInlineEditPage extends
> BasePage {
> 
> 	public abstract String getText();
> 	
> 	
> 	@EventListener(events = "onSave",
> targets="testEdit")
> 	public void onTextUpdate()
> 	{
> 		System.out.println("Event listener called");
> 	}
> 		
> 	
> }
> 
> HTML Template:
> <html jwcid="@Shell" title="Test"
> browserLogLevel="DEBUG"
>           consoleEnabled="true"
>           debugEnabled="false"
> >
> 
> <body jwcid="@Body">
> 
>     <div jwcid="testEdit" />
> 
> </body>
> </html>
> 
> Mapping file:
> <?xml version="1.0" encoding="UTF-8"?>
> <!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.TestInlineEditPage">
> 
>     <component id="testEdit" type="InlineEditBox" >
>         <binding name="value" value="text" />
>     </component>
> </page-specification>
> 
> 
> What I see when I access the above page is more or
> less plain nothing (the 
> generated HTML is at the end of this mail). The
> JavaScript error console 
> shows as last error:
> 
> Error: impl is not a constructor
> Source File:
>
http://localhost:8080/testapp/assets/static/dojo/dojo.js
> Line: 1021
> 
> I played with this for about 5 hours now. The
> example application 
> (TimeTracker) works for me. I copied the setup
> (hivemodule.xml and web.xml) 
> configuration more or less as is into my
> application. I tried different 
> versions of Tapestry (current 4.1.2-SNAPSHOT, the
> version that comes with the 
> prebuild example application) with no effect. 
> 
> I have the feeling that I'm missing something quit
> obvious but have no idea 
> what it is.
> 
> Any suggestions?
> 
> Have fun,
> 	Marcus
> 
> Generated HTML Listing:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
> Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <!-- Page: TestInlineEdit -->
> <!-- Generated: Wed Jan 31 10:36:43 CET 2007 -->
> <html>
> <head>
> <meta name="generator" content="Tapestry Application
> Framework, version 
> 4.1.2" />
> <meta http-equiv="Content-Type"
> content="text/html;charset=UTF-8" />
> <title>Test</title>
> <script type="text/javascript">djConfig = 
>
{"isDebug":false,"debugContainerId":"debug","baseRelativePath":"/testapp/assets/static/dojo/","preventBackButtonFix":false,"parseWidgets":false,"locale":"af"}
> 
> </script>
> 
>  <script type="text/javascript" 
> src="/testapp/assets/static/dojo/dojo.js"></script>
> <script type="text/javascript">
> dojo.registerModulePath("tapestry",
> "/testapp/assets/static/tapestry");
> 
> </script>
> <script type="text/javascript" 
>
src="/testapp/assets/static/tapestry/core.js"></script>
> <script type="text/javascript">
> dojo.require("tapestry.namespace");
> </script>
> </head>
> 
> 
> <body id="Body">
> <script type="text/javascript"><!--
> dojo.require("tapestry.widget.Widget");
> dojo.require("tapestry.event");
> // --></script>
> 
>     <div id="testEdit"></div>
> 
> <script type="text/javascript"><!--
> dojo.addOnLoad(function(e) {
> tapestry.widget.synchronizeWidgetState("testEdit",
> "InlineEditBox", 
>
{"widgetId":"testEdit","mode":"text","minWidth":100,"minHeight":200,"doFade":false},
> 
> false);
>     
>     var inlineBox=dojo.widget.byId("testEdit");
>     
>         inlineBox.enable();
> tapestry.cleanConnect(dojo.widget.byId("testEdit"),
> "onSave", "event846691032");
>                 tapestry.event846691032=function(e){
>                     var
> content={beventname:"onSave"};
>                    
> tapestry.event.buildEventProperties(e, content);
>                     if (!content["beventtarget.id"])
> 
> content["beventtarget.id"]="testEdit";
>                     
>
tapestry.bind("/testapp/directevent.svc?component=testEdit&page=TestInlineEdit&session=T",
> 
> content);
>                 };
>                
> dojo.event.connect(dojo.widget.byId("testEdit"),
> "onSave", 
> tapestry, "event846691032");});
> // --></script></body>
> 
> </html>
> <!-- Render time: ~ 16 ms -->
> 
> -- 
> Marcus Thiesen
> Bachelor of Science (BSc)
> 
> freiheit.com technologies gmbh
> Straßenbahnring 22 / 20251 Hamburg, Germany
> fon       +49 (0)40 / 890584-0
> fax       +49 (0)40 / 890584-20
> 
> 0553 222D ABF2 DF71 0CF6  C262 C77E 2AAF 6BE4 4DA4
> 
> Bücher kaufen und Freie Software fördern |
> http://bookzilla.de/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org