File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes dynamic page(forms) using tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic page(forms) using tiles" Watch "dynamic page(forms) using tiles" New topic
Author

dynamic page(forms) using tiles

azhar bharat
Ranch Hand

Joined: Jul 17, 2006
Posts: 87
I have this webapp where users can post entries on different categories.
The form fields are diferent for each category. So i have different pages with corresponding forms.
I want to add the form dynamically using tiles definition files.
The selection will be based on a parameter passed from a another form (post).
I am also thinking of an option of using resource bundle to decide which form page needs to be displayed.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Is there a question?

Also, please review the JavaRanch naming policy and change your the "publicly displayed name" in your profile so that it complies with the policy.
[ July 18, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
azhar bharat
Ranch Hand

Joined: Jul 17, 2006
Posts: 87
Is there a question?

Yes, How do I go about the above mentioned problem? I dont have much experience in using tiles.

Also, please review the JavaRanch naming policy and change your the "publicly displayed name" in your profile so that it complies with the policy.

This is my real name and nothing fictional.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Azhanr S.,

I didn't mean to imply that your name was fictitious. I'm simply pointing out that the policy is to specify both a first and last name. An initial does not qualify as a name.

Merrill
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Regarding your question,

I don't think trying to dynamically create Tiles definitions will work. Struts requires that tiles definitions be defined in XML beforehand, and changing them requires a restart of the application.

You could always write your own extensions to Struts in order to do it, but I think it would be profitable to pursue other options before going to the trouble of extending Struts.

I'd suggest you investigate using LazyValidatorForm. It is well suited to dynamically created pages, and does not require you to define field names or types in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic page(forms) using tiles