小编sbl*_*ndy的帖子

快速搜索java swing应用程序?

我在自己徘徊什么组件最适合在秋千中显示快速搜索结果.我想创建这样的东西,创建一个文本字段,用户可以在其中输入一些文本,在他进入期间我将改进后端快速搜索数据库,我想在文本框下面显示数据,他将能够浏览结果和输入结果将显示在表格中.所以我的问题是有没有任何组件已经有这个逻辑显示?或者不是,实现它的最佳方式是什么.

这个搜索将是ajax在网络上给我的东西,相同的逻辑相同的外观和感觉,如果它可以在桌面应用程序上.

java search swing

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

jquery datepicker

出于某种原因,我不能将其runat="server"用作输入标记的属性,以便jQuery显示图像按钮和工作.没有错误runat="server"吗?它工作正常.我希望格式为"yyyy/mm/dd",我也需要它用于服务器,因为这是我检查手动输入的日期是否是有效日期并且它与接受的格式匹配的地方.我真的想使用一个,asp:button但因为我不能使用runat="server"属性我不知道该怎么做,因为这是asp控件所必需的

<script language="javascript" type="text/javascript">

  $(document).ready(function(){
    $("#datepicker").datepicker({ showOn: "both", 
                                  buttonImage: "/Content/img/calendar.gif", 
                                  buttonImageOnly: true });
  }); 

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

jquery

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

Log4j API中的addAppender()方法存在问题

嗨,我正在使用log4j api进行日志记录.当我使用以下代码附加到appender时,它显示"addAppender()未定义为类型Logger"错误

FileAppender myAppender = new FileAppender(new PatternLayout(),"output.log");
Logger.getLogger(ConfigFileReader.class.getName()).addAppender(myAppender);
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我该怎么做才能调试此错误?

java log4j

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

是否可以将 char 与正则表达式进行比较?

我想检查单个字符是否与一组可能的其他字符匹配,因此我尝试执行以下操作:

str.charAt(0) == /[\[\]\.,-\/#!$%\^&\*;:{}=\-_`~()]/
Run Code Online (Sandbox Code Playgroud)

既然它不起作用,有没有正确的方法呢?

javascript regex

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

访问过的链接颜色变化

我有这门课:

.news_item_info 
{
    font-size: .7em; 
    color:#000000; 
    text-indent: 30px;
    a:link { color: #000000; }
    a:visited { color: #000000; }   
}
Run Code Online (Sandbox Code Playgroud)

这里有代码:

<div class="news_item_info">
    <?php echo $articles[$index]->getPoints(); ?> puntos por <span class="news_item_user"><a href="/index.php?action=user&param=<?php echo $articles[$index]->getUsername(); ?>">
    <?php echo $articles[$index]->getUsername(); ?></a> </span>
    <?php echo $articles[$index]->getElapsedDateTime(); ?> | <span class="comments_count"><a href="<?php echo "/index.php?action=comments&param=".$articles[$index]->getId(); ?>"><?php echo $articles[$index]->getNumberOfComments($articles[$index]->getId()); ?> comentarios</a></span>
</div>
Run Code Online (Sandbox Code Playgroud)

问题是,在我访问用户配置文件后,它显示为灰色,我想保持黑色.

如果有人知道答案我会很感激.

html css php

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

如何更新预先存在的Jar文件

我有一个WAR文件,我需要添加两个文件.目前,我这样做:

File war = new File(DIRECTORY, "server.war");
JarOutputStream zos = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(war)));

//Add file 1
File file = new File(DIRECTORY, "file1.jar");
InputStream is = new BufferedInputStream(new FileInputStream(file));
ZipEntry e = new ZipEntry("file1.jar");
zos.putNextEntry(e);
byte[] buf = new byte[1024];
int len;
while ((len = is.read(buf, 0, buf.length)) != -1) {
    zos.write(buf, 0, len);
}
is.close();
zos.closeEntry();

//repeat for file 2

zos.close();
Run Code Online (Sandbox Code Playgroud)

结果是前面的内容被破坏了:WAR只有我刚刚添加的2个文件.是否有某种追加模式,我没有使用或什么?

java jar

0
推荐指数
1
解决办法
2577
查看次数

方法调用Spring bean

我在Spring配置中声明了以下bean

<bean id="templateCacheClearingTask" class="org.springframework.scheduling.timer.ScheduledTimerTask">
    <property name="delay" value="5000" />
    <property name="period" value="5000" />

    <property name="timerTask">
        <bean class="org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean">
            <property name="targetObject" ref="templateMailService" />
            <property name="targetMethod" value="clearCache" />
        </bean>
    </property>
</bean>
Run Code Online (Sandbox Code Playgroud)

这应该导致每5000毫秒调用bean 的clearCache()方法templateMailService,但似乎没有发生任何事情.我错过了什么吗?

干杯,唐

java spring scheduled-tasks

0
推荐指数
1
解决办法
3523
查看次数

@Autowiring不在Field Level工作

@Autowiring 我没有在领域工作,我得到:

错误:

         SEVERE: StandardWrapper.Throwable
        org.springframework.beans.factory.BeanCreationException: 
    Error creating bean with name 'contactController': 
    Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private net.viralpatel.contact.service.ContactService net.viralpatel.contact.controller.ContactController.contactService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private net.viralpatel.contact.dao.ContactDAO net.viralpatel.contact.service.ContactServiceImpl.contactDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactDAOImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory net.viralpatel.contact.dao.ContactDAOImpl.sessionFactory; …

java spring spring-mvc autowired

0
推荐指数
1
解决办法
6369
查看次数

标签 统计

java ×5

spring ×2

autowired ×1

css ×1

html ×1

jar ×1

javascript ×1

jquery ×1

log4j ×1

php ×1

regex ×1

scheduled-tasks ×1

search ×1

spring-mvc ×1

swing ×1