Thursday Jun 28, 2007

I just happened to read Ed Burn's latest blog (actually that was written more than a month back.). He has given a brief overview on how JSF 2.0 is going to be structured.He talks about something called "Buy a feature" where customers will need to buy a feature that they want to use. For example, if the customer wants to get the facelets feature up and running for his JSF 2.0 application he would go and buy it giving a certain amount of money. The advantage, put in crude terms, would help us to know what kind of features customers prefer.
 

Sunday Jun 17, 2007

I came across this weird problem while working on a bug for the woodstock anchor component. The anchor component seems to work fine when created in a normal JSP page by specifying the <webuijsf:anchor /> custom JSP tag. But when the same anchor is used with VWP module, the anchor stops working. That is, if you had an anchor or an hyperlink at some place else in the page and wanted to navigate to the position of that page the anchor was positioned, then clicking on the anchor or hyperlink will not take you to that particular position in the page. The weird problem was that the same application worked with other browsers.

You can take a look at this bug at : woodstock issue 76. 

Well, the problem, after a bit of tweaking and turning around was found out that, the anchor does not work properly in "strict-rendering mode" when ALL the components in the page are absolutely positioned.
In some cases, removing the absolute positioning for a couple of components on the page does seem to help to solve the problem, but in most cases, it doesnt work properly.

 Here is an example you can actually cut and paste in an html file to see whether it works or not.

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body onunload="" onload="" style="" id="body1">
<form id="form1">
<a name="anchor1" style = "position: absolute; left: 120px; top: 72px">
Hai this is an anchor</a>
<input type="text" value="hello"
style = "position: absolute; left: 168px; top: 156px"/>
<input type="text" value="hello1"
style = "position: absolute; left: 268px; top: 256px"/>
<input type="text" value="hello2"
style = "position: absolute; left: 368px; top: 456px"/>
<input type="text" value="hello3"
style = "position: absolute; left: 468px; top: 556px"/>
<a href="#anchor1" style = "position: absolute; left: 468px; top: 756px">
Click on this
to go to the top anchor</a>
</form>
</body>
</html>


 A couple of work around do exist as explained in the bug explanation.

The first one is to make IE6 go into quirks mode. This can be done by adding this

<?xml version="1.0" encoding="UTF-8"?>

at the top of the page.

The other and the most obvious thing would be to remove absolute positioning

of the components on the page


 

 


Tuesday Jun 05, 2007

Exploring the netbeans 6.0 builds and what i liked about it.

[Read More]

Sunday May 06, 2007

Woodstock components are now starting to be rendered client side.
This blog contains a brief write up on how these components are being rendered
client side and what you can do with them.

[Read More]

Wednesday Apr 18, 2007

There is this very useful javascript function called stopPropagation that can be called on javascript events.This function called on the event object cancels the event if it is cancelable.

The mozilla developer site provides a very useful example.

This is kinda funky!


<html>
<head>
<title>preventDefault example</title>

<script type="text/javascript">

function stopDefAction(evt) {
evt.preventDefault();
}

</script>
</head>

<body>

<p>Please click on the checkbox control.</p>

<form>
<input type="checkbox" onclick="stopDefAction(event);"/>

<label for="checkbox">Checkbox</label>
</form>

</body>
</html>


I know this is not the only to stop event propagation. There are others such as stopPropagation and cancelBubble to prevent event bubbling. But this one was kind of new to me.

Named anchors have a problem in IE if the id and the attribute values provided for that anchor do not match.

[Read More]

Wednesday Feb 28, 2007

A step by step guide on how to get started with project woodstock.

[Read More]

This blog copyright 2009 by venky