如何在JSF中开会

时间:2012-08-28 16:04:18

标签: java jsf java-ee

我需要为用户之间的会议创建一个页面 我这样做了: Meeting webpage

page.xhtml

<p:facet name="west">
        <ice:outputText value="Tareas"/>
        <h:panelGrid id="panelGrid1" columns="1" cellspacing="10" style="margin:0 auto 0 auto; height: 188px; ">          
            <ace:list id="list" value="#{reunionBean.listaOrigen}" dropGroup="textGroup" selection="true" style="height: 590px; width: 300px; " bodyStyle="height:570px;width:300px;" styleClass="inlineList">
                   <ace:ajax event="migrate"/>
               </ace:list>
        </h:panelGrid>
    </p:facet>
    <p:facet name="center">

        <ice:outputText value="Usuarios"/>
        <h:panelGrid id="panelGrid2" columns="2" cellspacing="10" style="margin:0 auto 0 auto;">
            <h:panelGrid columns="1">
            <ace:panel>
            <ice:outputText value="#{reunionBean.usuarioParticipante1}" styleClass="textuser"/>
            </ace:panel>
            <ace:list id="list1" value="#{reunionBean.listaParticipante1}" dropGroup="textGroup" selection="true" style="height:100px;width:300px;" bodyStyle="height:100px;width:300px;" styleClass="inlineList">
                   <ace:ajax event="migrate"/>
                </ace:list>
            </h:panelGrid>

            <h:panelGrid columns="1">
            <ace:panel>
            <ice:outputText value="#{reunionBean.usuarioParticipante2}" styleClass="textuser"/>
            </ace:panel>
            <ace:list id="list2" value="#{reunionBean.listaParticipante2}" dropGroup="textGroup" selection="true" style="height:100px;width:300px;" bodyStyle="height:100px;width:300px;" styleClass="inlineList">
                   <ace:ajax event="migrate"/>
                </ace:list>
                </h:panelGrid>

                         </h:panelGrid></p:facet>

我的问题是我需要将每个用户的列表(listaParticipante1 listaParticipante2,...)保存在由所有用户共享的bean中,否则,当我分配任务时,只有当前用户看到更改,并且其他用户,listaParticipante1,2,...是空的。

我正在使用会话bean Scope。我应该使用应用范围吗? 我尝试了但是我无法访问会话Bean,因为应用程序Bean我需要“reu”对象,请参阅may方法初始化列表“listaParticipante2”

reu是@ManagedBean(name =“reunionBean”)@SessionScoped的对象,我需要初始化列表

public void getTareasActivasUsuarioJira(String userName){
    List<Issue> lista= issueF.getUserOpenIssues(reu.getProyectoKey(), userName);
    for (Issue issue : lista) {
        SelectItem s = new SelectItem();
        String tarea= issue.getKey() +"  |  "+ issue.getPriority().getName() +"  |  "+ issue.getTimeTracking().getRemainingEstimateMinutes()+" min  |  "+ issue.getTimeTracking().getOriginalEstimateMinutes()+" min  |  "+ issue.getSummary();
        s.setLabel(tarea);
        s.setValue(issue);
        listaParticipante2.add(s);
     }
    System.out.println("LISTA-participante 2: "+listaParticipante2);
}

注意:我通过REST获取任务数据,不在DDBB中

0 个答案:

没有答案