本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}