我有一个关于Eclipse,Wicket,Spring,Hibernate的项目.除了:当我尝试时,每件事都是正常的
public class SortableContactDataProvider extends SortableDataProvider<User>
{
@SpringBean
private Service service;
public Iterator<User> iterator(int first, int count)
{
//SortParam sp = getSort();
return service.findAllUsers().subList(0, 15).iterator();
}
...
Run Code Online (Sandbox Code Playgroud)
服务变量是null?在我使用这个构造的任何其他地方,"服务"不是空的并且运行良好.请帮我解决这个问题.
请帮助我,我正在编写" WPF应用程序框架 "和EF Code First的应用程序.我正在尝试将选定行设置为ViewModels变量"SelectedRawMaterial",该变量绑定到DataGrids SelectedItem并引发异常:"父DataGrid上SelectionUnit属性的当前值阻止选择行."
private void rawMaterialTable_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
DataGridCell cell = null;
try
{
cell = DataGridHelper.GetCell(rawMaterialTable.SelectedCells[0]);
}
catch (Exception)
{ }
if (cell != null)
{
int i = DataGridHelper.GetRowIndex(cell);
try
{
RawMaterial rm = (RawMaterial)rawMaterialTable.Items[i];
ViewModel.SelectedRawMaterial = rm;
}
catch (Exception) { }
}
}
public static class DataGridHelper
{
public static DataGridCell GetCell(DataGridCellInfo dataGridCellInfo)
{
if (!dataGridCellInfo.IsValid)
{
return null;
}
var cellContent = dataGridCellInfo.Column.GetCellContent(dataGridCellInfo.Item);
if (cellContent != null)
{ …Run Code Online (Sandbox Code Playgroud) 我有2个实体用户和状态.我可以加载用户列表,并可以在控制台中看到它的sql(日志)
(选择this_.id为id0_0_,this_.cl_point_id为cl2_0_0_,this_.date_ll为date3_0_0_,this_.date_reg为date4_0_0_,this_.name为name0_0_,this_.passw_salt为passw6_0_0_,this_.status_id为status7_0_0_,this_.passw为passw0_0_, this_.login as login0_0_来自用户this_)
.但是当我加载Status时,列表为空,并且控制台中没有sql(log).我找不到问题在哪里?
User.java
package tj.eskhata.pos.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Entity
@Table(name="users")
public class User implements DomainObject {
@Id
private Long id;
@Column(name="name")
private String fullname;
@Column(name="cl_point_id")
private Long clPointId;
@Column(name="login")
private String wiaUsername;
@Column(name="passw")
private String wiaPassword;
@Column(name="status_id")
private Long statusId;
@Column(name="date_reg")
private Date dateReg;
@Column(name="date_ll")
private Date dateLl;
@Column(name="passw_salt")
private String passwSalt;
public User() {
}
public User(String username, String password, String fullname,
boolean isAdmin) {
this.id=Long.valueOf(1);
this.wiaUsername = username;
this.wiaPassword = password; …Run Code Online (Sandbox Code Playgroud) 在管理定义属性中,可以指定filter_horizontal,使用widget为ManyToMany字段创建很酷的javascript.我想在我的模型表单中使用这样的小部件.我怎么指定这个?
应用程序Swing(GUI),目的地是目的地信息终端.VirtualVM Profiler显示由于发生泄漏
java.awt.image.DataBufferInt
Run Code Online (Sandbox Code Playgroud)
и
sun.awt.image.ImageRepresentation.setPixels
Run Code Online (Sandbox Code Playgroud)
,在表单之间的转换期间发生内存的增加.
应用程序逻辑是有几种形式(JFrame - JF1,JF2 ... JF7).JF1基本形式,按JButtons打开其他形式,并自行关闭等.除了JF1,所有其他形式都有按钮<>.在表单中有许多带有图片的JButton,使用FancyButton:
public class FancyButton extends JButton {
private static final long serialVersionUID = 1L;
public FancyButton(Icon icon, Icon pressed) {
super(icon);
setFocusPainted(false);
//setRolloverEnabled(treue);
//setRolloverIcon(rollover);
setPressedIcon(pressed);
setBorderPainted(false);
setContentAreaFilled(false);
}
}
Run Code Online (Sandbox Code Playgroud)
表单上的JButton绘制如下:
public class JF1 extends JFrame {
private static final GridBagConstraints gbc;
public static Timer tmr;
public JF1() throws Exception{
setUndecorated(true);
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(this);
setAlwaysOnTop(true);
setLayout(new GridBagLayout());
setTitle("JF1");
}
public void init() throws Exception{
GlobalVars.jf2 = null;
GlobalVars.jf3 = null;
GlobalVars.jf4 = null; …Run Code Online (Sandbox Code Playgroud) 在底部的Wpf DataGrid中,有一个用于添加新行的"空白新行".

当我开始添加新行(键入"空白新行")时,空白的新行将消失

所以为了开始添加新行,我需要当前行的Tab Of(失去焦点).
当我添加新行时,如何使"空新行"出现在底部?
我想用这样的字符串 where 子句运行动态 linq:
query = db.Customers.Where("Categories.Any(Code == 'Retail')");
Run Code Online (Sandbox Code Playgroud)
客户实体具有类别集合
class Customer
{
public List<Category> Categories {get;set;}
...
}
class Category
{
public Guid Id {get;set;}
public string Code {get;set;}
}
Run Code Online (Sandbox Code Playgroud)
谁能告诉我有没有可能做这样的事情?
PS:我需要 where 子句是字符串。where 子句将在运行时生成,因此我不能使用 Linq 查询表达式。
我正在使用 Telerik DataAccess。
我正在创建将包含 Wpf 应用程序项目和 Xamarin Forms 移动应用程序的解决方案。我将代码的一些常见部分放入可移植类库中。是否可以创建 ValueConvertes 以便我可以在 Wpf 和 Xamarin 形式中使用它们?
我的项目是eclipse,Tomcat,Spring,Hibernate.在我的网络应用程序中,当我尝试去打扰webPage:
public void onSubmit()
{
String value="?";
PageParameters pars=new PageParameters();
pars.add("strname", value);
setResponsePage(FilterClient.class, pars);
}
Run Code Online (Sandbox Code Playgroud)
并在确定该参数后:
public FilterClient(final PageParameters parameters) {
String strName="";
if(parameters.containsKey("strname")){
strName=parameters.getString("strname");
}
Run Code Online (Sandbox Code Playgroud)
参数的值是
Д instead of ?
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.
java ×4
c# ×3
wpf ×3
datagrid ×2
spring ×2
wicket ×2
django ×1
django-forms ×1
dynamic-linq ×1
hibernate ×1
linq ×1
memory-leaks ×1
python ×1
swing ×1