问题
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> <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