TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
Hello, this is a known problem, but we don't have a solution yet. The main idea of Tobago is that the source code (especially the JSP pages) are independent from the output format (e.g. HTML). If we allow to set onchange and onclick events, the source code will depend on the output format. One solution might be to use an abstract scripting language, which can be translated into different output formats. But there is no decision yet. Do you have a concrete problem? Maybe I can help you? Regards, Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
Hmmm Thing is that for XML based languages, JavaScript has become something like a scripting standard. regards, Martin On 10/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Hello, this is a known problem, but we don't have a solution yet. The main idea of Tobago is that the source code (especially the JSP pages) are independent from the output format (e.g. HTML). If we allow to set onchange and onclick events, the source code will depend on the output format. One solution might be to use an abstract scripting language, which can be translated into different output formats. But there is no decision yet. Do you have a concrete problem? Maybe I can help you? Regards, Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
P.S.: a solution would be to have a second set of components for HTML based interfaces only? regards, Martin On 10/6/05, Martin Marinschek [EMAIL PROTECTED] wrote: Hmmm Thing is that for XML based languages, JavaScript has become something like a scripting standard. regards, Martin On 10/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Hello, this is a known problem, but we don't have a solution yet. The main idea of Tobago is that the source code (especially the JSP pages) are independent from the output format (e.g. HTML). If we allow to set onchange and onclick events, the source code will depend on the output format. One solution might be to use an abstract scripting language, which can be translated into different output formats. But there is no decision yet. Do you have a concrete problem? Maybe I can help you? Regards, Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
A workaround is to put something like this on the page (inside the t:page). t:script onload=initOnChange(); function initOnChange() { var x = document.getElementById(page:username); x.onchange = onChangeFunction; } function onChangeFunction() { alert('username changed'); } /t:script Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
True, most of the output formats for Tobago which come to my mind have an XML based syntax, therefore you have a DOM and it's pretty easy to define a JavaScript binding for this DOM. If I take SVG (I always wanted a SVG renderer for Tobago ;-) as an example the standard scripting language is JavaScript. The question is if scripts written for the HTML DOM will work on the SVG DOM as well. I'm still hoping that most of the common problems where you normally resort to scripting can be solved in Tobago directly in an abstract way. There are other output media, where the standard scripting language is not JavaScript. For example, I took a look at ActionScript for Flash, which reminds me more of BASIC... but I never really worked with Flash, so I might be wrong here. Since Tobago currently doesn't support any other output medium in a complete manor, perhaps we should support more JavaScript events than we currently do. Actually I consider the supported JavaScript event handlers more or less as hacks and I would like to get rid of them. I have some bad memories regarding JavaScript in a taglib similiar to Tobago... Regards, Arvid Martin Marinschek wrote: Hmmm Thing is that for XML based languages, JavaScript has become something like a scripting standard. regards, Martin On 10/6/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: Hello, this is a known problem, but we don't have a solution yet. The main idea of Tobago is that the source code (especially the JSP pages) are independent from the output format (e.g. HTML). If we allow to set onchange and onclick events, the source code will depend on the output format. One solution might be to use an abstract scripting language, which can be translated into different output formats. But there is no decision yet. Do you have a concrete problem? Maybe I can help you? Regards, Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German