小编Aru*_*hny的帖子

使用jquery在分页数据表中的延迟加载值

我正在尝试在我的项目中使用jquery数据表插件.它支持表中的ajax加载值.但我的问题是它是否支持延迟加载价值?表示如果表是分页的,我可以在请求时使用ajax加载每个页面所需的数据,而不是在页面启动时加载所有值吗?

现在我观察到的是,创建表时会加载页面所需的所有数据.如果页面必须处理大量数据并且在那个时间点没有使用它,则会产生问题.

如果这个插件无法处理,任何人都可以建议任何其他插件来支持这个要求.我需要一个支持分页和延迟加载内容的数据表.

javascript jquery jquery-plugins

6
推荐指数
1
解决办法
2万
查看次数

如何构建Twitter Bootstrap

我正在尝试从源代码构建Bootstrap.我在尝试运行make命令时抛出以下错误.

Running JSHint on javascript...             â Done
/bin/sh: 1: recess: not found
make: *** [build] Error 127
Run Code Online (Sandbox Code Playgroud)

这就是我到目前为止所做的

  1. 克隆引导存储库 git clone git://github.com/twitter/bootstrap.git
  2. 安装npm apt-get intall npm
  3. 少安装 npm install -g less
  4. 安装jshint npm install -g jshint
  5. 安装make apt-get install make

我在这里错过了什么?

makefile twitter-bootstrap

6
推荐指数
1
解决办法
2807
查看次数

如何使用Spring Web服务创建自定义soap故障消息

我正在尝试使用Spring Web服务库编写Web服务.我能够成功配置我的端点并且它工作正常,但我遇到了异常映射的一些问题.

我能够使用@SoapFault和SoapFaultAnnotationExceptionResolver映射异常,但wsdl定义如下

<xsd:schema elementFormDefault="qualified" targetNamespace="http://abc.com/soap/">
    <xsd:complexType name="ServiceException">
        <xsd:sequence>
            <xsd:element name="message" nillable="true" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ValidationException">
        <xsd:complexContent>
            <xsd:extension base="tns:ServiceException">
                <xsd:sequence/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="InternalException">
        <xsd:complexContent>
            <xsd:extension base="tns:ServiceException">
                <xsd:sequence/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="AuthenticationException">
        <xsd:complexContent>
            <xsd:extension base="tns:ServiceException">
                <xsd:sequence/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="LoginInput">
        <xsd:sequence>
            <xsd:element minOccurs="1" maxOccurs="1" name="UserName" nillable="false" type="xsd:string"/>
            <xsd:element minOccurs="1" maxOccurs="1" name="PassWord" nillable="false" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="LoginOutput">
        <xsd:sequence>
            <xsd:element minOccurs="1" maxOccurs="1" name="ValidTo" nillable="false" type="xsd:dateTime"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="login" type="tns:LoginInput"/>
    <xsd:element name="loginResponse" type="tns:LoginOutput"/>

    <xsd:element name="ValidationException" type="tns:ValidationException"/>
    <xsd:element …
Run Code Online (Sandbox Code Playgroud)

spring-ws

5
推荐指数
1
解决办法
2万
查看次数

Jquery迁移CDN后备条件

为了提高页面速度我使用谷歌CDN下载jquery文件,我也回退到从本地下载jquery谷歌CDN失败.

以下是使用后备的方法

<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='common/script/jquery-1.9.1.min.js' type='text/javascript'%3E%3C/script%3E"));
}

</script>
Run Code Online (Sandbox Code Playgroud)

上面的代码是完美的,我的问题是如何检查是否加载了jquery迁移文件?

我只需要检查是否加载了http://code.jquery.com/jquery-migrate-1.1.0.js.我希望if(typeof jQuery =='undefined'){}这不会在这里工作.

任何解决方案

jquery cdn google-cdn jquery-migrate

5
推荐指数
1
解决办法
2838
查看次数

按字母顺序对列表进行排序

我需要以角度,字母顺序(升序)对列表进行排序,但是如果要在列表末尾推送项目的前缀,则需要特殊字符.例如:列表应该像:

Apple
Banana
*Apple
Run Code Online (Sandbox Code Playgroud)

建议任何建议.

javascript jquery angularjs

5
推荐指数
1
解决办法
1662
查看次数

Play框架中的自定义logback转换器

我正在尝试添加一个自定义转换器(logging.logback.SchemaNameConverter)来进行logback配置,转换器使用了一个Http.Context.转换器放置在播放模块内.

java.lang.ClassNotFoundException: logging.logback.SchemaNameConverter
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at controllers.Application.list3(Application.java:106)
        at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$9$$anonfun$apply$9.apply(Routes.scala:349)
        at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$9$$anonfun$apply$9.apply(Routes.scala:349)
        at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:157)
        at play.core.routing.HandlerInvokerFactory$$anon$4.resultCall(HandlerInvoker.scala:156)
        at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$14$$anon$3$$anon$1.invocation(HandlerInvoker.scala:136)
        at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:73)
        at ActionCreator$1.call(ActionCreator.java:25)
        at org.pac4j.play.java.SecureAction.lambda$null$1(SecureAction.java:106)
        at org.pac4j.core.engine.DefaultSecurityLogic.perform(DefaultSecurityLogic.java:139)
        at org.pac4j.play.java.SecureAction.lambda$internalCall$2(SecureAction.java:101)
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
        at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:56)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:415)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Run Code Online (Sandbox Code Playgroud)

从我最初的诊断来看,问题在于类加载器.主应用程序ReloadableClassLoader(v1){file:.../target/scala-2.11/classes/}用于加载类应用程序,其中使用logback PlayDependencyClassLoader来加载其依赖项.由于转换器类在应用程序中,因此PlayDependencyClassLoader加载程序找不到它.

logback playframework playframework-2.0

5
推荐指数
0
解决办法
147
查看次数

如何使用jquery从除第一个表之外的表中删除所有<tr>

我有一张桌子,我想删除<tr>除第一张桌子以外的所有桌子.我怎样才能做到这一点.?

html jquery jquery-selectors

4
推荐指数
2
解决办法
5589
查看次数

JQuery验证插件maxlength?

我正在使用JQuery验证插件.我想指定maxlength其中一个字段.它可以指定如下.

rules: {
   Message: {
      required: false,
      maxLength: 200
   }
}
Run Code Online (Sandbox Code Playgroud)

但是我没有在外部定义规则,而是想在html输入代码中指定规则

相近 :

<input type="text" name="AssistanPhone" value="" class="required"  />
Run Code Online (Sandbox Code Playgroud)

在上面的例子中,"required"是通过类指定的.类似地,我如何指定jquery插件可以识别的maxlength,并在长度超过时给出错误消息?

谢谢!

html javascript jquery html5 jquery-validate

4
推荐指数
2
解决办法
2万
查看次数

使用jQuery更改工具提示标题

帮助我,因为我是jQuery和web开发的新手.我的要求是在文本框中椭圆化(...)长文本,然后如果鼠标悬停在它们上面,则在工具提示中显示全文.

为此,我使用了Bootstrap的工具提示.我做的是以下内容:

下载了bootstrap js并包含在我的文件中,如下所示:

 <script type="text/javascript" src="scripts/bootstrap.min.js"></script>        
Run Code Online (Sandbox Code Playgroud)

像这样改变了我的元素

<input type="text" name="tooltip" id="samplebox" data-toggle="tooltip" title="Ankit" >
Run Code Online (Sandbox Code Playgroud)

为了动态更新标题,我使用了jQuery

<script>
    $(document).ready(function(){
        $(" #samplebox ").mouseenter(function(){
            var word = document.getElementById("samplebox").value;
            $(" #samplebox ").attr('title', word);
        });     
    });
</script>
Run Code Online (Sandbox Code Playgroud)

这适用于那一个元素.

现在我必须为更多的文本框做同样的事情,其数量可以继续增加.现在,我想创建一个通用函数,我可以传递该元素的id,并将鼠标悬停在任何文本框上.

html javascript jquery

4
推荐指数
1
解决办法
2万
查看次数

带有@Bean 注释的 BeanPostProcessor 不起作用

我正在尝试创建一个BeanPostProcessor用于将一些值注册到 Map 的。

BeanPostProcessor,如果我通过创建XML定义bean实例工作正常,但如果我的bean定义更改为@Configuration它不工作。

后处理器

public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor {

  public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
      return bean;
  }

  public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
      System.out.println("Bean '" + beanName );
      return bean;
  }
}
Run Code Online (Sandbox Code Playgroud)

Bean 配置

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;

@org.springframework.context.annotation.Configuration
public class Configuration {
    @Bean
    public @Qualifier("InstantiationTracingBeanPostProcessor")
    InstantiationTracingBeanPostProcessor activitiConfigurationBeanPostProcessor() {
        return new InstantiationTracingBeanPostProcessor();
    }
}
Run Code Online (Sandbox Code Playgroud)

组件扫描配置

<context:component-scan base-package="xyz.config"/>
<context:annotation-config/>
Run Code Online (Sandbox Code Playgroud)

如果我使用上述配置,应用程序就会挂起。但是,如果我使用下面给出的基于 xml 的配置,它就可以正常工作。

<bean class="xyz.bean.InstantiationTracingBeanPostProcessor"/>
Run Code Online (Sandbox Code Playgroud)

我在这里做错了什么?

spring spring-ioc

3
推荐指数
2
解决办法
9299
查看次数