我有一个快速项目,其中包含一个来自tableview的自定义单元格,在其中我有一个标签来显示UIPicker的值。当您按下标签时,UiPicker出现在键盘上,我无法将默认值设置为UIPicker,我尝试了两种不同的技术:
// file2.html
<!DOCTYPE html>
<html>
<head>
<title>Fusion Charts Column 2D Sample</title>
</head>
<body>
<div id="chart-container">FusionCharts will render here</div>
<script src="js/jquery-2.1.4.js" type="text/javascript"></script>
<script src="js/fusioncharts.js" type="text/javascript"></script>
<script src="js/fusioncharts.charts.js" type="text/javascript"></script>
<script src="js/themes/fusioncharts.theme.zune.js" type="text/javascript"></script>
<script src="js/atr1.js" type="text/javascript"></script>
</body>
</html>
,但没有成功,这是我的CustomCell代码:
selectRow()
答案 0 :(得分:3)
更新了您的代码。
您没有设置 pickerView.dataSource !
如果我理解你的问题,你希望默认选择一个元素,而不是索引0处的元素。
我还补充说。
2016-05-04 14:08:12,842 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry xml-apis.jar in /content/helloWorld.war/WEB-INF/lib/serializer-2.7.2.jar does not point to a valid jar for a Class-Path reference.
2016-05-04 14:08:12,890 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-core' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,890 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=3.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.spring.context.ApplicationContextExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=groovy-xml' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=2.4.6' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.codehaus.groovy.runtime.XmlGroovyMethods' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'staticExtensionClasses=' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-web-servlets-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,893 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.servlet.HttpServletRequestExtension,org.grails.web.servlet.HttpServletResponseExtension,org.grails.web.servlet.HttpSessionExtension,org.grails.web.servlet.ServletContextExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,893 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'grails.dev.commands.ApplicationCommand=org.grails.web.mapping.reporting.UrlMappingsReportCommand' for service type 'grails.factories'
2016-05-04 14:08:12,893 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-converters-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.converters.ConvertersExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-mimetypes-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.mime.HttpServletRequestExtension,org.grails.web.mime.HttpServletResponseExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=groovy-sql' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=2.4.6' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.codehaus.groovy.runtime.SqlGroovyMethods' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'staticExtensionClasses=' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-codecs' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=3.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.plugins.codecs.Base64CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.HexCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.MD5BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.MD5CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA1BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA1CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA256BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,901 WARN [org.jboss.as.ee] (MSC service thread 1-3) JBAS011071: Invalid signature for method initializeTagLibrary annotated with javax.annotation.PostConstruct on class grails.artefact.TagLibrary$Trait$Helper, signature must be 'void methodName(InvocationContext ctx)'
2016-05-04 14:08:13,130 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component grails.async.web.AsyncGrailsWebRequest due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,130 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,131 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,151 WARN [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016012: Deployment deployment "helloWorld.war" contains CDI annotations but beans.xml was not found.