|
|
Subject:
Dynamic page rendering using struts
Category: Computers > Programming Asked by: nicevikki-ga List Price: $15.00 |
Posted:
01 Feb 2005 12:38 PST
Expires: 03 Mar 2005 12:38 PST Question ID: 467108 |
What are the ways for "dynamic page rendering" using struts with out the use of java scripts with example. |
|
Subject:
Re: Dynamic page rendering using struts
Answered By: willisboyce-ga on 02 Mar 2005 12:16 PST Rated: |
You didn't mention whether or not you can use Java applets. If you can, then you can put your checkboxes and radio buttons on an applet and use the applet to update the page. You'll find the information that you need here: http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html Ignore JSObject. That gives you access to JavaScript, which you've implied is disabled. You want DOMService. If you can't use JavaScript or Java--in other words, if you don't have any ability to implement logic on the client at all--then your only choice is to make the checkboxes and radio buttons into image buttons (<input type="image" ...>). Create images that look exactly like checkboxes and radio buttons. (Just take a screen shot of a regular web page and cut the checkboxes and radio buttons out.) You'll need two images of each button, one in the checked/selected state and the other in the unchecked/deselected state. When generating the HTML for the page, use the appropriate image for each button. The buttons are submit buttons, so when the user clicks one, the form will be submitted. Your server code will have to detect which checkbox or radio button was clicked (by looking at the request arguments in the same way that you'd determine which of several regular submit buttons was clicked), take the appropriate action, and then regenerate the whole page. While generating the new page, your program will obviously have the opportunity to add or remove user interface elements based on the selection state of the checkboxes and radio buttons. I'll cheerfully admit that this is the brute force approach, but it will work and will not require any client-side logic at all. | |
| |
| |
|
nicevikki-ga
rated this answer:
I have been asking for an answer clarification, and I didnt get any feedback. To my surprise, the status of my query is closed. |
|
Subject:
Re: Dynamic page rendering using struts
From: nicevikki-ga on 10 Feb 2005 11:43 PST |
thanks Mestre. What I am looking for is that, when a user clicks a radio button or a checkbox, an action is to be triggered liked, presenting a text box or display of info. This can happen in two ways- java script or making server calls. I am looking for a similar functionality in STRUTS-DYNA ACTION FORM. |
Subject:
Re: Dynamic page rendering using struts
From: billotte-ga on 14 Feb 2005 04:56 PST |
As far as I know (been playing/working with html and server side web-applications since 1995) there is no way to have a radio button click translate into any type of action with out Javascript. True the server could generate the response that you want, but there is still no way to issue a request to the server, other than with an anchor tag or with a form and submit button without javascript. Without javascript you are limited to only those two methods of invoking a server response. With javascript, however, you can easily use the onClick or onChange handler for any for element (text, radio button, checkbox, etc.) to trigger either a javascript pop-up dialog or a server response. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |