File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic form changing with JSTL

 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have 3 radio buttons in my page...If i select Radio Buitton 1 i have to see 3 fiels and if i select RadioButton 2 then i have to see different fields and If i select RadioButton3 then i have to see different fields compared to previois fileds...



The functionality is same as the link http://www.jsworkshop.com/dhtml/list18-1.html

I want same functionality with JSTL
Please help me on this ASAP...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by LakshmiNarayana vishnu:

Please help me on this ASAP...

LakshmiNarayana vishnu,
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see EaseUp
to find out why adding requests for fast responses (ASAP) can often slow down responses to your question or stop them altogether.


Again, welcome to JavaRanch and good luck with your question.
-Ben
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by LakshmiNarayana vishnu:
I want same functionality with JSTL

In the link you've posted they're doing this with Javascript, on the client.
To do this with JSTL (a server side technology) would require a trip to the server for each radio button click. This is going to much more inefficient and cumbersome than what they're doing.

Why do you want to do this with JSTL instead of Javascript?
 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using websphere commerce ..in thay we have to use JSTL code itself...
Thats why i want code in JSTL instead of JavaScript...

Please help me as early as possible....

Thanks in Advance

Regards,
LakshmiNarayana.V
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats why i want code in JSTL instead of JavaScript...

You don't use JSTL instead of Javascript. They serve two completely different purpose. Could you elaborate on why you don't want to use Javascript ?
 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Websphere commerce...here we have to use JSTL tags....Thats why
i am using this tags....

Please clarify this problem

Regards,
LakshmiNarayana.V
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are your end users accessing your application; through a browser?
If so, then it doesn't matter what you're using on the server.
Something like this is best done on the client.
To write client side functionality like this, you would use Javascript.
 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though end users are using through browser if i write html code it is not compatable with existing inbuilt functions...
Thats why using JSTL is necessary...

Please give some idea...

Thanks&Regards,
LakshmiNarayana.V
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you're using a framework that builds the HTML for you?
(You don't need to tell us you're using Websphere Commerce. We know that but many of us are not familiar with that product).

What's stopping you from writing your own HTML/Javascript?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also JSTL is not meant to be a general purpose web scripting language. It can't (and wasn't designed to) replace Javascript. JSTL is a standardized set of custom tags for working with Java objects bound to scope by servlets and Java business objects.

All that being said, a lot of what you want to do can be accomplished on the server using JSTL and EL. It will be slower, more complicated, and for the end user more cumbersome. The problem is, you're still going to need to write some javascript, unless you want the end user to have to click the desired radio button and then click a button to submit the form back to the server where the JSTL and EL reside.
 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

we can write java script also..but i have to include JSTL tags inplcae of HTML tags...

While i am writing those tags i am getting errors...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, it sounds like you or someone at your company has a deep misconception about what JSTL is. JSTL does not and can not replace HTML tags.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the order from above wasn't to "Use JSTL instead of scriptlets"?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic