`
文章列表
Hibernate Example 查询不支持主键查询。如果一个po实例带有主键,不要用Example,Example的多条件组合查询还是比较方便,可以省去判断空值的情况。但是如果是要进行进行较复杂的or 或者 and 或者like 这样的查询,Example不方便。建议用QBC查询
上一期提到Flex3 自定义ClassFactory,让DataGrid动态改变Button或Image等属性。但后来发现,里面的icon都是预先定义好的才可以。如果是用户后来上传的图片,该怎么把这些图片动态运用到按钮上去?前面是用Embed绑定到一个Class上,但是这种代码我无法用AS动态写出来,比如讲Embed里面的source的值用一个变量来表示。后来同事提供了一个链接给我:http://blog.benstucki.net/?p=42,Ben Stucki 写了一个类IconUtility,里面有个static方法getClass返回了一个Class。有了它在运行时动态加载一个图片,换 ...
IconUtility Component for Dynamic Run-Time Icons I’ve seen a number of emails on the flexcoders mailing list and even a few blog posts that are asking a very specific question: “How do you use run-time loaded images as the icon for buttons, containers, and related components?”. The answer they’ve go ...
在Flex的DataGrid中显示按钮Button或者图片Image等,有时会需要Button的标签label,icon是动态改变的,DataGrid也是由Actionscript根据数据库中数据动态生成。这时我们需要自定义ClassFactory来实现这些特性。 package com.yonghong.model { import mx.core.ClassFactory; public class MyClassFactory extends ClassFactory {                   //styleCollection represents a collec ...
<?xml version="1.0" encoding="utf-8"?> <mx:Application name="DataGrid_textAlign_test"         xmlns:mx="http://www.adobe.com/2006/mxml"         layout="vertical"         initialize="init();"> <mx:Script>         <! ...
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > <mx:Script>   <![CDATA[    import mx.controls.Alert;   ]]> </mx:Script> <mx:Script>   <![CDATA ...
设置行(row)的背景色 主要是通过对DataGrid扩展,对protected函数drawRowBackground()进行重写,具体代码如下: override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number,color:uint, dataIndex:int):void {      if (dataIndex >= dataProvider.length) {          super.drawRowBackground(s,rowInde ...
Global site tag (gtag.js) - Google Analytics