Tapestry

Tapestry

View Answers

October 17, 2008 at 12:50 PM

Hi friend,


Code to help in solving the problem :

<a href="some-page" id="one">bring your mouse here</a>
<div dojoType="PostTooltip" style="display:none;"
dojo:connectId="one"
dojo:uniqId="two"
dojo:contentUrl="tooltip.php?id=two"
dojo:executeScripts="true"
>
<div id="two" style="background-color: white; border: 1px dashed #aaaaaa;">
this is a custom loading message.
</div>
</div>

----------------------------------------------
function updatePostTooltip(postUrl, uniqId) {
dojo.io.bind({
url: postUrl,
load: function(type, evalObject){
dojo.debug("data received from "+postUrl);
adjustPostTooltipDimensions(uniqId);
},
mimetype: "text/javascript"
});
}

function adjustPostTooltipDimensions(uniqId) {
var sHeight = document.getElementById(uniqId).scrollHeight;
var sWidth = document.getElementById(uniqId).scrollWidth;
var maxHeight = 450;
var maxWidth = 480;
dojo.debug("height and width are "+sHeight+" and "+sWidth+" for "+uniqId);
if (sHeight > maxHeight) {
dojo.debug("resizing to max height "+maxHeight);
document.getElementById(uniqId).style.height = maxHeight + "px";
document.getElementById(uniqId).style.overflow = "auto";
}
if (sWidth > maxWidth) {
dojo.debug("resizing to max width "+maxWidth);
document.getElementById(uniqId).style.width = maxWidth + "px";
document.getElementById(uniqId).style.overflow = "auto";
}
}

---------------------------------------------------------------

dojo.provide("my.widget.PostTooltip");
dojo.widget.manager.registerWidgetPackage("my.widget");

dojo.widget.defineWidget(
"my.widget.PostTooltip",
dojo.widget.html.Tooltip,
{
//we have added three new variables, uniqId, contentUrl and hasContents
uniqId: "",
contentUrl: "",
hasContents: 0,
//We modify this function from the original in dojo.widget.html.Tooltip
onShow: function() {
// copied as is from dojo/src/widget/html/Tooltip.js
dojo.widget.html.Tooltip.superclass.onShow.call(this);
this.state="displayed";
if(this.eraseScheduled){
this.hide();
this.eraseScheduled=false;
}
//end of copied code
//this is our code
if (this.hasContents == 0) {
updatePostTooltip(this.contentUrl, this.uniqId);
this.hasContents = 1;
}
}
}
);


Thanks









Related Tutorials/Questions & Answers:
Version of tapestry>tapestry dependency
List of Version of tapestry>tapestry dependency
Version of tapestry>tapestry-annotations dependency
List of Version of tapestry>tapestry-annotations dependency
Advertisements
Version of tapestry>tapestry-contrib dependency
List of Version of tapestry>tapestry-contrib dependency
Version of tapestry>tapestry-portlet dependency
List of Version of tapestry>tapestry-portlet dependency
Artifacts of tapestry
List of Artifacts of tapestry maven depenency
Maven Repository/Dependency: tapestry | tapestry
Maven Repository/Dependency of Group ID tapestry and Artifact ID tapestry. Latest version of tapestry:tapestry dependencies. # Version Release Date 1 4.0.2 13 Apr 2006
Tapestry - Struts
Tapestry   I want to use Tooltip in my project, in which i m using Tapestry4.1 as frontend, could anyone guide me, is der any inbuild tapestry tooltipcomponent or how can i put tooltip using tapestry in my project.... pls
ModuleNotFoundError: No module named 'tapestry'
ModuleNotFoundError: No module named 'tapestry'  Hi, My Python... 'tapestry' How to remove the ModuleNotFoundError: No module named 'tapestry... to install padas library. You can install tapestry python with following
Version of xdoclet-plugin-tapestry>xdoclet-plugin-tapestry dependency
List of Version of xdoclet-plugin-tapestry>xdoclet-plugin-tapestry dependency
Version of tapestry>net.sf.tapestry dependency
Version of tapestry>net.sf.tapestry.contrib dependency
Version of tapestry>vlibbeans dependency
Maven Dependency tapestry >> 3.0.1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0.1 in your project
Maven Dependency tapestry >> 3.0-beta-1a
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0-beta-1a in your project
Maven Dependency tapestry >> 4.0
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0 in your project
Maven Dependency tapestry >> 4.0-alpha-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-alpha-2 in your project
Maven Dependency tapestry >> 4.0-beta-10
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-10 in your project
Maven Dependency tapestry >> 4.0-beta-13
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-13 in your project
Maven Dependency tapestry >> 4.0-beta-4
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-4 in your project
Maven Dependency tapestry >> 4.0-beta-7
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-7 in your project
Maven Dependency tapestry >> 4.0-rc-1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-rc-1 in your project
Maven Dependency tapestry >> 3.0
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0 in your project
Maven Dependency tapestry >> 3.0.2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0.2 in your project
Maven Dependency tapestry >> 3.0.3
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0.3 in your project
Maven Dependency tapestry >> 3.0-beta-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.0-beta-2 in your project
Maven Dependency tapestry >> 3.1-alpha-1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version3.1-alpha-1 in your project
Maven Dependency tapestry >> 4.0.1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0.1 in your project
Maven Dependency tapestry >> 4.0.2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0.2 in your project
Maven Dependency tapestry >> 4.0-alpha-3
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-alpha-3 in your project
Maven Dependency tapestry >> 4.0-beta-1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-1 in your project
Maven Dependency tapestry >> 4.0-beta-11
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-11 in your project
Maven Dependency tapestry >> 4.0-beta-12
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-12 in your project
Maven Dependency tapestry >> 4.0-beta-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-2 in your project
Maven Dependency tapestry >> 4.0-beta-3
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-3 in your project
Maven Dependency tapestry >> 4.0-beta-5
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-5 in your project
Maven Dependency tapestry >> 4.0-beta-6
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-6 in your project
Maven Dependency tapestry >> 4.0-beta-8
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-8 in your project
Maven Dependency tapestry >> 4.0-beta-9
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-beta-9 in your project
Maven Dependency tapestry >> 4.0-rc-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-rc-2 in your project
Maven Dependency tapestry >> 4.0-rc-3
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry version4.0-rc-3 in your project
Maven Repository/Dependency: tapestry | tapestry-portlet
Maven Repository/Dependency of Group ID tapestry and Artifact ID tapestry-portlet. Latest version of tapestry:tapestry-portlet dependencies. # Version Release Date 1
Maven Repository/Dependency: tapestry | tapestry-annotations
Maven Repository/Dependency of Group ID tapestry and Artifact ID tapestry-annotations. Latest version of tapestry:tapestry-annotations dependencies. # Version Release Date 1
Maven Repository/Dependency: tapestry | tapestry-contrib
Maven Repository/Dependency of Group ID tapestry and Artifact ID tapestry-contrib. Latest version of tapestry:tapestry-contrib dependencies. # Version Release Date 1
Artifacts of xdoclet-plugin-tapestry
List of Artifacts of xdoclet-plugin-tapestry maven depenency
Maven Dependency tapestry-annotations >> 4.0.1
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0.1 in your project
Maven Dependency tapestry-annotations >> 4.0-beta-11
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0-beta-11 in your project
Maven Dependency tapestry-annotations >> 4.0-beta-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0-beta-2 in your project
Maven Dependency tapestry-annotations >> 4.0-beta-5
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0-beta-5 in your project
Maven Dependency tapestry-annotations >> 4.0-beta-8
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0-beta-8 in your project
Maven Dependency tapestry-annotations >> 4.0-rc-2
You should include the dependency code given in this page to add Maven Dependency of tapestry >> tapestry-annotations version4.0-rc-2 in your project

Ads