当前位置: 首页>>代码示例>>Java>>正文


Java UISelectItems.setId方法代码示例

本文整理汇总了Java中javax.faces.component.UISelectItems.setId方法的典型用法代码示例。如果您正苦于以下问题:Java UISelectItems.setId方法的具体用法?Java UISelectItems.setId怎么用?Java UISelectItems.setId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.faces.component.UISelectItems的用法示例。


在下文中一共展示了UISelectItems.setId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import javax.faces.component.UISelectItems; //导入方法依赖的package包/类
@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    mockContext = MockFacesContext.mockFacesContext();
    testee = new DatePickerComponent();
    mockContext.getViewRoot().getChildren().add(testee);
    testee.setDayComponent(dayComponent);
    testee.setMonthComponent(monthComponent);
    testee.setYearComponent(yearComponent);

    //  create SelectItems
    dayItems = new UISelectItems();
    dayItems.setId("dayItems");
    monthItems = new UISelectItems();
    monthItems.setId("monthItems");
    yearItems = new UISelectItems();
    yearItems.setId("yearItems");

    Mockito.when(dayComponent.findComponent("dayItems")).thenReturn(dayItems);
    Mockito.when(monthComponent.findComponent("monthItems")).thenReturn(monthItems);
    Mockito.when(yearComponent.findComponent("yearItems")).thenReturn(yearItems);

}
 
开发者ID:studentloanscompany,项目名称:ft-components,代码行数:24,代码来源:DatePickerComponentTest.java

示例2: encodeBegin

import javax.faces.component.UISelectItems; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void encodeBegin(FacesContext context) throws IOException
{
   // if the component does not have any children yet create the
   // list of Charsets the user can choose from as a child 
   // SelectItems component.
   if (getChildren().size() == 0)
   {
      UISelectItems items = (UISelectItems)context.getApplication().createComponent("javax.faces.SelectItems");
      items.setId(this.getId() + "_items");
      items.setValue(createList());
      
      // add the child component
      getChildren().add(items);
   }
   
   // do the default processing
   super.encodeBegin(context);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:21,代码来源:UICharsetSelector.java

示例3: encodeBegin

import javax.faces.component.UISelectItems; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void encodeBegin(FacesContext context) throws IOException
{
   // if the component does not have any children yet create the
   // list of MIME types the user can choose from as a child 
   // SelectItems component.
   if (getChildren().size() == 0)
   {
      UISelectItems items = (UISelectItems)context.getApplication().
            createComponent("javax.faces.SelectItems");
      items.setId(this.getId() + "_items");
      items.setValue(createList());
      
      // add the child component
      getChildren().add(items);
   }
   
   // do the default processing
   super.encodeBegin(context);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:22,代码来源:UIMimeTypeSelector.java

示例4: encodeBegin

import javax.faces.component.UISelectItems; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void encodeBegin(FacesContext context) throws IOException
{
   if (getChildren().size() == 0)
   {
      UISelectItems items = (UISelectItems)context.getApplication().
            createComponent("javax.faces.SelectItems");
      items.setId(this.getId() + "_items");
      items.setValue(createList());
      
      // add the child component
      getChildren().add(items);
   }
   
   // do the default processing
   super.encodeBegin(context);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:19,代码来源:UIStoreSelector.java

示例5: encodeBegin

import javax.faces.component.UISelectItems; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void encodeBegin(FacesContext context) throws IOException
{
   // if the component does not have any children yet create the
   // list of Languages the user can choose from as a child 
   // SelectItems component.
   if (getChildren().size() == 0)
   {
      UISelectItems items = (UISelectItems) context.getApplication().
            createComponent("javax.faces.SelectItems");
      items.setId(this.getId() + "_items");
      items.setValue(createList());        
      // add the child component
      getChildren().add(items);
   }
   // do the default processing
   super.encodeBegin(context);      
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:20,代码来源:UILanguageSelector.java


注:本文中的javax.faces.component.UISelectItems.setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。