All struts2 tag's each attributes usage examples - struts2

I need to know how to use each and every attribute of Struts2 tags. I
have gone through all possible websites by searching via Google, But
no one has understandable explanation or examples of each and every
attributes of each struts2 tags.
for example: In "optiontransferselect" tag, for
allowAddAllToRight attribute I have no idea what String do I need to give for it.
here is one of the site I refered...

If you want to understand every single option, do two things:
Use every single option.
Read the source code.
When something is listed as "enable", it's almost always a true/false value, as it is in this case. Why it's listed as a string, not sure; either an issue with the annotation processor, or it was added and the type conversion was done manually, or...?
While I (sort of) understand the motivation for wanting to understand "each and every attribute" of each tag, IMO your time would be better spent learning more important framework details.

I am afraid you will find them at anywhere as these attributes have been defined and provided based on generic needs and its quit possible that some one need few of them and some need others.
i even never used all of the tag properties and in most of the cases we end up using few as per our choice.
If you want to find what each and every property/ attribute making end effect best way is to create a demo struts2 application pick up few tags go to struts2 tag reference page read there description and start playing with them and see how things are changing and check generated HTML code.
There is no other shot-cut for this.
But why you need to know all the properties? i am just curious
Struts2 tag refrence

Related

Isn't there any way to execute a post function script for free?

I'd like to perform operations like automatically update a field based on another field's value (for example if the assignee field is empty automatically assign to a default, set an hidden "due date" field based on the release-fix start date, ecc.) or write a custom validator that does validations based on a combination of values.
Every time I go searching on the jira forum I find java fragments of code, so everything seems to be possible, but it seems it is only at one condition: to buy the script runner plugin!
It seems strange to me: of course this plugin seems to be doing a lot of boilerplate for you but...what if I want to make a little more effort but still not payng for something that, in my opinion, should be free? I'm already paying the software license...isn't there another way to perform such post actions?
Try MyGroovy. It provides similar features. For tasks like execution post-functions I suppose it would fits good.

How to make sure that a form is only opened once?

Is it possible to make sure a user only can open one instance of a specific form, for instance CustTrans from CustTable?
Modal form is not an option. Some sort of Singleton pattern?
You can use the global cache for this, more info on MSDN: http://msdn.microsoft.com/en-us/library/aa891830.aspx. However a lot of the time the use of the global cache is a sign of bad design.
You can use the global cache to implement a singleton pattern as demonstrated here: http://www.axaptapedia.com/Singleton_pattern
Also consider alternative solutions to your problem, for example the one used on inventory journals. When you open the lines for a journal, it is marked as "in use" so no one else can open that particular journal.
Side note: I believe what you are trying to achieve is a bit of an anti-pattern. Dynamics AX uses dynalinks to link forms together. All of this functionality will be lost if you implement this.

How does Orchard CustomProperties Part work?

Literally I think the part will let me customize the property name of a specific content type in orchard. But when I attach this part to a newly created content type from the admin UI. All I got is 3 text fields with property names called "Custom One, Custom Two, Custom Three".
I couldn't find any examples from the web or from Orchard Source code explaining how should I work with it...
This part is obsolete. It used to be necessary for the List feature (also obsolete) to be able to sort on custom data. You should not be using that part.

What is IdentityPart in Orchard CMS good for?

I havent found any mention in Orchard documentation about IdentityPart despite it being used in some main modules like Comments. I took a look at some relevant sources, but it didn't help me to fully understand it's purpose.
So what's it for and when should I use it?
Thanks in advance!
This is part of the import/export feature. In order to be able to move contents around servers reliably and in a repeatable way that takes into account updated and new items, we need a way to identify content items that's not just a simple id. Some contents have a path but not all types do (widgets, users, etc.). The export/import hooks for any part can participate in building the id of the item and in recognizing it on import. The routable part for example implements the use of path. But for those types that do not have routable, you can add the IdentityPart to fulfill that role. The id that gets exported in the end is a composite of all contributed ids.
Makes sense?

Storing formatted text in Resource File .Is it Possible?

Building an asp.net mvc website that has to be multilingual and wondering if it's possible to store formatted text in a resource file and whether it makes sense.
Lots of pages are static and user can edit them and add their own formatting "Bold,italics etc.."
and was wondering what is the best way to approach it.
I dont want to create one page x language and storing in the database involves creating a structure to handle the same info in multiple languages.Seems hard to maintain.
Have you done it before? How did you do it
any suggestions
Thanks a lot
Is it possible?
Certainly.
Does it make sense?
It depends. I would not recommend resource files (via ResourceWriter) for storing dynamic content.
Your problem
Let me rephrase it (I am not sure if I understood you correctly). You want to give your users an ability to change presentation style. User will be able to change the style and that change would be somehow propagated to whatever languages the content is translated to.
In such case, I see some issues:
How to match English contents with translated one?
It is typical for translation to have different order and possibly different number of sentences. There is no way to match them unless...
Storing such information in resource files along with translatable strings would result in something that is hard to maintain. I believe you would need to either add formatting tags or content tags with styling information in order to achieve that. The result would be a mess; hardly readable, as tough to modify.
OK, so what can you do? Actually, what I could recommend is to create Customization Mechanism for CSS files. In your case you need:
Provide CSS classes as well as unique identifiers (HTML id attribute) to each structural elements (tags if you prefer), so that you have something like <div id="main" class="main"><p id="p1" class="normal">.... The id's will give users an ability to target precisely that element leaving others untouched (via #p1.normal { // definition here }).
Store CSS in the Database and create some editor for users.
Create a Handler to serve CSS from database upon web browser's request.
Even with such solution you won't avoid some problems. One is that you need to actually alter font family while translating into certain languages, so you might need language-based CSS files. Another problem pops up when user wants to put bold attribute on certain word - with such solution this is not possible (but to be honest if you want to allow that, this won't be i18n friendly for the reasons I mentioned earlier).
BTW. Bold fonts should be avoided for some languages. For example Chinese characters are pretty hard to read if you manage to output them with bold font.
If your users can post in multiple languages - its probably best to use a database to store the info and accompanying formatting. If it is for labels and other static text on the website - the resource files are a good solution. The resource files store the content as strings - but storing formatted text in there breaks the 'seperate the presentation from the logic' idealogy.

Resources