You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org> on 2006/08/19 18:36:14 UTC
[jira] Resolved: (TAPESTRY-1070) no id specified on the rendered
Body element
[ http://issues.apache.org/jira/browse/TAPESTRY-1070?page=all ]
Jesse Kuhnert resolved TAPESTRY-1070.
-------------------------------------
Fix Version/s: 4.1.1
Resolution: Fixed
Added id attribute render to Body component.
> no id specified on the rendered Body element
> --------------------------------------------
>
> Key: TAPESTRY-1070
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1070
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 4.1
> Environment: Java SDK 5.0
> Apache Tomcat/5.5.9
> Reporter: Tahseen Ur Rehman
> Assigned To: Jesse Kuhnert
> Fix For: 4.1.1
>
>
> I am trying the basic example of Tapestry 4.1 given on this link http://tapestry.apache.org/tapestry4.1/ajax/EventListener.html
> But the Ajax functionality does not seems to work .... I posted this on the mailing list and Jesse Kuhnert suggest that no id for the Body element.
> Browser Output (View Source)
> --------------------------------------------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <!-- Application: null -->
> <!-- Page: Home -->
> <!-- Generated: Thu Aug 17 00:10:00 PKT 2006 -->
> <html>
> <head>
> <meta name="generator" content="Tapestry Application
> Framework, version 4.1"/>
> <meta http-equiv="Content-Type"
> content="text/html;charset=UTF-8"/>
> <base
> href="http://localhost:8080/whiteboard/"/><!--[if
> IE]></base><![endif]-->
> <title>Whiteboard</title>
> <script type="text/javascript">djConfig = { isDebug:
> true, debugContainerId:'debug',
> baseRelativePath:"http://localhost:8080/whiteboard/app?service=asset&path=%2Fdojo%2F",
> preventBackButtonFix: false, parseWidgets: false };
> </script>
> <script type="text/javascript"
> src="http://localhost:8080/whiteboard/app?service=asset&path=%2Fdojo%2Fdojo.js"></script><script
> type="text/javascript"
> src="http://localhost:8080/whiteboard/app?digest=70bde2c664cbcfa071d91ccec1438f38&service=asset&path=%2Ftapestry%2Fcore.js"></script>
> <script
> type="text/javascript">dojo.require("dojo.logging.Logger");
> dojo.log.setLevel(dojo.log.getLevel("WARNING"));</script></head>
>
> <body>
> <script type="text/javascript"><!--
> dojo.require("dojo.event");
> dojo.require("tapestry.*");
> // --></script>
> <div id="myFavoriteDiv">
> Big brother is watching you ...
> </div>
> <script type="text/javascript"><!--
> dojo.event.connect(window, 'onload', function(e) {
>
> dojo.event.connect(dojo.byId("$Body"),
> "onmouseover", function(e) {
> var
> content={beventname:"onmouseover"};
>
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"])
> content["beventtarget.id"]="$Body";
>
>
> tapestry.bind("/whiteboard/app?component=%24Body&page=Home&service=directevent",
> content);
> });
>
> dojo.event.connect(dojo.byId("myFavoriteDiv"),
> "onmouseover", function(e) {
> var
> content={beventname:"onmouseover"};
>
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"])
> content["beventtarget.id"]="myFavoriteDiv";
>
>
> tapestry.bind("/whiteboard/app?component=%24Body&page=Home&service=directevent",
> content);
> });
> });
> // --></script></body>
> </html>
> <!-- Render time: ~ 985 ms -->
> Home.java
> ---------------
> package whiteboard.pages;
> import org.apache.tapestry.annotations.EventListener;
> import org.apache.tapestry.event.BrowserEvent;
> import org.apache.tapestry.html.BasePage;
> public abstract class Home extends BasePage
> {
> @EventListener(elements = "myFavoriteDiv", events ="onMouseOver", async=true)
> public void watchText(BrowserEvent event)
> {
> System.out.println("User clicked on x/y coordinates" + event.getPageX() + "/" + event.getPageY());
> }
> }
> Home.html
> ----------------
> <html jwcid="@Shell" title="Whiteboard" ajaxEnabled="ognl:true">
> <body jwcid="@Body">
> <div id="myFavoriteDiv">
> Big brother is watching you ...
> </div>
> </body>
> </html>
> app.application
> ----------------
> <?xml version="1.0"?>
> <!DOCTYPE application PUBLIC
> "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd">
>
> <application>
> <meta key="org.apache.tapestry.page-class-packages" value="whiteboard.pages"/>
> </application>
> web.xml
> ----------------
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> <display-name>Whiteboard</display-name>
>
> <servlet>
> <servlet-name>app</servlet-name>
>
> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
> <load-on-startup>0</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>app</servlet-name>
> <url-pattern>/app</url-pattern>
> </servlet-mapping>
> </web-app>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org