jsf viewscoped bean - set values for every page(tabs)

回眸只為那壹抹淺笑 提交于 2019-12-13 06:08:16

问题


I am sorry, this might sound really basic but if anyone could explain how to set explicit values for every tabs in the same browser window using the JSF viewscoped bean.

Please guide me to some article or working samples.

Kindly help, thanks in advance

Update:

auth-page.xhtml

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:qumola="http://java.sun.com/jsf/composite/qumola"
    xmlns:p="http://primefaces.org/ui">
    <style type="text/css"/>
<h:panelGrid id="newGrid">
                            <ui:param name="labelResourceName"
                                value="#{userMenuState.selectedLeftMenuItem.menuLabel}" />
                            <h:form id="someForm">
                                <h:panelGrid id="topBannerId">
                                    <font>#{msg[labelResourceName]}</font> &nbsp;<font
                                        class="titleTextBar"> </font>
                                    <font class="titleTextBar">
                                        #{activityEditorManagedBean.selectedActivityBean.title}</font>
                                </h:panelGrid>
                            </h:form>
 </h:panelGrid>
</ui:composition>

The value "activityEditorManagedBean.selectedActivityBean.title" in the above code is a viewscoped bean variable value but it has the same value in every tab it is opened in.

来源:https://stackoverflow.com/questions/18508322/jsf-viewscoped-bean-set-values-for-every-pagetabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!