• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

can I use strut without using its HTML related tags ?

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like struts and want to use it. However, the organization I work for has its own extremely strict HTML standard (like bgcolor, table setting, and all GUI details). So for the front end they really want to control it, and as a result of that, they don't want me to use syntax like "<form:form>", etc. They need to insert their FORM GUI setting everywhere. So my question is ---

Can I use struts without using struts' HTML related tags ? One obvious question is -- If I choose not to use <form:form> tag the server won't automatically append a ".do" for me. But I guess that can be worked around by adding a ".do" in my "ACTION=" syntax. Am I right on this ?
Is there any other problem I may encounter ?

thanks
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the use of the struts-html tag lib is much more critical than simply automatically append the .do to your action. the tag-lib is coupled with maintaining form field values (critical for validation failure), indexed properties value maintenance, LookupDispatchAction support, selection, checkboxes and radio button display from collection, displaying errors and messages etc. if you want to do internationalization, html:html declaration is a must.

you will have a night-marish time managing beans and form values if you don't use this tag-lib in the long run. the good news is that these are mostly necessary for form elements. you CAN use plain old HTML tags where the above conditions don't apply, putting HTML inside struts-html. UI styles in CSS are fully supported in all of the form element tags. the only short fall is the 'dir' attribute (used for RTL/LTR) is not supported by these tags.
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Sikuluzu:
I like struts and want to use it. However, the organization I work for has its own extremely strict HTML standard (like bgcolor, table setting, and all GUI details). So for the front end they really want to control it, and as a result of that, they don't want me to use syntax like "<form:form>", etc. They need to insert their FORM GUI setting everywhere. So my question is ---

Can I use struts without using struts' HTML related tags ? One obvious question is -- If I choose not to use <form:form> tag the server won't automatically append a ".do" for me. But I guess that can be worked around by adding a ".do" in my "ACTION=" syntax. Am I right on this ?
Is there any other problem I may encounter ?

thanks



If you use Velocity, you can use ordinary HTML with Struts. It's much more straight forward than JSP. It can be used in conjunction with JSP for the few things it can't do.
 
Frank Sikuluzu
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually, what I want is to keep struts tag as minimal as possible. I will not use Velocity. I will still use <form:form> tag though. But for the middle of the FORM, since it is not a straightforward thing I can simply pop the beans and put into some picklist, radio boxes, etc. I need to do lot of customization work. For example, I need to use different font/color for different items, need to arrange them specifial based on items' special characters, something like that. So I still want to use my own custom tag to do some of such work, and then output(or "insert") the results inside the <form:form> section. Is that OK ?
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have over 2 years of struts experience and i have yet seen a scenario that struts can't handle when it comes to form elements such as radios, checkboxes, select list. struts html ptions for example allows for you to insert the entire collection to generate options. once again, using other ways to maintain form values instead of using struts-html lib will have a burdening consequences later. i learned this the hard way.

you CAN interlace other custom tags to control your UI elements (alternating row color, special conditions etc.). you don't have to use the struts 'logic' or 'bean' to do this, but instead use your own. i recommend using JSTL tag-libs though, since they are more 'standard' and probably much better than anything proprietarily written.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank Sikuluzu:
... I will not use Velocity. ...



Why, is it a requirement that you must use JSP exclusively? Velocity is far more straight forward, and it doesn't prevent you from using JSP when it's needed, I use both. My point was that if you use Velocity, you don't need to use unorthodox HTML tags.
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic