小编Dal*_*ler的帖子

wicket @SpringBean无法创建bean

我有一个关于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?在我使用这个构造的任何其他地方,"服务"不是空的并且运行良好.请帮我解决这个问题.

java spring wicket

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

WPF DataGrid SelectedCellsChanged geting"父DataGrid上SelectionUnit属性的当前值阻止选择行."

请帮助我,我正在编写" 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)

c# wpf datagrid

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

Java,Hibernate,Spring

我有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)

java spring hibernate

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

Django filter_horizo​​ntal形式

在管理定义属性中,可以指定filter_horizo​​ntal,使用widget为ManyToMany字段创建很酷的javascript.我想在我的模型表单中使用这样的小部件.我怎么指定这个?

python django django-forms

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

Swing中的内存泄漏

应用程序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)

java swing memory-leaks

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

Wpf DataGrid添加新行

在底部的Wpf DataGrid中,有一个用于添加新行的"空白新行". 在此输入图像描述

当我开始添加新行(键入"空白新行")时,空白的新行将消失 在此输入图像描述
所以为了开始添加新行,我需要当前行的Tab Of(失去焦点).

当我添加新行时,如何使"空新行"出现在底部?

c# wpf datagrid

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

C# DynamicLinq where 子句与 Any()

我想用这样的字符串 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。

c# linq dynamic-linq

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

在 Wpf 和 Xamarin Forms 之间共享 IValueConverter

我正在创建将包含 Wpf 应用程序项目和 Xamarin Forms 移动应用程序的解决方案。我将代码的一些常见部分放入可移植类库中。是否可以创建 ValueConvertes 以便我可以在 Wpf 和 Xamarin 形式中使用它们?

wpf ivalueconverter xamarin.forms

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

wicket PageParameters编码

我的项目是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 wicket

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