aspose file tools*
The moose likes Struts and the fly likes Re-use a tile w/ different FormBeans. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

Re-use a tile w/ different FormBeans.

Vimal Agarwal
Greenhorn

Joined: Mar 03, 2007
Posts: 6
How do I re-use a tile in the context of different form beans?

I want create two subclasses of an abstract Form and register them in Struts-config as say, "FormBean1" and "FormBean2". I will have separate action mappings for each of these.

I want to then create a tile (say using "commonTile.jsp") that has the common attributes (ones from the parent Form class). How do I then re-use this tile with either of these FormBeans, considering that their names are different?

In other words, I may have "formBean1.jsp" that works with "FormBean1" and I want to insert the commonTile.jsp (using <tile:insert> into this "formBean1.jsp". And also similarly into "formBean2.jsp" that works with "FormBean2".
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61229
    
  66

"Agarwal",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vimal Agarwal
Greenhorn

Joined: Mar 03, 2007
Posts: 6
And who made you the expert on Names, "Bear".
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Bear is only telling you the same thing that I would tell you, or for that matter any of us who donate time to answer questions on JavaRanch would tell you. Using real names is part of the culture at JavaRanch, and we ask that you respect the culture here if you want to ask questions and participate in the discussions. We'd love to have you participate, but it needs to be on the same terms as the rest of us who participate.

If that doesn't suit you, there are plenty of other forums out there that you can participate in using only your first name or an assumed name.

Another part of our culture is to be nice to each other and be respectful in our posts to each other. Judging from your last post, it looks like there are now two areas where you may need to make some adjustments in order to fit into the culture here.


Merrill
Consultant, Sima Solutions
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11460
    
  94

Originally posted by Agarwal:
And who made you the expert on Names, "Bear".


I don't think Bear was trying to be an expert on names - I think he was just reminding you of this site's naming policy. Bear was made an administrator of this site by the owner of the site. One of the many reasons we are lucky to have Bear as an administrator is that he does take the time to politely remind people of the few rules of this site when necessary.

Bear has made it explicitly clear where your name fails to meet this site's naming policy. He specifically mentioned: "In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious".

But perhaps you were trying to cast doubt on Bear's displayed name? If you look at the signature line of Bear's posts, you will see a link that looks like: [Books by Bear]. If you follow that link you will see that Bear has books published where he is listed as Bear Bibeault (very good books too). So his name is obviously not fictitious, and he has both a first and last name separated by spaces. So his displayed name meets our policies. Yours does not.

If you are in any doubt, please go back and re-read the the JavaRanch Naming Policy and adjust your display name to match it.

Regards,

Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Vimal Agarwal
Greenhorn

Joined: Mar 03, 2007
Posts: 6
My participation in this or any other forum that I am part of is always very very objective.

I have off and on read thru the Ranch posts for a few years now. When I was getting redy to post a question yeterday, I was in fact surprised that I had never registered all this time. I'm probably taking the time to write this post bcos of the long association.

Anyways, honestly I was ticked off by Bear suggesting that my name was "obviously fictitious". He could have given me some benefit of doubt and simply directed me to the rules (not quote/un-quoted my name). I do respect the people and the rules of the forum. And I dont need to verify any else's names. I've adjusted mine and hopefully we can rest this issue here and now.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61229
    
  66

Your irritation was a bit thin-skinned of you, don't you think? My request was polite and is the same one posted for any registrant whose name does not meet the guidelines. In any case, thanks for complying.

I noticed that you opened another topic with the same question... yes, that's a no-no too. But as this topic got off track without any substantive discussion of your issue, I'll close this one and any technical discussion can occur in your other topic.

Any further disucssion regarding the naming policy (or other forum rules and guidelines) can occur in the forum for discussing Javaranch issues.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Re-use a tile w/ different FormBeans.