我正在学习如何在visual studio中使用kendo UI控件。以前我使用的是visual studio专业版,现在我已经切换到visual studio express 2012.由于某些原因,html控件似乎没有转换为Kendo UI控件。也没有错误消息。请告诉我哪里出错了。代码段附在下面。谢谢。
<?xml version="1.0" encoding="ISO-8859-1"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.globalplatform.jc</groupId>
<artifactId>helloworld</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>Hello World Java Card Applet</name>
<developers>
<developer>
<name>Karsten Ohme</name>
<id>k_o_</id>
<email>k_o_@users.sourceforge.net</email>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
<profiles>
<profile>
<id>default</id>
<properties>
<sourcedirectory>src/main/java</sourcedirectory>
<javacard.applet.name>HelloWorldApplet</javacard.applet.name>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jc.home>${env.JC_HOME}</jc.home>
<javacard.package.name>net.sourceforge.globalplatform.jc.helloworld</javacard.package.name>
<javacard.package.aid>0xD0:0xD1:0xD2:0xD3:0xD4:0xD5:0x01</javacard.package.aid>
<javacard.applet.aid>0xD0:0xD1:0xD2:0xD3:0xD4:0xD5:0x01:0x02</javacard.applet.aid>
<javacard.major.version>1</javacard.major.version>
<javacard.minor.version>0</javacard.minor.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun</groupId>
<artifactId>javacard</artifactId>
<version>2.2.2</version>
<scope>system</scope>
<systemPath>C:/java_card_kit-2_2_2/lib/api.jar</systemPath>
</dependency>
</dependencies>
<build>
<sourceDirectory>${sourcedirectory}</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<!-- Convert to cap file -->
<configuration>
<tasks>
<echo message="Converting to CAP file" />
<java classname="com.sun.javacard.converter.Converter"
failonerror="true" fork="true">
<arg value="-verbose" />
<arg value="-classdir" />
<arg value="target/classes/" />
<arg value="-applet" />
<arg value="${javacard.applet.aid}" />
<arg value="${javacard.applet.name}" />
<arg value="${javacard.package.name}" />
<arg value="${javacard.package.aid}" />
<arg value="${javacard.major.version}.${javacard.minor.version}" />
<arg value="-nowarn" />
<classpath>
<pathelement location="${jc.home}/api21_export_files" />
<pathelement location="${jc.home}/lib/apduio.jar" />
<pathelement location="${jc.home}/lib/apdutool.jar" />
<pathelement location="${jc.home}/lib/jcwde.jar" />
<pathelement location="${jc.home}/lib/converter.jar" />
<pathelement location="${jc.home}/lib/scriptgen.jar" />
<pathelement location="${jc.home}/lib/offcardverifier.jar" />
<pathelement location="${jc.home}/lib/capdump.jar" />
</classpath>
</java>
<copy todir="target/">
<flattenmapper />
<fileset dir="target/classes/">
<include name="**/*.cap" />
</fileset>
</copy>
<echo message="Transforming for Cyberflex"/>
<java jar="${jc.home}/lib/captransf.jar"
failonerror="true" fork="true">
<arg value="${jc.home}/api21_export_files/java/lang/javacard/lang.exp" />
<arg value="${jc.home}/api21_export_files/javacard/framework/javacard/framework.exp" />
<arg value="${jc.home}/api21_export_files/javacard/security/javacard/security.exp" />
<arg value="${jc.home}/api21_export_files/java/lang/javacard/lang.exp" />
<arg value="-s" />
<arg value="-noint" />
<arg value="target/${project.artifactId}.cap" />
</java>
</tasks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.2</source>
<target>1.1</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<!--useProjectReferences>false</useProjectReferences-->
<buildcommands>
<buildcommand> org.eclipse.jdt.core.javabuilder </buildcommand>
</buildcommands>
<projectnatures>
<projectnature> org.eclipse.jdt.core.javanature </projectnature>
</projectnatures>
<classpathContainers>
<classpathContainer> org.eclipse.jdt.launching.JRE_CONTAINER
</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>
答案 0 :(得分:1)
加载脚本和css的顺序有所不同,试试这个:
jquery需要运行kendo ui,所以它应该是第一个:
<script src="telerik.kendoui.professional.2015.3.1111.trial/js/jquery.min.js"></script>
<script src="telerik.kendoui.professional.2015.3.1111.trial/js/kendo.all.min.js"></script>
common.css也应该出现在默认主题之前:
<link href="telerik.kendoui.professional.2015.3.1111.trial/styles/kendo.common.min.css" rel="stylesheet" />
<link href="telerik.kendoui.professional.2015.3.1111.trial/styles/kendo.default.min.css" rel="stylesheet" />
答案 1 :(得分:0)
问题在于您抓取HTML元素的方式。
您的代码:
$(“txtFname”)...
您需要将上述代码更改为以下代码:
$( “#txtFname”)