Let's suppose you have a subform you use often but with different beans.
The aliasBean allows you to design the subform with a fictive bean and to include it in all the pages where you use it. You just need to make an alias to the real bean named after the fictive bean before invoking the fictive bean.

In this example, the customerAddress bean is a managed bean, but the address bean isn't defined anywhere.
After the aliasBean tag, we can use #{address.*} in place of #{custommerAddress.*}, so making it possible to have generic address subforms (ok, this one is a very simple form, but you get the idea).

aliasTest1

aliasTest2

aliasTest with fixed string

myFixedString

aliasBeansScope

aliasBean with component-binding - if everything works, you should see 'first' followed by 'second'

first second on every postback the text 'first' and 'second' will be added





[HOME]   [SOURCE]