我们有一个建立在seam/richfaces上的系统.这个网页是从动态上下文(来自多个不同的数据源,每个都使用不同的布局来表示基本相同的真实世界概念)呈现的.结果,这个表被绑定到一个bean,它的列/布局是从这个bean生成的.
现在我需要在特定列上添加命令链接,相当于
<a4j:commandLink value="#{actBean.Ids}" action="#{actBean.genDetails}">
<f:setPropertyActionListener target="#{actBean.Ref}" value="#{cont}"/>
</a4j:commandLink>
Run Code Online (Sandbox Code Playgroud)
在JSF页面中.
该表绑定到托管bean
HtmlDataTable dataTable = new HtmlDataTable();
HtmlColumn column = new Column();
//some code to setup column name, value etcs
dataTable.getChildren().add(column);
//What do I do here to bind a commandlink with a property action
//listener to column?
Run Code Online (Sandbox Code Playgroud)
我的问题是,我该如何以编程方式执行此操作?
谢谢!
我正在尝试通过Java中的Hibernate帮助将数据保存到数据库.但当 ?运行代码,?有很多问题.任何人都可以帮助我吗?谢谢...
package org.ultimania.model;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
public class Test {
public static void main(String[] args) {
Session session = null;
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
session = sessionFactory.openSession();
Transaction transaction = session.getTransaction();
BusinessCard card = new BusinessCard();
card.setId(1);
card.setName("Özgür");
card.setDescription("Ac?klama");
try{
transaction.begin();
session.save(card);
transaction.commit();
} catch(Exception e){
e.printStackTrace();
}
finally{
session.close();
}
}
}
Run Code Online (Sandbox Code Playgroud)
问题 :
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: …Run Code Online (Sandbox Code Playgroud) 我试图使用这个正则表达式(JS):
/\/\*(.*)\*\//g
Run Code Online (Sandbox Code Playgroud)
取代
/*
sdandsads
*/
Run Code Online (Sandbox Code Playgroud)
没有.
但它不起作用!为什么?O_O
在bash中,当我回到历史记录中,编辑一些命令并运行它时,这个编辑过的命令会附加到历史记录中,原始命令将保持不变.但每隔一段时间我就会设法影响原始命令,即我的编辑会替换历史记录中的原始命令.我无法理解这是怎么发生的.谁能解释一下?我的目标是避免这种情况,因此对前一个命令的任何编辑总是会附加到历史记录中,并且永远不会替换原始命令.
我在使用基于模板的文件读取程序时遇到问题,例如:
bool parse(basic_ifstream<T> &file)
{
T ch;
locale loc = file.getloc();
basic_string<T> buf;
file.unsetf(ios_base::skipws);
if (file.is_open())
{
while (file >> ch)
{
if(isalnum(ch, loc))
{
buf += ch;
}
else if(!buf.empty())
{
addWord(buf);
buf.clear();
}
}
if(!buf.empty())
{
addWord(buf);
}
return true;
}
return false;
}
Run Code Online (Sandbox Code Playgroud)
这将在我实例化这个类时有效<char>,但在我使用时<wchar_t>(显然)有问题.
课外,我正在使用:
for (iter = mp.begin(); iter != mp.end(); ++iter )
{
cout << iter->first << setw(textwidth - iter->first.length() + 1);
cout << " " << iter->second << endl;
} …Run Code Online (Sandbox Code Playgroud) 我希望能够在每个查询的开头添加一个小注释,所以当我在进程列表或"mytop"中看到它时,我可以知道它在哪里运行.
这样的事情可能吗?
我有一个div,它应用了jQuery UI Draggable.我想要做的是点击并拖动它,并创建一个保存在dom中的克隆,并在删除时不删除.
想想一副牌,我的盒子元素是牌组,我想从牌组中拉出牌/ div并将它们放在我的页面周围,但它们将是原始div的克隆.我只是想确保你不能创建一个克隆的div的另一个克隆.
我使用了以下内容,它不像我想要的那样工作:
$(".box").draggable({
axis: 'y',
containment: 'html',
start: function(event, ui) {
$(this).clone().appendTo('body');
}
});
Run Code Online (Sandbox Code Playgroud)
我想出了我的解决方案:
$(".box-clone").live('mouseover', function() {
$(this).draggable({
axis: 'y',
containment: 'html'
});
});
$(".box").draggable({
axis: 'y',
containment: 'html',
helper: 'clone'
stop: function(event, ui) {
$(ui.helper).clone(true).removeClass('box ui-draggable ui-draggable-dragging').addClass('box-clone').appendTo('body');
}
});
Run Code Online (Sandbox Code Playgroud) 我正在编写一个Linux内核模块,我想分配一个可执行页面.普通的kmalloc在非可执行页面中返回一个指针,在那里执行代码时会出现内核恐慌.它必须适用于Ubuntu Karmic x86,2.6.31-20-generic-pae.
林将某个应用,我想它来当活动被打开的声音,声音文件是R.raw.sound_file,如果有人可以做一些示例代码,使我的应用程序播放的声音,将是巨大的.
我想知道在当前的rails3 master中是否完全破坏了基本的link_to语法,或者我是否在这里做了一些错误的语法.
= link_to "name", nil, :onlick => "alert('Hello world!');"
Run Code Online (Sandbox Code Playgroud)
实际上应该在点击时产生警报.非常简单.不适用于我的rails3项目!(也没有错误输出!)任何想法?
对于一般的link_to语法我无法找到一个例子在那里我可以一个link_to_remote与确认,遥控器和HTML类结合(见下文我试试)
= link_to "delete", {:action => "destroy", :remote => true, :method => :delete, :confirm => "#{a.title} wirklich Löschen?" }, :class => "trash"
Run Code Online (Sandbox Code Playgroud)
甚至rails3 api对我没有帮助:http://rails3api.s3.amazonaws.com/index.html
救命!
javascript ×3
java ×2
android ×1
audio ×1
bash ×1
c++ ×1
clone ×1
command-line ×1
executable ×1
file ×1
file-io ×1
hibernate ×1
interface ×1
jquery ×1
jquery-ui ×1
jsf ×1
link-to ×1
linux ×1
linux-kernel ×1
mysql ×1
nomachine-nx ×1
regex ×1
richfaces ×1
seam ×1
shell ×1
slf4j ×1
stream ×1
wav ×1
wchar-t ×1