0

我有这个实体,我用它来生成带有代理的对象:

private Integer autoDialer;
private String description;
private String email;
private String ipAddress;
private Integer isActive;
private Boolean isAdmin;
private Boolean isRemove;
private Boolean isSenior;
private Boolean isSuper;
private Timestamp lastLogged;
private Timestamp lastReady;
private String password;
private String phone;
private String placeLoc;
private String placeName;
private String regServerList;
private String signature;
private Integer status;
private String uiLang;
private Boolean useCtt;
private Boolean useVcc;
private String username;
private Long vaccountId;
private Long accountId;

我有一个表单,它必须将这个巨大的对象添加到代理并将数据插入另一个表:

<h:form id="formDlgId">

                        <div class="dlg-row">
                            <div></h:outputText></div>
                            <div>
                                <h:selectOneMenu id="skillID" styleClass="selectLong2" title="skill" value="#{agentsToCampaign.agentSkillLevel}">
                                    <f:selectItem itemValue="Level"></f:selectItem>
                                    <f:selectItem itemValue="1"></f:selectItem>
                                    <f:selectItem itemValue="2"></f:selectItem>
                                    <f:selectItem itemValue="3"></f:selectItem>
                                    <f:selectItem itemValue="4"></f:selectItem>
                                    <f:selectItem itemValue="5"></f:selectItem>
                                    <f:selectItem itemValue="6"></f:selectItem>
                                </h:selectOneMenu> <p:tooltip for="skillID" />
                            </div>
                        </div>

                        <div>
                            <div></h:outputText></div>
                            <div>
                                <h:selectOneMenu id="selectAgentID" title="select agent" value="#{agentsToCampaign.agentId}">
                                    <f:selectItem itemValue="Select - Agent"></f:selectItem>
                                    <!--  vzimame spisak s agenti ot agentsBean -->
                                    <f:selectItems value="#{agentsBean.data}" var="item" 
                                        itemValue="#{item.accountId}" itemLabel="#{item.username}"></f:selectItems>
                                </h:selectOneMenu> <p:tooltip for="selectAgentID" />
                            </div>
                        </div>

                        <div class="dlg-row">
                            <div class="dlg-firstColumn">&nbsp;</div>
                            <div class="dlg-secondColumn">
                                <p:commandButton button-reset" value="reset"
                                                 update=":dlgId" oncomplete="dlg.show()" process="@this">
                                    <p:resetInput target=":dlgId"></p:resetInput>
                                </p:commandButton>
                                <p:commandButton value="save"
                                                 update=":formDlgId :formTblId" oncomplete="handleDialogSubmit(xhr, status, args)"
                                                 onclick="removeButtonMove()" action="#{agentsToCampaign.save()}">
                                </p:commandButton>
                            </div>
                        </div>
                    </h:form>

例如,我可以在提交表单时将带有 setter/getter 的 Object agentsBean.data 传递给第二个托管 bean 吗?

4

0 回答 0