Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30274 > unrolled thread
| Started by | ricardo.cotia@gmail.com |
|---|---|
| First post | 2014-11-04 03:52 -0800 |
| Last post | 2014-11-04 10:48 -0500 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
Can't concatenate Javascript and Struts tag ricardo.cotia@gmail.com - 2014-11-04 03:52 -0800
Re: Can't concatenate Javascript and Struts tag FredK <fred.l.kleinschmidt@gmail.com> - 2014-11-04 07:25 -0800
Re: Can't concatenate Javascript and Struts tag Arne Vajhøj <arne@vajhoej.dk> - 2014-11-04 10:48 -0500
| From | ricardo.cotia@gmail.com |
|---|---|
| Date | 2014-11-04 03:52 -0800 |
| Subject | Can't concatenate Javascript and Struts tag |
| Message-ID | <7264d747-e211-491f-9b13-cfbc4e603420@googlegroups.com> |
I'm trying to create invisible divs with jQuery which in title will be populated dinamically by an struts tag, but its giving me invalid indexed property error:
Invalid indexed property 'niveisRisco['+<%=ctr%>+']
Heres the code i'm using:
$(function(){
var mapaAplicacaoJs = $('#MapaAplicacao area');
var mapaPerfilJs = $('#MapaPerfil area');
<logic:present name="carteiraSelecionada">
<logic:iterate name="carteiraSelecionada" property="carteiraAtual.niveisRisco" id="foo" indexId="ctr">
mapaAplicacaoJs.each(function() {
mapaAplicacaoJs.before('<div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco['+<%=ctr%>+'].getDescricao" />"></div>');
</logic:iterate>
</logic:present>
});
If i hardcode <div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco[0].getDescricao it works.
Can anyone tell me whats wrong with my concatenation?
Thanks
[toc] | [next] | [standalone]
| From | FredK <fred.l.kleinschmidt@gmail.com> |
|---|---|
| Date | 2014-11-04 07:25 -0800 |
| Message-ID | <3368b77a-72f0-4094-8c48-22e373118191@googlegroups.com> |
| In reply to | #30274 |
On Tuesday, November 4, 2014 3:52:59 AM UTC-8, ricard...@gmail.com wrote:
> I'm trying to create invisible divs with jQuery which in title will be populated dinamically by an struts tag, but its giving me invalid indexed property error:
>
> Invalid indexed property 'niveisRisco['+<%=ctr%>+']
>
> Heres the code i'm using:
>
> $(function(){
> var mapaAplicacaoJs = $('#MapaAplicacao area');
> var mapaPerfilJs = $('#MapaPerfil area');
>
> <logic:present name="carteiraSelecionada">
> <logic:iterate name="carteiraSelecionada" property="carteiraAtual.niveisRisco" id="foo" indexId="ctr">
> mapaAplicacaoJs.each(function() {
> mapaAplicacaoJs.before('<div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco['+<%=ctr%>+'].getDescricao" />"></div>');
> </logic:iterate>
> </logic:present>
> });
>
> If i hardcode <div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco[0].getDescricao it works.
>
> Can anyone tell me whats wrong with my concatenation?
>
> Thanks
This is a newsgroup for Jave, not Javascript. They are not the same.
You will get better answers if you post to a javascript newsgroup.
--
Fred K
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2014-11-04 10:48 -0500 |
| Message-ID | <5458f53d$0$297$14726298@news.sunsite.dk> |
| In reply to | #30275 |
On 11/4/2014 10:25 AM, FredK wrote:
> On Tuesday, November 4, 2014 3:52:59 AM UTC-8, ricard...@gmail.com wrote:
>> I'm trying to create invisible divs with jQuery which in title will be populated dinamically by an struts tag, but its giving me invalid indexed property error:
>>
>> Invalid indexed property 'niveisRisco['+<%=ctr%>+']
>>
>> Heres the code i'm using:
>>
>> $(function(){
>> var mapaAplicacaoJs = $('#MapaAplicacao area');
>> var mapaPerfilJs = $('#MapaPerfil area');
>>
>> <logic:present name="carteiraSelecionada">
>> <logic:iterate name="carteiraSelecionada" property="carteiraAtual.niveisRisco" id="foo" indexId="ctr">
>> mapaAplicacaoJs.each(function() {
>> mapaAplicacaoJs.before('<div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco['+<%=ctr%>+'].getDescricao" />"></div>');
>> </logic:iterate>
>> </logic:present>
>> });
>>
>> If i hardcode <div id="nivel_risco_dv" class="tabindex" title="<bean:write name="carteiraSelecionada" property="carteiraAtual.niveisRisco[0].getDescricao it works.
>>
>> Can anyone tell me whats wrong with my concatenation?
>>
>> Thanks
>
> This is a newsgroup for Jave, not Javascript. They are not the same.
> You will get better answers if you post to a javascript newsgroup.
JavaScript is not here.
But JSP and Struts is here.
And given that the server side runs before the client side it makes
sense to start the troubleshooting server side.
So it seems to make perfect sense to start here.
Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web