Hi I want to use the aliasBean for the same page because I need to be able to copy/paste pages that are not similar, but the usage of the backing bean is preety much the same. So I make an alias for the backing bean, and on other pages, I don't have to replace the name of the backing bean on the entire page, but in the alias bean. I know it's not big deal, but it can spare you some errors and the page gets cleaner.
On 3/7/07, Martin Marinschek <[EMAIL PROTECTED]> wrote:
I wonder why you do an aliasBean on the same page beforehand - why don't you just factor out the stuff into a separate facelets component? regards, Martin On 3/5/07, Werner Punz <[EMAIL PROTECTED]> wrote: > Laurentiu Trica schrieb: > > Hi Werner > > > > As far as I read, the <ui:repeat> iterates a list and puts a value at a > > time in the var. > > Should this work in my case? I just need to make an alias for a bean on > > my page. > > I didn't quite understood how to push the component definition into the > > xml. > > > > Thank you for your time. > > > > Ok I am somewhat sorry, you have to get the code out of your > file, I just looked over the facelet docs again, as it seems there is > no way to extract parts of the page as components from a page > only one xml file per component is allowed. > I personally see it is a minor inconvenience if aliasbean does not work > for you. > > Rip out your reusable code into a separate xml file doing a ui:composition > > add an entry to your facelet xml for the component so that you get your > own tag and have the aliases as attributes > > here is an example doing exactly this (in the second part of the > article-Breaking the DRY principle) > > http://www-128.ibm.com/developerworks/java/library/j-facelets/ > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
-- Best regards, Laurentiu www.codebeat.ro

