RE: Output variables in Tapestry Script - 4.1.3
corrected syntax... forgot form name The alert works... alert(document.forms.galleryForm.tableSizeSelect.value); The assignment does not. ${theWidget.tableSize} = document.forms.tableSizeSelect.value; This is what the assignment parses to... 2 = document.forms.galleryForm.tableSizeSelect.value; QUESTION: How do I dereference the property tableSize to the address for assignment. Thank YouBest regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 10:05:14 -0400 more clarification... alert(document.forms.tableSizeSelect.value);${theWidget.tableSize} = document.forms.tableSizeSelect.value; why is the above assignment not possible? Inside the widget I have tableSize declared as a Parameter.This poses a dereferencing dilemma as ${theWidget.tableSize} seems to not be the way to dereference a property on a component. Can someone elaborate on the proper way? Does it need to be binded to a dom element? If so please elaborate.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:56:30 -0400 Someruntime output...document.forms[0] document.forms[0].id ${theWidget.tableWidth} ${theWidget.tableSize} ${theWidget}this alert(${galleryForm}); alert(${galleryFormId}); alert('${theWidget.clientId}'); alert('${theWidget}'); alert('${tWidget}'); alert('${tableSize}');transates to alert(document.forms[0]); alert(document.forms[0].id); alert('galleryWidget'); alert('[EMAIL PROTECTED]/galleryWidget]'); alert('[EMAIL PROTECTED]/galleryWidget]'); alert(2_0); what is 2_0 ? How do we get to the tableSize value to the property of the component?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:48:29 -0400 Attached is the modules in question... My tableSize parameter is specified in Home.html along with the component. I am able to dereference the form and get/set the value of the select component. I guess I want to get the value of the select and assign it to the ognl property of my component. I need to do the same onChange. Your feedback is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:23:40 -0400 correction...>BUT document.forms.${myFormName} produces undefined at the above works... But if I have a DIV or SPAN above in a containing html file I am unable to assign a name to it or dereference it in the document object. clarification on how to dereference and assign output data to these is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
RE: Output variables in Tapestry Script - 4.1.3
Attached is the modules in question... My tableSize parameter is specified in Home.html along with the component. I am able to dereference the form and get/set the value of the select component. I guess I want to get the value of the select and assign it to the ognl property of my component. I need to do the same onChange. Your feedback is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:23:40 -0400 correction...>BUT document.forms.${myFormName} produces undefined at the above works... But if I have a DIV or SPAN above in a containing html file I am unable to assign a name to it or dereference it in the document object. clarification on how to dereference and assign output data to these is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033 http://jakarta.apache.org/tapestry/dtd/Script_4_0.dtd";>document.forms[0] document.forms[0].id inlineBox inlineNumColumns ${theWidget.tableWidth} ${theWidget.tableSize} ${theWidget} dojo.require("tapestry.widget.Widget"); dojo.require("dojo.widget.*"); dojo.require("dojo.html.*"); function initGallery() { debugger; alert(${thisObject}); alert(${galleryForm}); alert(${galleryFormId}); alert("${theWidget.clientId}"); alert("${theWidget}"); alert("${tWidget}"); var imageWidth = 160; var ${box} = dojo.widget.byId("${theWidget.clientId}"); var componentObjectCB = dojo.html.getContentBox(${galleryForm}); ${numColumns} = Math.floor(componentObjectCB.width / imageWidth); alert("componentObjectCB.width == " + componentObjectCB.width); alert("componentObjectCB.height == " + componentObjectCB.height); alert("numColumns == " + ${numColumns}); }initGallery(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Output variables in Tapestry Script - 4.1.3
more clarification... alert(document.forms.tableSizeSelect.value); ${theWidget.tableSize} = document.forms.tableSizeSelect.value; why is the above assignment not possible? Inside the widget I have tableSize declared as a Parameter. This poses a dereferencing dilemma as ${theWidget.tableSize} seems to not be the way to dereference a property on a component. Can someone elaborate on the proper way? Does it need to be binded to a dom element? If so please elaborate. Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:56:30 -0400 Someruntime output...document.forms[0] document.forms[0].id ${theWidget.tableWidth} ${theWidget.tableSize} ${theWidget}this alert(${galleryForm}); alert(${galleryFormId}); alert('${theWidget.clientId}'); alert('${theWidget}'); alert('${tWidget}'); alert('${tableSize}');transates to alert(document.forms[0]); alert(document.forms[0].id); alert('galleryWidget'); alert('[EMAIL PROTECTED]/galleryWidget]'); alert('[EMAIL PROTECTED]/galleryWidget]'); alert(2_0); what is 2_0 ? How do we get to the tableSize value to the property of the component?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:48:29 -0400 Attached is the modules in question... My tableSize parameter is specified in Home.html along with the component. I am able to dereference the form and get/set the value of the select component. I guess I want to get the value of the select and assign it to the ognl property of my component. I need to do the same onChange. Your feedback is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:23:40 -0400 correction...>BUT document.forms.${myFormName} produces undefined at the above works... But if I have a DIV or SPAN above in a containing html file I am unable to assign a name to it or dereference it in the document object. clarification on how to dereference and assign output data to these is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnewspackage org.trails.demo.components; import java.util.Collection; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tapestry.IAsset; import org.apache.tapestry.IPage; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.IScript; import org.apache.tapestry.annotations.ComponentClass; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.InjectScript; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.form.IPropertySelectionModel; import org.apache.tapestry.form.StringPropertySelectionModel; import org.hibernate.criterion.DetachedCriteria; import org.springframework.dao.DataAccessException; import org.trails.component.TrailsComponent; import org.trails.component.blob.BlobDownloadService; import org.trails.component.blob.TrailsBlobAsset; import org.trails.demo.Listing; import org.trails.descriptor.DescriptorService; import org.trails.page.EditPage; import org.trails.persistence.HibernatePersistenceService; /** * This guy (tapestry/dojo/json/script oriented widget) renders a gallery. * * Script is facilitated to operate/persist auto-paging. * * @author kenneth.colassi [EMAIL PROTECTED] * */ @ComponentClass(allowBody = true, allowInformalParameters = true) public abstract class Gallery extends TrailsComponent { private static final Log LOG = LogFactory.getLog(Gallery.class); private static final String[] tableSizeOptions = new String[] { new Integer("1").toString(), new Integer("2").toString(), new Integer("3").toString(), new Integer("4").toString(), new Integer("5").toString(), new Integer("10").toString(), new Integer("25").toString(), new Integer("50").toString(), new Integer("100").toString(), new Integer("500").toString(), new Integer("1000").toString(), new Integer("2500").toString(), new Integer("5000").toString(), new Integer("1").toString(), new Integer("25000").toString(), new Integer("5").toString() }; private static final String[] pagingSpanOptions = new String[] { new Integer("5").toString(), new Integer("10").toString(), new Integer("15").toString(),
RE: Output variables in Tapestry Script - 4.1.3
Someruntime output... document.forms[0] document.forms[0].id ${theWidget.tableWidth} ${theWidget.tableSize} ${theWidget} this alert(${galleryForm}); alert(${galleryFormId}); alert("${theWidget.clientId}"); alert("${theWidget}"); alert("${tWidget}"); alert("${tableSize}");transates to alert(document.forms[0]); alert(document.forms[0].id); alert("galleryWidget"); alert("[EMAIL PROTECTED]/galleryWidget]"); alert("[EMAIL PROTECTED]/galleryWidget]"); alert(2_0); what is 2_0 ? How do we get to the tableSize value to the property of the component?Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:48:29 -0400 Attached is the modules in question... My tableSize parameter is specified in Home.html along with the component. I am able to dereference the form and get/set the value of the select component. I guess I want to get the value of the select and assign it to the ognl property of my component. I need to do the same onChange. Your feedback is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:23:40 -0400 correction...>BUT document.forms.${myFormName} produces undefined at the above works... But if I have a DIV or SPAN above in a containing html file I am unable to assign a name to it or dereference it in the document object. clarification on how to dereference and assign output data to these is appreciated.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
RE: Output variables in Tapestry Script - 4.1.3
correction... >BUT document.forms.${myFormName} produces undefined at the above works... But if I have a DIV or SPAN above in a containing html file I am unable to assign a name to it or dereference it in the document object. clarification on how to dereference and assign output data to these is appreciated. Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
RE: Output variables in Tapestry Script - 4.1.3
I have read over and over these docs... http://tapestry.apache.org/tapestry4.1/ajax/basics.html http://tapestry.apache.org/tapestry4.1/components/general/script.html http://tapestry.apache.org/tapestry4.1/faq.html#script-component Including Kent Tongs doc on scripting which is solely focused on form. My code operates outside of a form and dereferencing elements from "document." just does not work.Best regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Output variables in Tapestry Script - 4.1.3Date: Thu, 1 Nov 2007 09:11:58 -0400 Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct
Output variables in Tapestry Script - 4.1.3
Folks, I am using simple div/span... no form. When I attempt to index an element is showing undefined. 1. document.forms[0] produces my form alright and it has a name BUT document.forms.${myFormName} produces undefined at runtime ? Why the lapse ? myFormname equates to the actual form name EVEN this fails... document.forms['${myFormName}'] as undefined 2. Assignment to http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us