• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

html-el:select embeded in js, what should I do to let it runing or not Unterminated String Constant

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


but it parse it


I want it can parse it like below



how should I do
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using custom tag output as a JavaScript string when the tag's output spans multiple lines is probably not very practical, since JavaScript doesn't support herestrings/multi-line strings without using a line continuation character.

You're probably better off using hidden divs and toggling between them based on your existing test (if you need to allow both on the same page without a refresh) or doing to comparison during page load if you don't.

Technically this probably isn't a Struts question, but a JavaScript question.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, have you seen my details more

how should i do in the js
i want to use the js to iterator the component.
using jstl or other tag.

thank for your reply.
If you have time, reply more. thanks

I cant use the div to force it one line,
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understood the problem.

The tag's output is set by the tag implementation. Unless you re-write the tag, the tag output isn't going to change.

I gave you some alternatives; I am not sure what else you want.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and do you know how to implement it
the back I have implement the javabean collections

and using other customer to implement it also OK,
I want to rewrite the tag, but the head of me do not agree.

so....

thanks David.
do you have any other good idea to implement it?
except using the request.getAttribute()
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rewriting the tag would be a complicated solution to a relatively easy problem.

I already provided two potential solutions, each appropriate for a different set of requirements--without knowing more precisely what you require, those are the only solutions I have.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How
David
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you just gave the java code, the java code I can implement
I want the UI show
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't recall giving any Java code.

Like I said--I don't know how you need your application to operate, so there's not much more I can do.
 
endswel shui
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a collection

and the ui will show two collection,

because it is a cascade collection,

one collection will trigger another collection, but sometime it trigger others, eg. freebox
so

I have to write a collection in the js dynamic, in the html, I use the div to block or none
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
endswel:

Please check your private messages for a message regarding an important administrative matter. You can do so by clicking My Private Messages in the upper right corner of the page.
 
This tiny ad is guaranteed to be gluten free.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic