struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fzli...@omnytex.com
Subject Re: bean:write filter question
Date Wed, 22 Dec 2004 20:28:40 GMT
You DID put me on to one answer though... I can pass this.innerText, that works.  I'd still
like to know what the nodeValue was though, I've never seen that...

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, December 22, 2004 3:25 pm, fzlists@omnytex.com said:
> Hmm, gotta admit you lost me Jeff... is nodeValue a property of an anchor
> tag?  I don't see it in my references...
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Wed, December 22, 2004 3:16 pm, Jeff Beal said:
>> How about:
>>
>> <a onClick="openFolder(this.nodeValue)"><bean:write name="listItem"
>> property="path" /></a>
>>
>> This gets around the problem of <bean:write/> not escaping the
>> back-slash altogether.
>>
>> -- Jeff
>>
>> fzlists@omnytex.com wrote:
>>> Hello all... I have a situation where I have to insert a path into a
>>> Javascript call, like so:
>>>
>>> <table>
>>>   <logic:iterate id="listItem" name="sidebarFolderViewActionForm"
>>> property="itemsList" type="java.io.File">
>>>   <tr>
>>>     <td>
>>>       <a onClick="openFolder("<bean:write name="listItem"
>>> property="path" />");">
>>>         <bean:write name="listItem" property="path" />
>>>       </a>
>>>       <br>
>>>     </td>
>>>   </tr>
>>> </logic:iterate>
>>> </table>
>>>
>>> Problem is, on Windows anyway, the path includes a backslash, so when
>>> rendered you get for example:
>>>
>>> <table>
>>>   <tr>
>>>     <td>
>>>       <a onClick="openFolder("A:\");">
>>>         A:\
>>>       </a>
>>>       <br>
>>>     </td>
>>>   </tr>
>>> </table>
>>>
>>> ...which of course is a script error because the backslash is escaping
>>> the quotation mark.
>>>
>>> So, how does one deal with this?  As I understant, filter="true" is the
>>> default setting for bean:write... I tried setting it explicitly, to no
>>> avail.
>>>
>>> Thanks!
>>>
>>> Frank W. Zammetti
>>> Chief Software Architect
>>> Omnytex Technologies
>>> http://www.omnytex.com
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message