You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Luca Conte <lu...@tinet.it> on 2007/07/04 09:18:49 UTC

Dojo scheduler news

Hi Jurgen,
here (rename by removing  the zip extension after dload):
http://bazu.altervista.org/dojoscheduler.war.zip

The new version of Dojo scheduler with resize entries improvement: now 
in "day" and in "woking week" mode you can resize an entry firing a 
server side event at the end of resize operation. To test it you can go 
with the mouse near to the  entry's bottom edge (Only an entry with the 
end timestamp into the day).

Some considerations:
1- In order to handle the resize event, I re-used mouse listener  
(already present) but I added to it 2 new properties: the entry risized 
and the new "end timestamp"
2- Now the scheduler component uses dojo (scripts and resources) 
provided by the Tomahawk extension filter so the dojoTests.jsp actually 
have no scripts inside. I left into the the webapp root the dojo 
subfolder but it is not used,  you can remove it if you wish.
3- For making the point 2, now in day and in working week mode,  I 
obtain, only in IE, a "Connection reset by peer: socket write error" 
exception similar to to this issue: 
https://issues.apache.org/jira/browse/TOMAHAWK-828 but everythings works 
fine! To bypass this problem the only way is to use dojo's script 
provided by yorurself and commenting the code's rows into the 
AbstractSchedulerRenderer in which the dojo initializtion is executed 
(DojoUtils.DojoUtils.addMainInclude(context, component, javascriptLocation,
     DojoUtils.getDjConfigInstance(context)); and the following row)

My work to component in terms of improvements should stops here! Now I 
would like to resolve related (potentially) bugs or spend time to add 
some users wanted functionallities!

To dev-list: Plz send me comments and/or suggestions

Bye
Luca

-- 
Luca Conte
IT Solutions
luca.conte@tinet.it  
 
Sinesy srl - Gruppo Tecnoinformatica
Via Comunale di Camino, 22/D - 31046 Oderzo (TV)
www.tinet.it 

Servizio Clienti:
Tel. 199.117701 - Fax 0422.814481



Re: Dojo scheduler news

Posted by Luca Conte <lu...@tinet.it>.
Werner Punz ha scritto:
> Not good, can you encapsule the problem down to a single require so that
> I can check the affected files for a typo which has introduced the problem?
>
>   

The code that introduce the problem is the following one:

<script type="text/javascript"><!--
dojo.widget.defineWidget("dojo.widget.TomahawkShedulerResizeHandle",  dojo.widget.ResizeHandle, {formId:"_idJsp0",scheduleId:"_idJsp0:schedule1", targetElmId:"",  templateCssString:".dojoHtmlResizeHandle {margin-left: auto;margin-right: auto;left: 0px;float: none; border-width: 0px;   border-style: none; border-color: black; border-right: 0px;position: absolute;bottom: 1px;width: 100%;height: 5px;z-index: 20;cursor: n-resize;background-image: url();line-height: 6px;}", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ResizeHandle.css"),  postCreate:function () {      dojo.event.connect(this.domNode, "onmousedown", this, "_beginSizing"); /*this.domNode.style.right=(this.domNode.parentNode.clientWidth/2)+"px";*/ }, _changeSizing:function (e) {   try {  if (!e.clientX || !e.clientY) {     return;  }  }     catch (e) {  return;  }  var dx = 0;  var dy = this.startPoint.y - e.clientY;  var newW = this.startSize.w - dx;  var newH = this.startSize.h - dy;  if (this.minSize) {  var mb = dojo.html.getMarginBox(this.targetDomNode);  if (newW < this.minSize.w) {  newW = mb.width;   } if (newH < this.minSize.h) {  newH = mb.height; }  }    if (this.targetWidget) {  this.targetWidget.resizeTo(newW, newH);  } else { dojo.html.setMarginBox(this.targetDomNode, {width:newW, height:newH});  } e.preventDefault();  }, _endSizing:function (e) {  dojo.widget.ResizeHandle.prototype._endSizing.apply(this, arguments);   var actualSize=dojo.byId(this.targetElmId).style.height;   actualSize=actualSize.split('px')[0];    if(actualSize<30){dojo.byId(this.targetElmId).style.height=originalSize+'px'; return false; }       fireResizeEvent(this.targetElmId,  actualSize, this.formId, this.scheduleId);    }});
//--></script>

...so I think the problem should be into dojo.widget.ResizeHandle  
introduced programmatically here:  DojoUtils.addRequire(context, 
component, new String[]{"dojo.dnd.*","dojo.event.*", 
"dojo.widget.ResizeHandle"});

In the log i read "GRAVE: Error while serving resource: 
dojo.DojoResourceLoader/src/widget/templates/images/tab_close.gif, 
message : null"

I'll remain tuned on this problem (plz let me know the progress)!





-- 
Luca Conte
IT Solutions
luca.conte@tinet.it  
 
Sinesy srl - Gruppo Tecnoinformatica
Via Comunale di Camino, 22/D - 31046 Oderzo (TV)
www.tinet.it 

Servizio Clienti:
Tel. 199.117701 - Fax 0422.814481




Re: Dojo scheduler news

Posted by Werner Punz <we...@gmail.com>.
Luca Conte schrieb:
> Werner Punz ha scritto:
>>
>> Luca, following, this issue in IE is not really a bug, in case of the
>> Tomahawk issue it was a bug due to a typo,
>> anyway this issue is caused by a broken encoding handling in IE which
>> makes ie go haywire. Make sure that all the files you stream dont have
>> any weird characters above ascii 128 otherwise if you start to stream
>> encoded javascript and run into a character which has a weird non
>> conform encoding you might run into this issue on IE.
>>
> I'll check it,  but a lot of Javascript Code is taken from dojo
> resources incapsulated into tomahawk distro. I think that the problem is
> nested into the thomahawk's dojo scripts, infact if i use my dojo distro
> put into my document root, cutting off the extetsion filter incuding
> process,  I don't see this problem!
> 
Not good, can you encapsule the problem down to a single require so that
I can check the affected files for a typo which has introduced the problem?



Re: Dojo scheduler news

Posted by Luca Conte <lu...@tinet.it>.
Werner Punz ha scritto:
>
> Luca, following, this issue in IE is not really a bug, in case of the 
> Tomahawk issue it was a bug due to a typo,
> anyway this issue is caused by a broken encoding handling in IE which 
> makes ie go haywire. Make sure that all the files you stream dont have 
> any weird characters above ascii 128 otherwise if you start to stream 
> encoded javascript and run into a character which has a weird non 
> conform encoding you might run into this issue on IE.
>
I'll check it,  but a lot of Javascript Code is taken from dojo 
resources incapsulated into tomahawk distro. I think that the problem is 
nested into the thomahawk's dojo scripts, infact if i use my dojo distro 
put into my document root, cutting off the extetsion filter incuding 
process,  I don't see this problem!








-- 
Luca Conte
IT Solutions
luca.conte@tinet.it  
 
Sinesy srl - Gruppo Tecnoinformatica
Via Comunale di Camino, 22/D - 31046 Oderzo (TV)
www.tinet.it 

Servizio Clienti:
Tel. 199.117701 - Fax 0422.814481



Re: Dojo scheduler news

Posted by Werner Punz <we...@gmail.com>.
Luca Conte schrieb:
> Hi Jurgen,
> here (rename by removing  the zip extension after dload):
> http://bazu.altervista.org/dojoscheduler.war.zip
> 
> The new version of Dojo scheduler with resize entries improvement: now 
> in "day" and in "woking week" mode you can resize an entry firing a 
> server side event at the end of resize operation. To test it you can go 
> with the mouse near to the  entry's bottom edge (Only an entry with the 
> end timestamp into the day).
> 
> Some considerations:
> 1- In order to handle the resize event, I re-used mouse listener  
> (already present) but I added to it 2 new properties: the entry risized 
> and the new "end timestamp"
> 2- Now the scheduler component uses dojo (scripts and resources) 
> provided by the Tomahawk extension filter so the dojoTests.jsp actually 
> have no scripts inside. I left into the the webapp root the dojo 
> subfolder but it is not used,  you can remove it if you wish.
> 3- For making the point 2, now in day and in working week mode,  I 
> obtain, only in IE, a "Connection reset by peer: socket write error" 
> exception similar to to this issue: 
> https://issues.apache.org/jira/browse/TOMAHAWK-828 but everythings works 
> fine! To bypass this problem the only way is to use dojo's script 
> provided by yorurself and commenting the code's rows into the 
> AbstractSchedulerRenderer in which the dojo initializtion is executed 
> (DojoUtils.DojoUtils.addMainInclude(context, component, javascriptLocation,
>     DojoUtils.getDjConfigInstance(context)); and the following row)
> 
> My work to component in terms of improvements should stops here! Now I 
> would like to resolve related (potentially) bugs or spend time to add 
> some users wanted functionallities!
> 
> To dev-list: Plz send me comments and/or suggestions
> 
> Bye
> Luca
> 

Luca, following, this issue in IE is not really a bug, in case of the 
Tomahawk issue it was a bug due to a typo,
anyway this issue is caused by a broken encoding handling in IE which 
makes ie go haywire. Make sure that all the files you stream dont have 
any weird characters above ascii 128 otherwise if you start to stream 
encoded javascript and run into a character which has a weird non 
conform encoding you might run into this issue on IE.

This is it as far as I can remember (Mario did some debugging when I 
reported the bug)