Nested Iterate Tag and indexId problem
I figured out the problem. This will not work even though the rtexprvalue is set to true in the tld. nested:text onchange=function('1','2','%=variable%') / However, this will work... % String onchangeCall = function('1','2',' + variable + '); % nested:text onchange=%=onchangeCall% / I can't use a scriptlet for just a portion of the assignment. It has to be all or nothing. In the first version it just treats everything as a string. In the second version it evaluates the runtime expression.
Re: Nested Iterate Tag and indexId problem
On an interesting note, we had to do alot of this as well where the variable came from another tag(s). I stumbled across this: I found it a bit cleaner bean:define id=onchangeCall function('1','2','nested:write property =someProp/')/bean:define nested:text onchange=%=onchangeCall% / *** Though I could not do the same thing with nested:define [EMAIL PROTECTED] on 11/26/2002 06:30:11 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:Nested Iterate Tag and indexId problem I figured out the problem. This will not work even though the rtexprvalue is set to true in the tld. nested:text onchange=function('1','2','%=variable%') / However, this will work... % String onchangeCall = function('1','2',' + variable + '); % nested:text onchange=%=onchangeCall% / I can't use a scriptlet for just a portion of the assignment. It has to be all or nothing. In the first version it just treats everything as a string. In the second version it evaluates the runtime expression. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Nested Iterate Tag and indexId problem
I am using the nested tags with Struts 1.02. I want to be able to dynamically set a call to a javascript function. I want to pass in the row number to the function. I currently have nested:iterate property=asrTranList type=abbott.ai.tcgm.entities.AsrTran indexId=idx tr td class=maintCenter nested:text property=actionCode maxlength=1 size=1 styleClass=maintWidth1 onchange=makeEditDirty('hideOnEdit','showOnEdit','bean:write name=idx scope=page /'); onkeyup=return autoTab(this, 1, event); / /td /tr /nested:iterate This does not work. I have also tried nested:iterate property=asrTranList type=abbott.ai.tcgm.entities.AsrTran indexId=idx tr td class=maintCenter nested:text property=actionCode maxlength=1 size=1 styleClass=maintWidth1 onchange=makeEditDirty('hideOnEdit','showOnEdit','%=idx%'); onkeyup=return autoTab(this, 1, event); / /td /tr /nested:iterate It does not work either. It is looking to me like a bug with the nested tags. They sure have been very useful. I would hate to change all the code back at this point. Why can I use a regular jsp %=idx% to get the value of the indexId from the iterate tag? Thanks.
Re: Nested Iterate Tag and indexId problem
Perhaps I made a mistake, but nested tags are available since Struts 1.1: I think they are not available on Struts 1.02. Best regards Patrice - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, November 25, 2002 6:33 PM Subject: Nested Iterate Tag and indexId problem I am using the nested tags with Struts 1.02. I want to be able to dynamically set a call to a javascript function. I want to pass in the row number to the function. I currently have nested:iterate property=asrTranList type=abbott.ai.tcgm.entities.AsrTran indexId=idx tr td class=maintCenter nested:text property=actionCode maxlength=1 size=1 styleClass=maintWidth1 onchange=makeEditDirty('hideOnEdit','showOnEdit','bean:write name=idx scope=page /'); onkeyup=return autoTab(this, 1, event); / /td /tr /nested:iterate This does not work. I have also tried nested:iterate property=asrTranList type=abbott.ai.tcgm.entities.AsrTran indexId=idx tr td class=maintCenter nested:text property=actionCode maxlength=1 size=1 styleClass=maintWidth1 onchange=makeEditDirty('hideOnEdit','showOnEdit','%=idx%'); onkeyup=return autoTab(this, 1, event); / /td /tr /nested:iterate It does not work either. It is looking to me like a bug with the nested tags. They sure have been very useful. I would hate to change all the code back at this point. Why can I use a regular jsp %=idx% to get the value of the indexId from the iterate tag? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Nested Iterate Tag and indexId problem
Nested tags were available as a separate download prior to 1.1. I have been using them quite succesfully up until now. What I really need to do is this I have several rows of data which are editable in individual text boxes. For each row I have a checkbox. When the user makes a change in any of the rows I need to set the check box to selected. The probblem is that I am unable to get the nested:text onchange event to evaluate a run time expression. It just dumps my code out as it. So this... nested:text onchange=makeEditDirty('a','b','%=variable%'); / results in html something like this... input type=text onchange=makeEditDirty('a','b','%=variable%'); / instead of onchange=makeEditDirty('a','b','0'); / I need to be able to pass in the row number to this script method. Regards. David
Re: Nested Iterate Tag and indexId problem
I don't know nested tags on version 1.02 of Struts, and perhaps it's a stupid question, but are you sure that it is possible to use scriplet values on the onchange parameter of the tag: is rtexprvalue set to true for this attribute, on the .tld file of the taglib ? Patrice - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 25, 2002 9:11 PM Subject: Nested Iterate Tag and indexId problem Nested tags were available as a separate download prior to 1.1. I have been using them quite succesfully up until now. What I really need to do is this I have several rows of data which are editable in individual text boxes. For each row I have a checkbox. When the user makes a change in any of the rows I need to set the check box to selected. The probblem is that I am unable to get the nested:text onchange event to evaluate a run time expression. It just dumps my code out as it. So this... nested:text onchange=makeEditDirty('a','b','%=variable%'); / results in html something like this... input type=text onchange=makeEditDirty('a','b','%=variable%'); / instead of onchange=makeEditDirty('a','b','0'); / I need to be able to pass in the row number to this script method. Regards. David -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Nested Iterate Tag and indexId problem
I would try changing nested:text onchange=makeEditDirty('a','b','%=variable%'); / to nested:text onchange='%=makeEditDirty('a','b',' + variable + ');%' / Of course if 'variable' is a property of the object in the current iteration, you'd change it to nested:text onchange='%=makeEditDirty('a','b',' + x.getVariable() + ');%' / where 'x' is the value of the 'id' attribute of your nested:iterate. Sri -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 3:12 PM To: [EMAIL PROTECTED] Subject: Nested Iterate Tag and indexId problem Nested tags were available as a separate download prior to 1.1. I have been using them quite succesfully up until now. What I really need to do is this I have several rows of data which are editable in individual text boxes. For each row I have a checkbox. When the user makes a change in any of the rows I need to set the check box to selected. The probblem is that I am unable to get the nested:text onchange event to evaluate a run time expression. It just dumps my code out as it. So this... nested:text onchange=makeEditDirty('a','b','%=variable%'); / results in html something like this... input type=text onchange=makeEditDirty('a','b','%=variable%'); / instead of onchange=makeEditDirty('a','b','0'); / I need to be able to pass in the row number to this script method. Regards. David -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]