小编jim*_*ndy的帖子

soapUI更改(禁用)Internet Explorer的代理设置

  • 安装soapUI 4.5.1.

  • 当我启动soapUI时,它禁用了IE 8中的所有检查Internet Options > Connection > LAN Settings.

  • 如果我在soapUI>中输入代理File Preferences > Proxy Settings,则soapUI将使用此代理覆盖IE中的配置

Apply proxy defined in global preferences图标栏中的切换按钮对IE没有影响,仅在soapUI连接上有效.

我该如何禁用此行为?

proxy soapui internet-explorer-8

17
推荐指数
1
解决办法
2万
查看次数

从bean触发/激活RowEditor以进行主要的In-Cell编辑启用p:dataTable

我有一个启用p:dataTableInCell编辑的表面,并且想要为新添加的行触发/激活RowEditor.

XHTML的摘录

<p:commandButton id="btnAddEntry" value="Add new row" actionListener="#{myBean.addNewCar}" ... update="carTable growl" process="@this carTable ..."/>

<p:dataTable id="carTable" var="car" value="#{myBean.cars}" ... editable="true">  
        <p:column ...>  
            <p:cellEditor>
                ...
            </p:cellEditor>  
        </p:column>
    ...
        <p:column ...>  
                <p:rowEditor />  
        </p:column>
    ...         
</p:dataTable>
Run Code Online (Sandbox Code Playgroud)

这是我目前为bean方法所做的:

public void addNewCar() {

    Car newCar = new Car();
    cars.add(newCar);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIComponent uiTable = ComponentUtils.findComponent(facesContext.getViewRoot(), "carTable");
    DataTable table = (DataTable) uiTable;

    final AjaxBehavior behavior = new AjaxBehavior();    
    RowEditEvent rowEditEvent = new RowEditEvent(uiTable, behavior, table.getRowData());
    rowEditEvent.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
    table.broadcast(rowEditEvent); …
Run Code Online (Sandbox Code Playgroud)

primefaces jsf-2

9
推荐指数
2
解决办法
9805
查看次数

如何使用依赖对象关系更新多个组件(selectOneMenu)?

我有以下(不言自明的)实体关系:

* Manufacturer
* Car    (Manufacturer.getCars())
* Tire   (Car.getTires())
Run Code Online (Sandbox Code Playgroud)

为myBean

private List<Manufacturer> allManufacturers

private Manufacturer selectedManufacturer
private Car selectedCar
private Tire selectedTire
Run Code Online (Sandbox Code Playgroud)

XHTML

<p:selectOneMenu id="manufacturerSel" value="#{myBean.selectedManufacturer}" converter="#{manufacturerConverter}">
    <f:selectItem itemLabel="None" itemValue="#{null}" />
    <f:selectItems value="#{myBean.allManufacturers}" />
    <p:ajax update="carSel tireSel" />
</p:selectOneMenu>

<p:selectOneMenu id="carSel" value="#{myBean.selectedCar}" converter="#{carsConverter}" disabled="#{empty myBean.selectedManufacturer.cars}">
    <f:selectItem itemLabel="None" itemValue="#{null}" />
    <f:selectItems value="#{myBean.selectedManufacturer.cars}"  />
    <p:ajax update="tireSel" />
</p:selectOneMenu>

<p:selectOneMenu id="tireSel" value="#{myBean.selectedTire}" converter="#{tiresConverter}" disabled="#{empty myBean.selectedCar.tires}">
    <f:selectItem itemLabel="None" itemValue="#{null}" />                            
    <f:selectItems value="#{myBean.selectedCars.tires}"  />
</p:selectOneMenu>
Run Code Online (Sandbox Code Playgroud)
  • 最后两个p:selectOneMenu应该根据第一个中的选择进行更新
  • p:selectOneMenu带ID 的最后一个tireSel没有正确更新
  • 所有待更新的组件都在同一个内部 NamingContainer …

jsf selectonemenu primefaces jsf-2

6
推荐指数
1
解决办法
3万
查看次数

当使用lazy dataTable时,另一个组件没有得到更新/第二个组件数据是一个请求

我有一个PrimeFaces p:dataTable并通过实现一个启用延迟加载LazyDataModel.

dataTable保存搜索结果,因此在执行搜索请求时,搜索服务仅检索所需(分页)数据.这很好.

在执行ajax请求时p:commandButton:

<p:commandButton id="searchCmdBtn" value="Search" action="#{searchBean.search}" 
   update=":resultForm:resultList :filterForm:filterMenu :resultForm:messages" 
   ajax="true" />
Run Code Online (Sandbox Code Playgroud)

dataTable正确更新,但不是filterForm中的filterMenu(不同的形式,使用bcz p:layout).

filterMenu是一个请求.这意味着当我再次点击搜索按钮时,filterMenu会更新,t只会在第二次ajax请求后更新

@ManagedBean
@ViewScoped
public class SearchBean implements Serializable {

    private LazyDataModel<Entity> lazyDataModel;
    private MenuModel filterMenuModel = new DefaultMenuModel();
    private SearchResult searchResult = null;

    public void search() {   
        // lazy call
        getLazyDataModel();
        if (searchResult != null) {
            buildFilterMenu(searchResult);
        }
    }

    private void initializeDataModel() {

        lazyDataModel = new LazyDataModel<Entity>() {

            private static final long serialVersionUID = 1L;

            @Override
            public List<Entity> …
Run Code Online (Sandbox Code Playgroud)

jsf lazy-loading primefaces jsf-2

6
推荐指数
1
解决办法
3269
查看次数

JSF视图状态何时到期?

我相信以下是真的

  • 如果javax.faces.STATE_SAVING_METHOD设置为client,则视图永不过期
  • 一个ViewExpiredException将被抛出
    • 如果javax.faces.STATE_SAVING_METHOD设置为server 并且视图状态不可用
    • 会话被销毁时(因为会话中保存的所有视图在逻辑上也会同时过期)
    • com.sun.faces.clientStateTimeout设置一个值(默认为NONE)并且请求之间的时间超过此配置的时间

我不知道

  1. 视图状态不再可用的原因是什么(eexcept会话超时)?
  2. 是否有任何时间值可以配置来控制视图状态超时?

谢谢

相关:

jsf-2 viewexpiredexception

2
推荐指数
1
解决办法
6307
查看次数