Multiple instances of managed bean

后端 未结 2 1457
别那么骄傲
别那么骄傲 2021-01-22 12:40

I\'m using prime-faces Tabs to display multiple input forms. The problem is, there are times when I need to instantiate 2 of the same form. They both of course use the same Mana

2条回答
  •  春和景丽
    2021-01-22 12:54

    If you want to use the multiple instance of manager bean, then you can declared it in faces-config.xml file with different names and use its independently. See example

    
        productSearchForm
        com.company.package.ProductSearchForm
        session
    
    
    
        productChildFilter
        com.company.package.ProductSearchForm
        session
    
    
    
        productAttachFilter
        com.company.package.ProductSearchForm
        session
    
    

提交回复
热议问题