是否有任何插件或替代方法在Netbeans 7上使用Google App Engine ?
google-app-engine netbeans netbeans-plugins netbeans-7 netbeans7.0
问题1) 我想知道轨道上的红宝石是否具有功能类似于primefaces的宝石.为什么我要问的是
如果你使用primefaces(http://www.primefaces.org/showcase-labs/ui/home.jsf),开发人员无需担心javascript或jquery的东西.
据我所知,JSF是一个规范,基于规范可用的各种实现,primefaces是这些实现的ui框架,primefaces有很多基于jquery和javascript库的组件.或多或少的primefaces只是作为一个javascript包装器.我使用primefaces,你主要专注于业务逻辑,不需要担心UI.
我受到红宝石轨道方法的启发,并且有很多宝石可供选择.
我的问题是,是否有可用于轨道上的ruby的gem或UI框架,类似于由primefaces驱动的UI魔术
注意:我不是在寻找纯粹的jquery或dojo东西,我正在寻找用于ruby on rails的UI组件驱动的东西.使用曲面工作项目的人和使用rails的项目将100%理解我的问题.
问题2) 我想知道与用户界面相关的宝石列表.我要问的是为了在轨道上的ruby上创建非常小众的用户界面需要什么东西(框架或宝石).
我是JSF的新手,在表单中显示条件部分时遇到一些奇怪的问题.
我的面孔:
<h:form id="animalForm">
<h:selectOneRadio id="animal" onchange="submit()" value="#{index.animal}">
<f:selectItem itemLabel="Cat" itemValue="1"/>
<f:selectItem itemLabel="Dog" itemValue="2"/>
</h:selectOneRadio>
</h:form>
<h:outputText value="#{index.animal}"/>
<c:if test="#{index.animal eq 1}">
<h:outputText value="Cat"/>
</c:if>
<c:if test="#{index.animal eq 2}">
<h:outputText value="Dog"/>
</c:if>
Run Code Online (Sandbox Code Playgroud)
还有我的豆子:
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean(name = "index")
@RequestScoped
public class IndexBean {
public static final int CAT = 1;
public static final int DOG = 2;
private int animal;
public IndexBean() {
}
public int getAnimal() {
return animal;
}
public void setAnimal(int animal) {
this.animal = …
Run Code Online (Sandbox Code Playgroud) 什么是或可能是最佳做法?
请解释一下,告诉我你的经历.
提前致谢...
什么是Google Closure解决this
JavaScript回调函数中关键字问题的解决方案.它在OO风格编程中非常有用.
在Google Closure中是否存在OOP的约定或样式?
更新 如何在ViewportSizeMonitor处理程序中访问this.darklayer ???
goog.require('goog.dom');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('goog.math.Size');
goog.require('goog.style');
goog.require('goog.dom.ViewportSizeMonitor');
goog.provide('ehsun7b.ajax.AjaxBox');
ehsun7b.ajax.AjaxBox = function (url, containerClass) {
try {
this.url = url;
this.containerClass = containerClass;
var viwportSize = goog.dom.getViewportSize();
this.darklayer = goog.dom.createDom("div", {
"style": "width: " + viwportSize.width + "px;" + "height: " +
viwportSize.height + "px;" +
"background-image: url('css/img/50black.png');" +
"z-index: 1000;" +
"position: absolute;" +
"left: 0px; top: 0px;"
});
var vsm = new goog.dom.ViewportSizeMonitor(); …
Run Code Online (Sandbox Code Playgroud) 首先,我需要说我在Google App Engine中没那么有经验.
我知道我们可以在GAE上部署RESTful Web服务(JERSEY)
而且我也知道RESTLET有一个专门针对GAE的版本.
我想从那些使用两种方法的人那里获得建议.
例如,为JERSEY配置GAE应用程序太困难或困难??? 或者例如使用RESTLET有什么缺点?还是太厚了(RESTLET)?
谢谢
我知道所有哈希函数的列表太长了.我只是想知道在日常IT实践任务中使用的最受欢迎的那些.我知道MD5,SHA1,SHA2(256和512)非常受欢迎.我可以为这5种算法添加其他哈希函数吗?
我想开发一个哈希工具,我只想包含那些开发人员真正需要的算法.
使用Google Closure库:
如何处理单击element
例如a div
但阻止event handler
在用户单击该元素的子元素时触发.
例如,在下面的代码中我想触发event handler
用户单击时,div1
但是当他/她单击"span1"时,我希望event handler
在不触发处理程序的情况下调用另一个div1
.
<div style="width: 400px" id="div1">
<span id="span1">click me to reload</span>
click here to Toggle accordion
</div>
Run Code Online (Sandbox Code Playgroud)
UPDATE
JS代码:
/**** accordion ***/
var panels = goog.dom.getElementsByClass('newsColumnHeader', goog.dom.getElement('accordionContainer'));
var anims = {};
var open = null;
goog.array.forEach(panels, function(pane){
var animation = new goog.ui.AnimatedZippy(pane, goog.dom.getNextElementSibling(pane));
goog.events.listen(animation, goog.ui.Zippy.Events.TOGGLE, zippyToggle);
anims[goog.getUid(animation)] = animation;
});
function zippyToggle(event) {
var uid = goog.getUid(event.target);
// simple …
Run Code Online (Sandbox Code Playgroud) javascript events javascript-events google-closure google-closure-library
但我无法根据组节点名称设置自定义打开/关闭图标,例如节点可以称为电子邮件(因此有一个包络图标很好)或者一组可能被称为任务等等.
我试图通过重写getTreeCellRendererComponent
类的方法来做到这一点DefaultTreeCellRenderer
但是改变icon
当前的电流node
只会影响下一个节点!
如何为各个组设置自定义打开/关闭图标?
请看一下我的代码:
Employee.java
package com.ehsunbehravesh.swing;
import java.util.Random;
public class Employee {
public String name;
public int id;
public boolean isBoss;
public Employee[] employees;
public Employee(String name, boolean isBoss) {
this.name = name;
this.isBoss = isBoss;
this.id = new Random(System.currentTimeMillis()).nextInt(Integer.MAX_VALUE);
}
@Override
public String toString() {
return this.name;
}
static String randomName() {
String chars = "abcdefghijklmnopqrstuvwxyz";
StringBuilder builder = new StringBuilder();
Random r = new Random(System.currentTimeMillis());
int length …
Run Code Online (Sandbox Code Playgroud) 我在Windows 2003上使用带有JDK 6u24的glassfish 3.0.1.当我启动服务器并尝试登录管理控制台(4848)时,我将收到以下错误消息:
[#|2011-02-24T12:59:37.578+0330|INFO|glassfish3.0.1|javax.enterprise.system.std.
com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=http-thread-pool-48
48-(2);|Cannot refresh Catalog : Connection timed out: connect|#]
Run Code Online (Sandbox Code Playgroud)
更新
[#|2011-02-24T12:58:51.343+0330|INFO|glassfish3.0.1|null|_ThreadID=24;_ThreadNam
e=Thread-23;|The Admin Console is already installed, but not yet loaded.|#]
[#|2011-02-24T12:58:51.343+0330|INFO|glassfish3.0.1|null|_ThreadID=24;_ThreadNam
e=Thread-23;|The Admin Console is loading...|#]
[#|2011-02-24T12:58:52.296+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Created HTT
P listener http-listener-1 on port 80|#]
[#|2011-02-24T12:58:52.296+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Created HTT
P listener http-listener-2 on port 8181|#]
[#|2011-02-24T12:58:52.296+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Created HTT
P listener admin-listener on port 4848|#]
[#|2011-02-24T12:58:52.343+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Created vir
tual server server|#]
[#|2011-02-24T12:58:52.343+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Created vir
tual server __asadmin|#]
[#|2011-02-24T12:58:53.531+0330|INFO|glassfish3.0.1|javax.enterprise.system.cont
ainer.web.com.sun.enterprise.web|_ThreadID=24;_ThreadName=Thread-23;|Virtual ser
ver server loaded system default web …
Run Code Online (Sandbox Code Playgroud) 我没有问题properties
从JSP
位于网站根目录(使用ResourceBundle
类)的文件加载和使用文件,但是当我尝试properties
从JSP
位于目录中的文件中加载相同的文件时,它失败并说无法找到资源!
位于目录中的页面代码
<%@page import="org.apache.log4j.Logger"%>
<%@page import="com.persiangulfcup.utility.LogUtils"%>
<%@page import="java.util.ResourceBundle"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
Logger logger = LogUtils.getLogger("page/contact");
ResourceBundle lbls = null;
ResourceBundle msgs = null;
try {
lbls = ResourceBundle.getBundle("labels");
msgs = ResourceBundle.getBundle("messages");
} catch (Exception ex) {
logger.fatal(ex);
}
%>
<div class="form">
<div style="text-align: left; font: normal bold 14px arial; cursor: pointer" onclick="contactBox.hide();">X</div>
<div style="padding-bottom: 10px;font-size: 14px; text-align: center"><%=msgs.getString("contactHeader")%></div>
<form id="frmContact" onsubmit="try {sendContact();} catch (e) {console.log(e)} return …
Run Code Online (Sandbox Code Playgroud) 我想知道当一个软件需要重启,关闭,注销或休眠Windows时,哪种方法最佳:
每种方法的优点和缺点是什么?
谢谢
java ×5
javascript ×2
jsf ×2
jsf-2 ×2
bind ×1
events ×1
facelets ×1
glassfish ×1
hash ×1
icons ×1
java-ee ×1
javabeans ×1
jersey ×1
jpedal ×1
jruby ×1
jsp ×1
jtree ×1
managed ×1
netbeans ×1
netbeans-7 ×1
netbeans7.0 ×1
oop ×1
pdf ×1
primefaces ×1
properties ×1
restlet ×1
ruby ×1
security ×1
shutdown ×1
swing ×1
this ×1
tomcat ×1
web-services ×1
winapi ×1
windows ×1