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


Java HtmlSelectOneMenu类代码示例

本文整理汇总了Java中javax.faces.component.html.HtmlSelectOneMenu的典型用法代码示例。如果您正苦于以下问题:Java HtmlSelectOneMenu类的具体用法?Java HtmlSelectOneMenu怎么用?Java HtmlSelectOneMenu使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createDeployment

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment()
{
    MavenDependencyResolver resolver = DependencyResolvers.use( MavenDependencyResolver.class )
            .loadMetadataFromPom( "pom.xml" );

    return ShrinkWrap.create(WebArchive.class)
            .addClasses( HtmlSelectOneMenu.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
            .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
            .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
            .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
            .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
            .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
     /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
            .addPackage( SlotConnectionRepresenter.class.getPackage() )
            .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
            .addPackage( Slot.class.getPackage() )
            .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
            .addAsResource(new File("src/test/resources", "settops.catsrack"))
            .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
            .addPackage( SettopDesc.class.getPackage() )
            .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
            .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
            .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:27,代码来源:RackControllerTest.java

示例2: testRISelectOneMenu

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void testRISelectOneMenu() throws IOException
{
  //
  HtmlSelectOneMenu menu = new HtmlSelectOneMenu();
  menu.setValue(new Integer(2));
  for (int i = 0 ; i < 10; i++)
  {
    UISelectItem selectItem  = new UISelectItem();
    selectItem.setItemLabel("Item " + i);
    selectItem.setItemValue("" + i);
    menu.getChildren().add(selectItem);
  }

  UIViewRoot root = createTestTree(menu, "testRISelectOneMenu");
  renderRoot(root);

  root = createTestTree(menu, "testRISelectOneNavigation2");
  renderRoot(root);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:21,代码来源:CoreRenderKitPerf.java

示例3: createDeployment

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers
            .use(MavenDependencyResolver.class)
            .loadMetadataFromPom("pom.xml");

    return ShrinkWrap.create(WebArchive.class)
                .addClasses( HtmlSelectOneMenu.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
                .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
                .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
                .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
                .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
                .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
                .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
         /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
                .addPackage( SlotConnectionRepresenter.class.getPackage() )
                .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
                .addPackage( Slot.class.getPackage() )
                .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
                .addAsResource(new File("src/test/resources", "settops.catsrack"))
                .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
                .addPackage( SettopDesc.class.getPackage() )
                .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
                .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
                .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:27,代码来源:SettopControllerTest.java

示例4: getSelectRemoteType

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
/**
 * @return
 */
public HtmlSelectOneMenu getSelectRemoteType() {
	remoteDropDown = new HtmlSelectOneMenu();
	final Collection<SelectItem> list = new ArrayList<SelectItem>();

	initComponents();

	for (RemoteType r : this.remoteList) {
		list.add(new SelectItem(r.getRemoteTypeName()));
	}
	final UISelectItems items = new UISelectItems();
	items.setValue(list);
	remoteDropDown.getChildren().add(items);

	return remoteDropDown;
}
 
开发者ID:Comcast,项目名称:cats,代码行数:19,代码来源:KeyManager.java

示例5: getSelectKeyCodeFormat

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
/**
 * @return
 */
public HtmlSelectOneMenu getSelectKeyCodeFormat() {

	kcFormatDropDown = new HtmlSelectOneMenu();
	final Collection<SelectItem> list = new ArrayList<SelectItem>();

	initComponents();

	for (KeyCodeFormat kcf : this.kcfList) {
		list.add(new SelectItem(kcf.getKeyCodeFormatName()));
	}
	final UISelectItems items = new UISelectItems();
	items.setValue(list);
	this.kcFormatDropDown.getChildren().add(items);

	return kcFormatDropDown;
}
 
开发者ID:Comcast,项目名称:cats,代码行数:20,代码来源:KeyManager.java

示例6: processValueChange

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
/**
 * Process a value change.
 */
public void processValueChange(ValueChangeEvent event)
{
  if(!HtmlSelectOneMenu.class.isInstance(event.getSource()) ||
          event.getNewValue() == null || event.getNewValue().equals(event.getOldValue())){
      return;
  }
  HtmlSelectOneMenu selectOneMenu = HtmlSelectOneMenu.class.cast(event.getSource());
  if(selectOneMenu.getId() != null && selectOneMenu.getId().startsWith("allSubmissions")){
      processAllSubmissionsChange(event);
  }
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:15,代码来源:HistogramListener.java

示例7: makeSelectOneMenu

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
/**
 * Makes a Faces HtmlSelectOneMenu component for a parameter.
 * <p/>
 * The menu items are based upon the defined codes for the parameter.
 * @param context the UI context
 * @param section the parent section
 * @param parameter the associated parameter
 * @param onchange Javascript associated with the "onchange" event
 * @return the UI component
 */
protected HtmlSelectOneMenu makeSelectOneMenu(UiContext context,
                                              Section section,
                                              Parameter parameter,
                                              String onchange) {
  
  // initialize the component
  MessageBroker msgBroker = context.extractMessageBroker();
  HtmlSelectOneMenu component = new HtmlSelectOneMenu();
  component.setId(getFacesId());
  component.setDisabled(!getEditable());
  component.setOnchange(getOnChange());
  component.setOnclick(getOnClick());
  setComponentValue(context,component,parameter);
  onchange = Val.chkStr(onchange);
  if (onchange.length() > 0) {
    component.setOnchange(onchange);
  }
  
  // add each code as a SelectItem
  ArrayList<SelectItem> codeItems = new ArrayList<SelectItem>();
  Codes codes = parameter.getContent().getCodes();
  for (Code code: codes.values()) {
    String sResKey = code.getResourceKey();
    String sLabel = code.getKey();
    if (sResKey.length() > 0) {
      sLabel = msgBroker.retrieveMessage(sResKey);
    }
    codeItems.add(new SelectItem(code.getKey(),sLabel));
  } 
  UISelectItems uiItems = new UISelectItems();
  uiItems.setValue(codeItems);
  component.getChildren().add(uiItems);
  return component;
}
 
开发者ID:GeoinformationSystems,项目名称:GeoprocessingAppstore,代码行数:45,代码来源:InputSelectOneMenu.java

示例8: createDeployment

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    MavenDependencyResolver resolver = DependencyResolvers
            .use(MavenDependencyResolver.class)
            .loadMetadataFromPom("pom.xml");

    return ShrinkWrap.create(WebArchive.class)
        .addClasses(HtmlSelectOneMenu.class, DeviceSearchService.class, DeviceSearchServiceImpl.class, ConfigServiceConstants.class,AssertUtil.class,
                    DomainServiceException.class, DomainNotFoundException.class, SettopNotFoundException.class, YAMLUtils.class, Converter.class, SettopInfo.class, DevRack.class)
                    .addAsLibraries(resolver.artifact("org.yaml:snakeyaml:1.10").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("commons-lang:commons-lang:2.3").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("log4j:log4j:1.2.14").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("org.primefaces:primefaces:3.4.1").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("com.comcast.cats:ir-common:3.2.0.5").resolveAsFiles())
             /*     .addAsLibraries(resolver.artifact("org.jboss.spec.javax.faces:jboss-jsf-api_2.0_spec:1.0.0.Final").resolveAsFiles())*/
                    .addPackage( SlotConnectionRepresenter.class.getPackage() )
                    .addPackage( SettopSlotConfigServiceImpl.class.getPackage() )
                    .addPackage( Slot.class.getPackage() )
                    .addAsResource(new File("src/test/resources", "rackconfig.catsrack"))
                    .addAsResource(new File("src/test/resources", "settops.catsrack"))
                    .addAsResource(new File("src/test/resources", "settopTypes.catsrack"))
                    .addPackage( SettopDesc.class.getPackage() )
                    .addAsWebInfResource( new File("src/main/webapp/WEB-INF/beans.xml"))
                    .addAsWebInfResource( new File("src/main/webapp/WEB-INF/faces-config.xml"))
                    .setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:28,代码来源:DeviceSearchServiceTest.java

示例9: handleSlotSelectTest

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
@Test
public void handleSlotSelectTest(){
    settopController.setRackSelectOneMenu(new HtmlSelectOneMenu());
    settopController.setSlotSelectOneMenu(new HtmlSelectOneMenu());
    assertNotNull( settopController.getRackSelectOneMenu() );
    assertNotNull( settopController.getSlotSelectOneMenu() );
    settopController.handleSlotSelect(new ValueChangeEvent( new UIColumn(), null, rackService.findSlotByRack( RACK_1, 1) ));
}
 
开发者ID:Comcast,项目名称:cats,代码行数:9,代码来源:SettopControllerTest.java

示例10: getComboStatusManifestacao

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public HtmlSelectOneMenu getComboStatusManifestacao() {
    return comboStatusManifestacao;
}
 
开发者ID:culturagovbr,项目名称:GOG,代码行数:4,代码来源:MBManifestacao.java

示例11: setComboStatusManifestacao

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public void setComboStatusManifestacao(HtmlSelectOneMenu comboStatusManifestacao) {
    this.comboStatusManifestacao = comboStatusManifestacao;
}
 
开发者ID:culturagovbr,项目名称:GOG,代码行数:4,代码来源:MBManifestacao.java

示例12: getDayComponent

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public HtmlSelectOneMenu getDayComponent() {
    return dayComponent;
}
 
开发者ID:studentloanscompany,项目名称:ft-components,代码行数:4,代码来源:DatePickerComponent.java

示例13: setDayComponent

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public void setDayComponent(HtmlSelectOneMenu dayComponent) {
    this.dayComponent = dayComponent;
}
 
开发者ID:studentloanscompany,项目名称:ft-components,代码行数:4,代码来源:DatePickerComponent.java

示例14: getMonthComponent

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public HtmlSelectOneMenu getMonthComponent() {
    return monthComponent;
}
 
开发者ID:studentloanscompany,项目名称:ft-components,代码行数:4,代码来源:DatePickerComponent.java

示例15: setMonthComponent

import javax.faces.component.html.HtmlSelectOneMenu; //导入依赖的package包/类
public void setMonthComponent(HtmlSelectOneMenu monthComponent) {
    this.monthComponent = monthComponent;
}
 
开发者ID:studentloanscompany,项目名称:ft-components,代码行数:4,代码来源:DatePickerComponent.java


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