国产99久久久国产精品,欧美大片在线观看一区二区,一区二区三区四区五区精品http://www.aygfsteel.com/qiuxing/一位學(xué)生轉(zhuǎn)向一位工作者zh-cnMon, 19 May 2025 00:12:50 GMTMon, 19 May 2025 00:12:50 GMT60VB.NET讀寫(xiě)INI配置文件http://www.aygfsteel.com/qiuxing/archive/2006/12/26/90113.html星星星星Tue, 26 Dec 2006 07:19:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/26/90113.htmlhttp://www.aygfsteel.com/qiuxing/comments/90113.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/26/90113.html#Feedback2http://www.aygfsteel.com/qiuxing/comments/commentRss/90113.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/90113.html? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
??????? Dim path As String
??????? path = Application.StartupPath + "\Send.ini"
??????? TextBox1.Text = GetINI("Send", "Send1", "", path)
??????? TextBox2.Text = GetINI("Send", "Send2", "", path)
??????? Dim IsSms As Integer = GetINI("Send", "IsSms", "", path)
??????? If (IsSms = 1) Then
??????????? Me.RadioButton1.Checked = True
??????? ElseIf (IsSms = 0) Then
??????????? Me.RadioButton2.Checked = True
??????? End If

??? End Sub
??? Public Function GetINI(ByVal Section As String, ByVal AppName As String, ByVal lpDefault As String, ByVal FileName As String) As String
??????? Dim Str As String = LSet(Str, 256)
??????? GetPrivateProfileString(Section, AppName, lpDefault, Str, Len(Str), FileName)
??????? Return Microsoft.VisualBasic.Left(Str, InStr(Str, Chr(0)) - 1)
??? End Function
??? Public Function WriteINI(ByVal Section As String, ByVal AppName As String, ByVal lpDefault As String, ByVal FileName As String) As Long
??????? WriteINI = WritePrivateProfileString(Section, AppName, lpDefault, FileName)
??? End Function
??? Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Int32, ByVal lpFileName As String) As Int32
??? Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Int32

?

??? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
??????? Try
??????????? Dim path As String
??????????? path = Application.StartupPath + "\Send.ini"
??????????? WriteINI("Send", "Send1", TextBox1.Text, path)
??????????? WriteINI("Send", "Send2", TextBox2.Text, path)
??????????? If (Me.RadioButton1.Checked = True) Then
??????????????? WriteINI("Send", "IsSms", 1, path)
??????????? ElseIf (Me.RadioButton2.Checked = True) Then
??????????????? WriteINI("Send", "IsSms", 0, path)

??????????? End If
??????????? MsgBox("配置設(shè)置已經(jīng)成功!!!!")


??????? Catch ex As Exception
??????????? MsgBox("錯(cuò)誤!!!!")
??????? End Try

??? End Sub



星星 2006-12-26 15:19 發(fā)表評(píng)論
]]>
AJAX實(shí)現(xiàn)web頁(yè)面中級(jí)聯(lián)菜單的設(shè)計(jì) http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87937.html星星星星Fri, 15 Dec 2006 06:09:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87937.htmlhttp://www.aygfsteel.com/qiuxing/comments/87937.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87937.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87937.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87937.html

看了大峽搞的級(jí)聯(lián)菜單,我也班門(mén)弄斧一把,嘿嘿,花了一點(diǎn)時(shí)間搞了個(gè)級(jí)聯(lián)菜單貼上來(lái)看看。本例中只要你選擇成員分類(lèi)名稱(chēng)就會(huì)自動(dòng)顯示成員名稱(chēng): 首先在eclipse中建一個(gè)項(xiàng)目,名稱(chēng)你自己做主了,這里為Easyjf-menu,對(duì)應(yīng)的瀏覽器頁(yè)面代碼為: Easyjf-menu.jsp

看了大峽搞的級(jí)聯(lián)菜單,我也班門(mén)弄斧一把,嘿嘿,花了一點(diǎn)時(shí)間搞了個(gè)級(jí)聯(lián)菜單貼上來(lái)看看。本例中只要你選擇成員分類(lèi)名稱(chēng)就會(huì)自動(dòng)顯示成員名稱(chēng):
?? 首先在eclipse中建一個(gè)項(xiàng)目,名稱(chēng)你自己做主了,這里為Easyjf-menu,對(duì)應(yīng)的瀏覽器頁(yè)面代碼為:
?Easyjf-menu.jsp
?<@page contentType=”text/html;charser=UTF-8” language=”java”%>
?<head>
?? ……..
?</head>
?<script language=”javascript”>
?? var XMLHttpReq;
?? var currentSort;
?? //創(chuàng)建xmlhttprequset對(duì)象
?? function createXMLHttpRequest(){
?? if(window.XMLHttpRequest){
?? XMLHttpReq=new XMLHttpRequest();
?}
else if (window.ActiveXObject){
??try{
??? ?XMlHttpReq=new ActiveXObject(“Msxml2.XMLHTTP”);
??? }catch(e){}
?????? try{
?XMLHttpRequest=new ActiveXObject(“Microsoft.XMLHTTP”);
}catch(e){}
}
}
//發(fā)送請(qǐng)求函數(shù)
function sendRequest(url){
?createXMLHttpRequest();
?XMLHttpReq.open(“GET”,url,true);
?XMLHttpReq.onreadystatechange=processResponse;
?XMLHttpReq.send(null);
}
//處理返回信息函數(shù)
function processResponse(){
?? if(XMLHttpRequest.readyState==4){
?? if(XMLHttpRequest.status==200){
?updateMenu();
}else{alert(“您請(qǐng)求的頁(yè)面有異常!”)}
}
}
//更新菜單函數(shù)
function updateMenu(){
?var res=XMLHttpReq.responseXML.getElementIdByTagName(“res”);
?var sunMenu=””;
?for(var i=0;i<res.length;i++){
?submenu=subMenu+res[1].fistChild.data+”<br>”;
}
currentSort.innerHTML=submenu;
}
//創(chuàng)建級(jí)聯(lián)菜單
function showSubMenu(obj){
?? currentSort=document.getElementById(obj);
?? currentSort.parentNode.style.display=””;
?? sendRequest(“menu?sort=”+obj);
}
</script>
<b>EasyJF成員</b>
<a onClick=”onShowSubMenu(‘大峽’)”>大峽</a>
, 該頁(yè)面中提供了對(duì)應(yīng)的菜單以供用戶(hù)選擇,用戶(hù)選擇菜單后,調(diào)用 showSubMenu(‘XXX’) 函數(shù),其中參數(shù)用于傳遞用戶(hù)所選菜單的標(biāo)識(shí)信息到服務(wù)器以決定獲取服務(wù)器的哪個(gè)在菜單內(nèi)容,首先獲得菜單的識(shí)別信息,再提交給 Ajax, 這里用 innerHTML 屬性實(shí)現(xiàn)定位顯示!



星星 2006-12-15 14:09 發(fā)表評(píng)論
]]>
一次編輯 GridView 的所有行http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87936.html星星星星Fri, 15 Dec 2006 06:06:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87936.htmlhttp://www.aygfsteel.com/qiuxing/comments/87936.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87936.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87936.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87936.html在平時(shí)的實(shí)際項(xiàng)目中,為了減少往返提交數(shù)據(jù),可以一次編輯 GridView 的所有行,這樣大大提高用戶(hù)使用產(chǎn)品的體驗(yàn)。下面就講解何一次編輯 GridView 的所有數(shù)據(jù)行。在下面的例子中,數(shù)據(jù)庫(kù)使用《ASP.NET 2.0應(yīng)用開(kāi)發(fā)技術(shù)》一書(shū)中Site\App_Data\下的 ASPNET20Book.mdb 數(shù)據(jù)庫(kù)。例子中的數(shù)據(jù)更新方式使用 SqlDataSource 數(shù)據(jù)源控件的UpdateCommand屬性,但此方法同樣適用于存儲(chǔ)過(guò)程,SQL 語(yǔ)句等。

C#?

<% @?Page?Language = " C# " ?Debug = " true " ? %>
<! DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< script? runat ="server" >
string[]?ClassNameArray?
= ?{? " 大學(xué) " ,? " 中學(xué) " ,? " 高中 " ?};

// 初始化原來(lái)的值
protected? void ?GridView1_RowDataBound(object?sender,?GridViewRowEventArgs?e)
{????
??
if ?(e.Row.RowType? == ?DataControlRowType.DataRow)
??{
????System.Data.DataRowView?drv?
= ?(System.Data.DataRowView)e.Row.DataItem;
????RadioButtonList?rbl?
= ?(RadioButtonList)e.Row.FindControl( " txtGender " );
????
if ?(rbl? != ? null )
????{
??????
if ?((bool)drv[ " Gender " ])
??????{
????????rbl.Items.FindByText(
" " ).Selected? = ? true ;
??????}
??????
else
??????{
????????rbl.Items.FindByText(
" " ).Selected? = ? true ;
??????}
????}

????DropDownList?ddl?
= ?(DropDownList)e.Row.FindControl( " txtClassName " );
????
if ?(ddl? != ? null )
????{
??????ddl.Items.FindByText(drv[
" ClassName " ].ToString()).Selected? = ? true ;
????}
??}
}

// ?初始化項(xiàng)目列表
protected? void ?GridView1_RowCreated(object?sender,?GridViewRowEventArgs?e)
{????
??
if ?(e.Row.RowType? == ?DataControlRowType.DataRow)
??{
????DropDownList?ddl?
= ?(DropDownList)e.Row.FindControl( " txtClassName " );
????ddl.DataSource?
= ?ClassNameArray;
????ddl.DataBind();
??}
}

// 處理提交的數(shù)據(jù)
protected? void ?XianhuiMeng_Click(object?sender,?EventArgs?e)
{
??foreach?(GridViewRow?gvr?
in ?GridView1.Rows)
??{
????string?tGender?
= ?((RadioButtonList)gvr.FindControl( " txtGender " )).SelectedValue;
????SqlDataSource1.UpdateParameters.Add(
new ?Parameter( " @Title " ,?TypeCode.String,?((TextBox)gvr.FindControl( " txtTitle " )).Text));
????SqlDataSource1.UpdateParameters.Add(
new ?Parameter( " @Gender " ,?TypeCode.Boolean,?(tGender? == ? " " ? ? ? " True " ?:? " False " )));
????SqlDataSource1.UpdateParameters.Add(
new ?Parameter( " @ClassName " ,?
???????????????????TypeCode.String,?((DropDownList)gvr.FindControl(
" txtClassName " )).SelectedValue));
????SqlDataSource1.UpdateParameters.Add(
new ?Parameter( " @id " ,?TypeCode.Int32,?GridView1.DataKeys[gvr.DataItemIndex].Value.ToString()));
????SqlDataSource1.Update();
????SqlDataSource1.UpdateParameters.Clear();
??}
??Response.Redirect(Request.UrlReferrer.ToString());
}
</ script >

< html? xmlns ="http://www.w3.org/1999/xhtml" >
< head? id ="Head1" ?runat ="server" >
< title > 同時(shí)編輯?GridView的?多行 </ title >
</ head >
< body >
< form? id ="form1" ?runat ="server" >
??
< asp:GridView? ID ="GridView1" ?runat ="server" ?Font-Size ="12px" ?CellPadding ="3" ?AutoGenerateColumns ="False"
????DataKeyNames
="id" ?DataSourceID ="SqlDataSource1" ?OnRowDataBound ="GridView1_RowDataBound"
????OnRowCreated
="GridView1_RowCreated" >
????
< HeaderStyle? BackColor ="#EDEDED" ? />
????
< Columns >
??????
< asp:TemplateField? HeaderText ="姓名" >
????????
< ItemTemplate >
??????????
< asp:TextBox? ID ="txtTitle" ?runat ="server" ?Text ='<%#Eval("Title")? % > '> </ asp:TextBox >
????????
</ ItemTemplate >
??????
</ asp:TemplateField >
??????
< asp:TemplateField? HeaderText ="性別" >
????????
< ItemTemplate >
??????????
< asp:RadioButtonList? ID ="txtGender" ?runat ="server" ?RepeatColumns ="2" >
????????????
< asp:ListItem? Text ='男' ></ asp:ListItem >
????????????
< asp:ListItem? Text ='女' ></ asp:ListItem >
??????????
</ asp:RadioButtonList >
????????
</ ItemTemplate >
??????
</ asp:TemplateField >
??????
< asp:TemplateField? HeaderText ="學(xué)歷" >
????????
< ItemTemplate >
??????????
< asp:DropDownList? ID ="txtClassName" ?runat ="server" >
??????????
</ asp:DropDownList >
????????
</ ItemTemplate >
??????
</ asp:TemplateField >
????
</ Columns >
??
</ asp:GridView >
??
< asp:SqlDataSource? ID ="SqlDataSource1" ?runat ="server" ?
????ConnectionString
="Provider=Microsoft.Jet.OLEDB.4.0;Data?Source=|DataDirectory|ASPNET20Book.mdb;Persist?Security?Info=True"
????ProviderName
="System.Data.OleDb" ?SelectCommand ="SELECT?*?FROM?[Student]" ?
????UpdateCommand
="Update?[Student]?Set?Title?=?@Title,Gender?=?@Gender,ClassName=@ClassName?Where?id=@id" >
??
</ asp:SqlDataSource >
??
< asp:Button? ID ="Button1" ?runat ="server" ?Text ="保存所有修改" ?OnClick ="XianhuiMeng_Click" ? />
</ form >
</ body >
</ html >

注意:對(duì)于SQL Server 數(shù)據(jù)庫(kù),參數(shù)名字不加@。另外注意:不同數(shù)據(jù)庫(kù)類(lèi)型和不同的數(shù)據(jù)源,UpdateCommand="Update [Student] Set Title = @Title,Gender = @Gender,ClassName=@ClassName Where id=@id"寫(xiě)法和SqlDataSource1.UpdateParameters.Add(new Parameter("@Title", TypeCode.String, ((TextBox)gvr.FindControl("txtTitle")).Text)); 的寫(xiě)法會(huì)有所區(qū)別。



星星 2006-12-15 14:06 發(fā)表評(píng)論
]]>
ASP.NET 2.0中將 GridView 導(dǎo)出到 Excel 文件中http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87935.html星星星星Fri, 15 Dec 2006 06:05:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87935.htmlhttp://www.aygfsteel.com/qiuxing/comments/87935.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87935.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87935.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87935.html閱讀全文

星星 2006-12-15 14:05 發(fā)表評(píng)論
]]>
struts、spring、hibernate等框架的整合培訓(xùn)日記 http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87934.html星星星星Fri, 15 Dec 2006 06:04:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87934.htmlhttp://www.aygfsteel.com/qiuxing/comments/87934.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87934.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87934.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87934.htmlfacade模式:就是中關(guān)村攢機(jī)者的角色,他負(fù)責(zé)與多個(gè)零件供銷(xiāo)商交互并將這些零件組裝起來(lái)交給最終客戶(hù)。
struts與spring集成的兩種方式:
第一種是在struts的Action的execute方法中調(diào)用spring的applicationContext去獲得Manager對(duì)象,這里的Action自身沒(méi)有用到spring的思想,Action無(wú)法作為Spring中的JavaBean進(jìn)行配置,相應(yīng)代碼如下:
????? ServletContext application = this.getServlet().getServletContext();
????? WebApplicationContext wapp = (WebApplicationContext)WebApplicationContextUtils.getWebApplicationContext(application);
???? //WebApplicationContext wapp = (WebApplicationContext)application.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
???? StudentManager studentManager = (StudentManager)wapp.getBean("studentManager");
? 另外,spring為集成struts而提供了一個(gè)ContextLoaderPlugIn插件,其作用在于:創(chuàng)建一個(gè)ApplicationContext對(duì)象,并將這個(gè)對(duì)象存儲(chǔ)在ServletContext中,以后在ActionSupport中就可以調(diào)用getWebApplicationContext來(lái)獲得這個(gè)ApplicationContext對(duì)象了,這并沒(méi)有讓我感覺(jué)有多大的好處,示例代碼如下:
??? Enumeration e = application.getAttributeNames();
??? while(e.hasMoreElements())
??? {
??????? String attributeName = (String)e.nextElement();
??????? String objClassName = application.getAttribute(attributeName).getClass().getName();
??????? try
??????? {
?????????? response.getWriter().println(attributeName + ":" + objClassName + "<br>");
??????? }catch(Exception ex){}
??? }
??? StudentManager studentManager = this.getWebApplicationContext().getBean("studentManager"));

第二種是將struts的Action作為spring的一個(gè)JavaBean進(jìn)行配置,在Action里面只需要定義一個(gè)Manager變量和相應(yīng)的setter/getter方法,就可以通過(guò)spring為其注入一個(gè)Manager對(duì)象。這種方式太復(fù)雜,很牽強(qiáng),個(gè)人覺(jué)得沒(méi)有什么實(shí)際意義,建議大家不必花費(fèi)時(shí)間去學(xué)習(xí)。

spring與hibernate整合的原理:
class MyController extend simpleformcontroller
{
?public MyController()
?{
??setCommandClass(Studnet.class);
?}
}
首先回憶使用hibernate的步驟:
1.創(chuàng)建和配置Configuration對(duì)象,配置Congiuration對(duì)象可以通過(guò)hibernate.properties或hiberate.cfg.xml文件,也可以完全采用如下的編程方式:
????? configuration = new Configuration()
????? configuration.addClass(Student.class)
???????????? //.addFile("Student.hbm.xml")
???????????? //.addResource("/Student.hbm.xml")
???????????? .setProperty("show_sql","true");
2.由configuration創(chuàng)建出SessionFactory對(duì)象:????????????
??? SessionFactory sf = configuration.buildSessionFactory();
3.通過(guò)SessionFactory獲得session對(duì)象,然后進(jìn)行CRUD操作:
??? Session session = sf.openSession();
??? session.save()\delete\update\load\
??? session.close();
使用spring集成hibernate的第一步就是借助spring的配置創(chuàng)建出SessionFactory對(duì)象
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
?<property name="mappingResource?>
??<list>
???<value>xx.hbm.xml</value>
???<value>yyy.hbm.xml</value>
??<list>
?</Property>
?<property name="hibernateProperties">
??<props>
???<prop key="show_sql">true</prop>
??<props>
?</property>
?<property name="datasource"><ref locale=""/></property>
</bean>
在LocalSessionFactoryBean內(nèi)部完全采用編程方式來(lái)配置configuration對(duì)象,而不再通過(guò)hibernate.properties或hiberate.cfg.xml配置文件,帶著大家查看了LocalSessionFactoryBean的源代碼。
有了SessionFactory,我們接著就可以通過(guò)spring將這個(gè)SessionFactory注入到DAO類(lèi)中,配置如下:
<bean id="studentDAO" class="cn.itcast.StudentDAO">
?<property name="sessionFactory">
??<ref bean="sessionFactory" />
?</property>
</bean>
相應(yīng)的調(diào)用程序代碼示意如下:
class StudentDAO
{
?sessionFactroy;
?void setSessionFactory(sessionFactory)
?{
??this.sessionFactory = sessionFactory;
?}
?insert(User user)
?{
??sessionFactory.openSession();//累
??session.save(user);
??session.close();//累
?}
}
我們還有自己openSession和getSession,這是不是很累呢?為此,spring又提供了一個(gè)配置類(lèi)hibernateTemplate,它可以幫助我們?nèi)penSession和closeSession,這個(gè)配置類(lèi)能夠openSession,顯然它一定要有SessionFactory的引用。
<bean id="hibernateTemplate" class="HibernateTemplate">
?<property name="sessionFactory">
??<ref bean="sessionFactory" />
?</property>
</bean>
遵循spring的IOC思想,我們接著還要將HibernateTemplate注入到DAO類(lèi)中,配置如下:
<bean id="studentDAO" class="cn.itcast.StudentDAO">
?<property name="hibernateTemplate">
??<ref bean="hibernateTemplate" />
?</property>
</bean>

class StudentDAO
{
?hibernateTemplate;
?void sethibernateTemplate(hibernateTemplate)
?{
??this.hibernateTemplate = hibernateTemplate;
?}
?insert(User user)
?{
??hibernateTemplate.save(user);//我們不再openSession和closeSession,不是很爽嗎?
?}
}

另外,spring還提供了一個(gè)HibernateSuport類(lèi),它可以通過(guò)注入的SessionFactory返回一個(gè)HibernateTemplate,我們的DAO類(lèi)繼承這個(gè)HibernateSupport,也可以獲得HibernateTemplate對(duì)象進(jìn)行CRUD操作,配置及示意代碼如下:
<bean id="studentDAO" class="cn.itcast.StudentDAO">
?<property name="sessionFactory">
??<ref bean="sessionFactory" />
?</property>
</bean>
class StudentDAO extends HibernateSuport
{
?/*hibernateTemplate;
?void gethibernateTemplate()
?{
??return hibernateTemplate;
?}
?sessionFactroy;
?void setSessionFactory(sessionFactory)
?{
??this.sessionFactory = sessionFactory;
??hibernateTemplate = new HibernateTemplate(sessionFactory);
?}*/
?
?
?insert(User user)
?{

??getHibernateTemplate().save(user);
?}
}

?

最后由王澤佑提問(wèn)引出spring mvc的注冊(cè)綁定的詳細(xì)講解:
在spring幫助文檔中搜索editor,可以看到有關(guān)注冊(cè)綁定的信息,CustomDateEditor是沒(méi)有被自動(dòng)注冊(cè)的,需要用戶(hù)在initBinder方法內(nèi)部調(diào)用,示例代碼如下:
protected void initBinder(
??????? HttpServletRequest request,
??????? ServletRequestDataBinder binder)
??????? throws ServletException {
??????? binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy/MM/dd"),true));
??? }
一種替換的方式及registerCustomEditor底層的實(shí)現(xiàn)內(nèi)幕:
調(diào)用BaseCommandController.setPropertyEditorRegistrars()方法,顯然這可以作為controller的屬性進(jìn)行配置。
class MyPropertyEditorRegistrar
{
?void registerCustomEditors(PropertyEditorRegistry registry)
?{
??reguistry.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor());
?}
}

關(guān)于Date數(shù)據(jù)校驗(yàn)的問(wèn)題:通過(guò)在struts幫助文擋的Validator幫助頁(yè)面中搜索validate,是可以搜索到DateValidator的配置幫助的。

如果注冊(cè)了DateEditor,數(shù)據(jù)成功轉(zhuǎn)換成Date類(lèi)型的字段,那么隨后的的Validator框架就沒(méi)必要對(duì)這個(gè)Date字段進(jìn)行校驗(yàn)了,因?yàn)閂alidator是對(duì)已裝配到Bean中的字符串類(lèi)型的字段進(jìn)行校驗(yàn),而數(shù)據(jù)都已經(jīng)成功裝配進(jìn)了Date字段中,哪還有校驗(yàn)的必要。框架把數(shù)據(jù)裝配到formbean里面,Validator從Formbean里面拿數(shù)據(jù)進(jìn)行校驗(yàn)。


<bean id="myController class="cn.itcast.MyController">
?<property key="commandClass">
??<value>cn.itcast.Student</value>
?</prperty>
</bean>
上面的配置信息相當(dāng)于下面的一段代碼,這其中就涉及到了屬性綁定的問(wèn)題,要把字符串"cn.itcast.Student"轉(zhuǎn)換成Class對(duì)象。
Class clazz = Class.forName("cn.itcast.Student");
setCommandClass(clazz);

小記:通過(guò)spring配置文件中的<import>元素的resource屬性可以導(dǎo)入更多的配置文件,實(shí)現(xiàn)信息分散配置的目的。?



星星 2006-12-15 14:04 發(fā)表評(píng)論
]]>
利用GridView顯示主細(xì)表并添加打開(kāi)、關(guān)閉功能的擴(kuò)展。http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87933.html星星星星Fri, 15 Dec 2006 06:02:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87933.htmlhttp://www.aygfsteel.com/qiuxing/comments/87933.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87933.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87933.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87933.html有網(wǎng)友在論壇上詢(xún)問(wèn):如何在使用GridView顯示主細(xì)表時(shí)添加刪除功能?其實(shí),如果單個(gè)GridView能夠?qū)崿F(xiàn)刪除對(duì)話(huà),N個(gè)GridView嵌套也沒(méi)有任何問(wèn)題。下面就將例子粘貼如下,望各位需要的朋友仔細(xì)揣摩一下,道理很簡(jiǎn)單的:)

查看例子

aspx?:

<% @?Page?Language = " C# " ?AutoEventWireup = " true " ?CodeFile = " Default2.aspx.cs " ?Inherits = " Default2 " ? %>

<! DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html? xmlns ="http://www.w3.org/1999/xhtml" >
< head? id ="Head1" ?runat ="server" >
??
< title > 利用GridView顯示主細(xì)表并添加打開(kāi)、關(guān)閉功能 </ title >
??
< style? type ="text/css" >
??td,div,a?
{ font-size : 12px }
??
</ style >

??
< script? type ="text/javascript" >
??
// <![CDATA[
?? function ?ShowHidden(sid,ev)
??{
????ev?
= ?ev? || ?window.event;
????
var ?target? = ?ev.target? || ?ev.srcElement;
????
var ?oDiv? = ?document.getElementById( " div " ? + ?sid);
????oDiv.style.display?
= ?oDiv.style.display? == ? " none " ? " block " : " none " ;
????target.innerHTML?
= ?oDiv.style.display? == ? " none " ? " 顯示 " : " 隱藏 " ;
??}
??
// ]]>
?? </ script >

</ head >
< body >
??
< form? id ="form1" ?runat ="server" >
????
< asp:GridView? ID ="MasterGridView" ?runat ="server" ?AutoGenerateColumns ="false" ?Width ="780px"
??????BorderWidth
="1" ?OnRowDataBound ="MasterGridView_RowDataBound" ?DataKeyNames ="id"
??????ShowHeader
="false" >
??????
< Columns >
????????
< asp:TemplateField >
??????????
< ItemTemplate >
????????????
< div? style ="width:?100%;?padding:?2px;?font-weight:?bold;?background-color:?#DEDEDE;
??????????????float:?left"
>
??????????????
< span? style ="float:?left" > 欄目名稱(chēng): <% # Eval ( " Title " )? %> </ span >< span? style ="float:?right;
????????????????color:?Red;?cursor:?pointer"
?onclick ="ShowHidden('<%#Eval(" id")?% > ',event)">隱藏 </ span ></ div >
????????????
< div? style ="background-color:?#FFF;?padding-left:?60px;?clear:?both" ?id ="div<%#Eval(" id")?% > ">
??????????????
< asp:GridView? ID ="DetailGridView" ?runat ="server" ?AutoGenerateColumns ="false" ?ShowHeader ="true"
????????????????HorizontalAlign
="left" ?DataKeyNames ="id" ?AutoGenerateDeleteButton ="true" ?OnRowCommand ="DetailGridView_RowCommand"
????????????????OnRowDeleting
="DetailGridView_RowDeleting" ?Width ="720px" >
????????????????
< HeaderStyle? BackColor ="#9999FF" ? />
????????????????
< Columns >
??????????????????
< asp:TemplateField? HeaderText ="文章名稱(chēng)" ?HeaderStyle-Width ="540px" >
????????????????????
< ItemTemplate >
??????????????????????
< a? href ="/article/<%#Eval(" objectGuid")?% > /read.aspx">
????????????????????????
<% # Eval ( " Title " )? %>
??????????????????????
</ a > [ <% #? Eval ( " HitCount " )? %> ]
????????????????????
</ ItemTemplate >
??????????????????
</ asp:TemplateField >
??????????????????
< asp:BoundField? HeaderText ="發(fā)布日期" ?DataField ="CreateDate" ?HtmlEncode ="false" ?DataFormatString ="{0:yyyy年MM月dd日}"
????????????????????HeaderStyle-Width
="100px" ?ItemStyle-HorizontalAlign ="Center" ? />
??????????????????
< asp:CommandField? DeleteText ="刪除" ?ShowDeleteButton ="true" ?ButtonType ="Button" ?HeaderStyle-Width ="40px" ? />
????????????????
</ Columns >
??????????????
</ asp:GridView >
????????????
</ div >
??????????
</ ItemTemplate >
????????
</ asp:TemplateField >
??????
</ Columns >
????
</ asp:GridView >
??
</ form >
</ body >
</ html >

?

C#:

using ?System;
using ?System.Data;
using ?System.Configuration;
using ?System.Collections;
using ?System.Web;
using ?System.Web.Security;
using ?System.Web.UI;
using ?System.Web.UI.WebControls;
using ?System.Data.OleDb;
using ?System.Web.UI.HtmlControls;

public ? partial ? class ?Default2?:?System.Web.UI.Page
{
??
string ?ConnectionString? = ? @" Provider=Microsoft.Jet.OLEDB.4.0;Data?Source=|DataDirectory|aspxWeb.mdb;Persist?Security?Info=True " ;
??OleDbConnection?cn1;


??
protected ? void ?Page_Load(? object ?sender,?EventArgs?e?)
??{
????
if ?( ! Page.IsPostBack)
????{
??????OleDbConnection?cn?
= ? new ?OleDbConnection(ConnectionString);
??????cn.Open();
??????cn1?
= ? new ?OleDbConnection(ConnectionString);
??????cn1.Open();
??????OleDbCommand?cmd?
= ? new ?OleDbCommand( " select?*?from?[Subject] " ,?cn);
??????OleDbDataReader?dr?
= ?cmd.ExecuteReader(CommandBehavior.CloseConnection);
??????MasterGridView.DataSource?
= ?dr;
??????MasterGridView.DataBind();
??????dr.Close();
??????cmd.Dispose();
??????cn.Dispose();
??????cn1.Dispose();
??????cn?
= ?cn1? = ? null ;
????}
??}
??
protected ? void ?MasterGridView_RowDataBound(? object ?sender,?GridViewRowEventArgs?e?)
??{
????
if ?(e.Row.RowType? == ?DataControlRowType.DataRow)
????{

??????GridView?oGridView?
= ?(GridView)e.Row.FindControl( " DetailGridView " );
??????
if ?(oGridView? != ? null )
??????{
????????OleDbCommand?cmd?
= ? new ?OleDbCommand( " select?top?10?*?from?Document?Where?pid?=? " ? + ?MasterGridView.DataKeys[e.Row.RowIndex].Value,?cn1);
????????OleDbDataReader?dr1?
= ?cmd.ExecuteReader();
????????oGridView.DataSource?
= ?dr1;
????????oGridView.DataBind();
????????dr1.Close();
????????cmd.Dispose();
??????}
????}
??}

??
protected ? void ?DetailGridView_RowDeleting(? object ?sender,?GridViewDeleteEventArgs?e?)
??{
????GridView?a?
= ?(GridView)sender;
????Response.Write(
" 您要?jiǎng)h除的記錄是:<font?color='red'> " ? + ?a.DataKeys[e.RowIndex].Value.ToString()? + ? " </font>&nbsp;&nbsp;&nbsp;&nbsp;TODO:執(zhí)行刪除動(dòng)作 " );
????
// ?TODO:執(zhí)行刪除動(dòng)作
??}
??
protected ? void ?DetailGridView_RowCommand(? object ?sender,?GridViewCommandEventArgs?e?)
??{

??}
}

注意:EnableViewState="true" 是必須的。



星星 2006-12-15 14:02 發(fā)表評(píng)論
]]>
ASP.NET 2.0中合并 GridView 的表頭單元格http://www.aygfsteel.com/qiuxing/archive/2006/12/15/87932.html星星星星Fri, 15 Dec 2006 06:00:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87932.htmlhttp://www.aygfsteel.com/qiuxing/comments/87932.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/12/15/87932.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/87932.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/87932.html閱讀全文

星星 2006-12-15 14:00 發(fā)表評(píng)論
]]>
[轉(zhuǎn)自李老師的博客]我很欣慰http://www.aygfsteel.com/qiuxing/archive/2006/11/21/82617.html星星星星Tue, 21 Nov 2006 14:03:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/11/21/82617.htmlhttp://www.aygfsteel.com/qiuxing/comments/82617.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/11/21/82617.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/82617.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/82617.html?????????也許是因?yàn)樯碓趯W(xué)校的緣故吧,竟然讓我這個(gè)年逾三十已久的老人還能在這里談技術(shù)。這也許也算是我能安心在這個(gè)并不肥沃的土地上依然耕耘不輟的原因之一吧。象牙塔里的技術(shù)畢竟純粹,沒(méi)有雜質(zhì),滿(mǎn)足自己十幾年的虛榮,可以幼稚地以為還停留在那個(gè)“程序員英雄”的時(shí)代。
?????????逝者如斯夫!

轉(zhuǎn)自:http://www.cnblogs.com/jplee/archive/2006/11/13/559612.html



星星 2006-11-21 22:03 發(fā)表評(píng)論
]]>
MyEclipse+struts+Hibernate配置開(kāi)發(fā) http://www.aygfsteel.com/qiuxing/archive/2006/11/13/80799.html星星星星Mon, 13 Nov 2006 00:30:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/11/13/80799.htmlhttp://www.aygfsteel.com/qiuxing/comments/80799.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/11/13/80799.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/80799.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/80799.html
  這個(gè)手冊(cè)只是為初學(xué)者制作的環(huán)境配置和快速開(kāi)發(fā)的一些基本方法,為的是廣大愛(ài)好者能快速上手,少走我走過(guò)的彎路,里面沒(méi)有任何關(guān)于java模式和其他相關(guān)的說(shuō)明。本人水平有限,也沒(méi)有能力去討論關(guān)于模式設(shè)計(jì)和開(kāi)發(fā)細(xì)節(jié)的一些內(nèi)容。

?

?

  建議:

  如果你還不清楚struts和hibernate的一些基本原理,希望能先去了解一下這方面的相關(guān)內(nèi)容。

  推薦:

  Hibernate中文手冊(cè)》作者認(rèn)為要學(xué)Hibernate看這個(gè)就足夠了,里面幾乎包括了所有的細(xì)節(jié),不過(guò)可能不太適合快速入門(mén)。

  地址:http://www.hibernate.org/hib_docs/v3/reference/zh- cn/html_single/

  關(guān)于struts的資料就很多了,這里推薦一個(gè)可以下載一些入門(mén)教程的網(wǎng)站。

  地址:http://www.wnetw.com/jclub/index.jsp

  強(qiáng)烈建議入門(mén)的朋友先了解一下基本的原理!否則本文可能對(duì)你沒(méi)有任何幫助。

  相關(guān)工具下載:(注意版本)

  mysql5.0 http://www.mysql.org
  eclipse 3.1.1 http://www.eclipse.org
  myeclipse4.0.3 http://www.myeclipseide.com
  tomcat5.5

  安裝:

  關(guān)于tomcat和mysql的安裝就不多說(shuō)了,需要注意的是最好保證你的 jdk是1.5的版本,并配置好你的環(huán)境變量,不然可能會(huì)遇到一些問(wèn)題。

  把eclipse解開(kāi),再去安裝剛下載的myeclipse,在安裝的時(shí)候需要把路徑指定到剛才解開(kāi)的eclipse上,由于myeclipse是個(gè)收費(fèi)軟件,所以需要注冊(cè)。不過(guò)一般按照Chinese的習(xí)慣,去google一個(gè)注冊(cè)碼就可以了:}

  開(kāi)發(fā)環(huán)境部署:

  好了,現(xiàn)在保證你的mysql和tomcat服務(wù)能夠正常啟動(dòng),myeclipse能夠正常打開(kāi)(如果不能,可以去找一下相關(guān)的說(shuō)明或者給作者留言)。下面我們就要開(kāi)始真正的開(kāi)始部署一個(gè)傳說(shuō)中的tomcat+struts+hibernate+mysql結(jié)構(gòu)的工程了!(faint!前言就寫(xiě)的我好累)

  首先,在myeclipse里新建一個(gè)工程。在左邊的Package Exporler面版里點(diǎn)右鍵選擇new->project…

  在跳出菜單里選擇MyEclipse->J2EE Projects->Web Project。

  點(diǎn)擊next后進(jìn)入如下畫(huà)面:


  工程名為:test

  結(jié)束后點(diǎn)擊Finish。

  好了,如果成功的話(huà)你就會(huì)在 Package Exporler里看到一個(gè)新的test工程!現(xiàn)在我們先配置一下數(shù)據(jù)庫(kù)方面的東西。首先在你的mysql 里建立一個(gè)數(shù)據(jù)庫(kù)webases,再在里面新建一個(gè)表admin,里面三個(gè)字段分別為id,name,password其中id為自動(dòng)取值的主鍵(mysql具體的操作可以自己找資料,不是本文涉及范圍)。

  再回到myeclipse ,選中window->Open Perspective->Other…

  可以看到現(xiàn)在跳出一個(gè)名為Select Perspective的菜單,在里面選中MyEclipse Databases Exporler,可以看到現(xiàn)在到了下面的頁(yè)面。

  按以上圖示輸入相關(guān)字段后點(diǎn)擊Finish便建立了一個(gè)數(shù)據(jù)庫(kù)連接,在新出現(xiàn)的JDBC for Mysql上點(diǎn)右鍵,選擇Open connection…,確認(rèn)用戶(hù)名和密碼正確后點(diǎn)OK,如果一切順利的話(huà)你會(huì)看到下面的畫(huà)面:

  這說(shuō)明你已經(jīng)和數(shù)據(jù)庫(kù)建立了正確的連接。現(xiàn)在我們?cè)倩氐絯indow->Open Perspective- >Other…里的MyEclipse,也就是我們剛進(jìn)來(lái)的時(shí)候看到的畫(huà)面。

  右鍵點(diǎn)擊你剛建立的工程 test并選擇MyEclipse->Add struts Capabilities…在跳出的菜單里按照如下輸入并確定:

  好了,現(xiàn)在你已經(jīng)為你的工程增加了struts,接下來(lái)和上面一樣在右鍵工程后選擇MyEclipse- >Add Hibernate Capabilities…一路確定下來(lái)為你的工程添加Hibernate。(為方便起見(jiàn)我們?cè)谶x擇路徑時(shí)把HibernateSessionFactory.java放在了src/com下面,其實(shí)最好建立個(gè)單獨(dú)的目錄如 src/com/hibernate)

  為了更好的演示我們不建立通常的登陸頁(yè)面而是建立個(gè)注冊(cè)頁(yè)面。選擇 src目錄下的hibernate.cfg.xml文件。照如下填寫(xiě)并保存。這樣hibernate就為你建立了數(shù)據(jù)庫(kù)的連接池。

  下面我們?cè)龠x擇WebRoot/WEB-INF/struts-config.xml文件,在畫(huà)面中點(diǎn)擊右鍵選擇new- >Form, Action and JSP。如下填寫(xiě)

  再選擇JSP選項(xiàng),如下

  最后選擇Finish。

  再新建一個(gè)一個(gè)success.jsp的頁(yè)面,

  在剛才struts- config.xml文件里右鍵選擇addAdmin選擇Properties,在菜單里選擇Forwords,再點(diǎn)add,如下圖填寫(xiě)

  最后你的struts-config.xml就是下面這個(gè)樣子:


  下面我們轉(zhuǎn)到hibernate。換到剛才我們建立數(shù)據(jù)庫(kù)的頁(yè)面,選擇你的admin的表點(diǎn)右鍵選擇Create Hibernate Mapping。選擇好打包路徑后選擇Finish。如圖:

  在你剛才選擇的路徑下(我為方便是src/com/yourcompanyname/)下新建立的文件 AdminDAOFactory.java文件并輸入以下內(nèi)容:

package com.yourcompanyname;

import java.util.Iterator;

import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;

import com.hibernate.SessionFactory;

public class AdminDAOFactory {
?Session session;
?Transaction tx;
?public void add(Admin admin) throws HibernateException {
??/**
?? * Creation Date: 11-17-2005
?? * TODO Add a new admin user.
?? * @param An object of Admin
?? * @return void
?? * @author Coder Guo
?? */
??try {
???session = SessionFactory.currentSession();
???tx = session.beginTransaction();
???//Add a new admin
???session.save(admin);
???tx.commit ();
??}catch(HibernateException e){
???throw e;
??}finally{
???if (tx!=null) {
????tx.rollback();
???}
???SessionFactory.closeSession();
??}
?}
}

?再打開(kāi)com.yourcompany.struts.action下的AddAdminAction.java添加(其中如果有錯(cuò)誤選中好按ctrl+shift+o自動(dòng)添加包)

public class AddAdminAction extends Action {

?// --------------------------------------------------------- Instance Variables

?// --------------------------------------------------------- Methods

?/**
? * Method execute
? * @param mapping
? * @param form
? * @param request
? * @param response
? * @return ActionForward
? * @author Coder Guo
? */
?public ActionForward execute(
??ActionMapping mapping,
??ActionForm form,
??HttpServletRequest request,
??HttpServletResponse response) {
??AddAdminForm addAdminForm = (AddAdminForm) form;
??
??// TODO Add a new admin
??Admin admin = new Admin();
??admin.setName(addAdminForm.getName ());
??admin.setPassword(addAdminForm.getPassword ());
??AdminDAOFactory adminDAO = new AdminDAOFactory ();
??adminDAO.add(admin);
??
??return mapping.findForward("success");
?}

}

?再打開(kāi)com.yourcompanyname.struts.form下的AddAdminForm.java,修改(如果有錯(cuò)誤按照上面說(shuō)的方法導(dǎo)入包)
?public ActionErrors validate(
??ActionMapping mapping,
??HttpServletRequest request) {

??// TODO Auto-generated method stub
??ActionErrors errors = new ActionErrors();
??
??Session session = SessionFactory.currentSession();
??Transaction tx = session.beginTransaction ();
??Query query = session.createQuery("select admin from Admin as admin where admin.name = '" + this.name + "'");
??Iterator it = query.iterate ();
??if (it.hasNext()){
???errors.add ("addAdmin.err.name",new ActionMessage("form.addAdmin.err.name"));
??}
??tx.commit();
??SessionFactory.closeSession ();
??return errors;
?}

?public void reset(ActionMapping mapping, HttpServletRequest request) {

??// TODO Auto-generated method stub
??this.name=null;
??this.password=null;
?}

  再打開(kāi)com\yourcompanyname\struts下的ApplicationResource.properties在這里面添加錯(cuò)誤信息:

Form.addAdmin.err.name=err

  最后,(汗,好累啊-_-!)打開(kāi)addAdmin.jsp修改成如下:

<%@ page contentType="text/html; charset=utf-8"%>
<%@ page language="java"%>
<%@ taglib uri="<%@ taglib uri="

<script language = "javascript">
<!--
function
check(){
?if (loginForm.userName.value == "" || loginForm.password.value == ""){
??alert("請(qǐng)輸入完整的信息!");
??loginForm.userName.focus();
??return false;
?}
}
//-->
</script>
?
?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
? <head>
??? <html:base />
???
??? <title>login.jsp</title>
??? <link href="css/webcss.css" rel="stylesheet" type="text/css">
???
??? <meta http-equiv="pragma" content="no- cache">
??? <meta http-equiv="cache-control" content="no- cache">
??? <meta http-equiv="expires" content="0">???
??? <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
??? <meta http- equiv="description" content="This is my page">
? </head>
?

? <body>
? <center>
? ?<p>&nbsp;</p>
? ?<p>&nbsp;</p>
? ?<table width="300" border="0" cellpadding="0" cellspacing="0">
? ?<html:form action="/addAdmin" focus="name" method="GET">
??? ?<tr align="center" valign="middle">
????? ?<td colspan="2" class="typt_normal">新增管理員</td>
??? ?</tr>
??? ?<tr>
????? ?<td width="100" align="center" valign="middle" class="typt_normal">名稱(chēng): </td>
????? ?<td width="200" align="left"><html:text property="name" styleClass="text_s"/><html:errors property="addAdmin.err.name"/></td>
??? ?</tr>
??? ?<tr>
????? ?<td width="100" align="center" valign="middle" class="typt_normal">密碼: </td>
????? ?<td width="200" align="left"><html:password property="password" styleClass="text_s"/></td>
??? ?</tr>
??? ?<tr>?
????? ?<td colspan="2" align="center" valign="middle"><html:submit value="提交" onclick="return check ();"/><html:reset value="重置"></html:reset></td>
????? ?</tr>
?</html:form>
? ?</table>
?</center>
?</body>

</html:html>

  其中可以看到如何在struts的標(biāo)簽中使用javascript的方法。

  配置好myeclipse于tomcat的連接。在window->Preferences做如下設(shè)定:

  在項(xiàng)目文件點(diǎn)右鍵->“myeclipse”->“Add and remove project deployment”,如下圖:

  好了,我們的配置工作基本結(jié)束了,在myeclipse上開(kāi)啟tomcat服務(wù)

  現(xiàn)在打開(kāi)瀏覽器,輸入

  http://127.0.0.1:8080/test/addAdmin.jsp就可以看到你的jsp頁(yè)面了!

?


星星 2006-11-13 08:30 發(fā)表評(píng)論
]]>
資源.Eclipse.相關(guān)插件下載地址http://www.aygfsteel.com/qiuxing/archive/2006/11/07/79709.html星星星星Tue, 07 Nov 2006 14:32:00 GMThttp://www.aygfsteel.com/qiuxing/archive/2006/11/07/79709.htmlhttp://www.aygfsteel.com/qiuxing/comments/79709.htmlhttp://www.aygfsteel.com/qiuxing/archive/2006/11/07/79709.html#Feedback0http://www.aygfsteel.com/qiuxing/comments/commentRss/79709.htmlhttp://www.aygfsteel.com/qiuxing/services/trackbacks/79709.htmlEMF,GEF - Graphical Editor Framework,UML2,VE - Visual Editor都在這里下載
http://www.eclipse.org/downloads/index.php

2? lomboz J2EE插件,開(kāi)發(fā)JSP,EJB
http://forge.objectweb.org/projects/lomboz

3? MyEclipse J2EE開(kāi)發(fā)插件,支持SERVLET/JSP/EJB/數(shù)據(jù)庫(kù)操縱等
http://www.myeclipseide.com

4? Properties Editor? 編輯java的屬性文件,并可以自動(dòng)存盤(pán)為Unicode格式
http://propedit.sourceforge.jp/index_en.html

5? Colorer Take? 為上百種類(lèi)型的文件按語(yǔ)法著色
http://colorer.sourceforge.net/

6? XMLBuddy 編輯xml文件
http://www.xmlbuddy.com

7? Code Folding? 加入多種代碼折疊功能(比eclipse自帶的更多)
http://www.coffee-bytes.com/servlet/PlatformSupport

8? Easy Explorer? 從eclipse中訪(fǎng)問(wèn)選定文件、目錄所在的文件夾
http://easystruts.sourceforge.net/

9? Fat Jar 打包插件,可以方便的完成各種打包任務(wù),可以包含外部的包等
http://fjep.sourceforge.net/

10? RegEx Test 測(cè)試正則表達(dá)式
http://brosinski.com/stephan/archives/000028.php

11? JasperAssistant 報(bào)表插件(要錢(qián)的哦~)
http://www.jasperassistant.com/

12? Jigloo GUI Builder JAVA的GUI編輯插件
http://cloudgarden.com/jigloo/

13? Profiler 性能跟蹤、測(cè)量工具,能跟蹤、測(cè)量B/S程序
http://sourceforge.net/projects/eclipsecolorer/

14? AdvanQas 提供對(duì)if/else等條件語(yǔ)句的提示和快捷幫助(自動(dòng)更改結(jié)構(gòu)等)
http://eclipsecolorer.sourceforge.net/advanqas/index.html

15? Log4E Log4j插件,提供各種和Log4j相關(guān)的任務(wù),如為方法、類(lèi)添加一個(gè)logger等
http://log4e.jayefem.de/index.php/Main_Page

16? VSSPlugin VSS插件
http://sourceforge.net/projects/vssplugin

17? Implementors 提供跳轉(zhuǎn)到一個(gè)方法的實(shí)現(xiàn)類(lèi),而不是接口的功能(實(shí)用!)
http://eclipse-tools.sourceforge.net/implementors/

18? Call Hierarchy 顯示一個(gè)方法的調(diào)用層次(被哪些方法調(diào),調(diào)了哪些方法)
http://eclipse-tools.sourceforge.net/call-hierarchy/index.html

19? EclipseTidy 檢查和格式化HTML/XML文件
http://eclipsetidy.sourceforge.net/

20? Checkclipse 檢查代碼的風(fēng)格、寫(xiě)法是否符合規(guī)范
http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm

21? Hibernate Synchronizer Hibernate插件,自動(dòng)映射等
http://www.binamics.com/hibernatesync/

22? VeloEclipse? Velocity插件
http://propsorter.sourceforge.net/?
?
23? EditorList 方便的列出所有打開(kāi)的Editor
http://editorlist.sourceforge.net/?
?
24? MemoryManager 內(nèi)存占用率的監(jiān)視
http://cloudgarden.com/memorymanager/?
?
25? swt-designer java的GUI插件
http://www.swt-designer.com/
?
26? TomcatPlugin 支持Tomcat插件
http://www.sysdeo.com/eclipse/tomcatPlugin.html
?
27? XML Viewer
http://tabaquismo.freehosting.net/ignacio/eclipse/xmlview/index.html
?
28? quantum 數(shù)據(jù)庫(kù)插件
http://quantum.sourceforge.net/
?
29? Dbedit 數(shù)據(jù)庫(kù)插件
http://sourceforge.net/projects/dbedit
?
30? clay.core 可視化的數(shù)據(jù)庫(kù)插件
http://www.azzurri.jp/en/software/index.jsp
http://www.azzurri.jp/eclipse/plugins
?
31? hiberclipse hibernate插件
http://hiberclipse.sourceforge.net
http://www.binamics.com/hibernatesync
?
32? struts-console Struts插件
http://www.jamesholmes.com/struts/console/
?
33? easystruts Struts插件
http://easystruts.sourceforge.net?
?
34? veloedit Velocity插件
http://veloedit.sourceforge.net/
?
35? jalopy 代碼整理插件
http://jalopy.sourceforge.net/
?
36? JDepend 包關(guān)系分析
http://andrei.gmxhome.de/jdepend4eclipse/links.html
?
37? Spring IDE Spring插件
http://springide-eclip.sourceforge.net/updatesite/
?
38? doclipse 可以產(chǎn)生xdoclet 的代碼提示
http://beust.com/doclipse/

39? SQLExplorer,在Eclipse 中連接各種數(shù)據(jù)庫(kù)進(jìn)行操作使用
http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124&threadID=31124

JSEclipse

插件主頁(yè):http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/
插件介紹:JSEclipse是個(gè)Eclipse下的免費(fèi)Javascript腳本編輯器

subversion
版本控制,相當(dāng)于CVS
安裝:http://subclipse.tigris.org/install.html
Name: Subclipse
URL:? http://subclipse.tigris.org/update_1.0.x


CSS Editor for Eclipse
http://csseditor.sourceforge.net/

FacesIDE
FacesIDE是一個(gè)用于開(kāi)發(fā)JSF的Eclispe插件.它可以可視化編輯faces-config.xml文件并且提供代碼編輯與校驗(yàn),預(yù)覽JSF的JSP文件.FacesIDE包含MyFaces來(lái)作為JSF的實(shí)現(xiàn)
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE

Eclipse SQLExplorer plugin
一個(gè)數(shù)據(jù)庫(kù)管理插件
http://sourceforge.net/projects/eclipsesql

Poperties Editor
一個(gè)在編輯完成后可以將資源文件中的中文編碼格式轉(zhuǎn)換為unicode編碼的插件,在開(kāi)發(fā)國(guó)際化應(yīng)用程序的時(shí)候非常有用
http://propedit.sourceforge.jp/eclipse/updates/

eclipseME
?
http://eclipseme.org/updates/

Eclipse加速插件KeepResident
http://suif.stanford.edu/pub/keepresident/

?
MyEclipse? J2EE開(kāi)發(fā)插件,支持SERVLET/JSP/EJB/數(shù)據(jù)庫(kù)操縱等
www.myeclipseide.com
?
Properties Editor? 編輯java的屬性文件,并可以自動(dòng)存盤(pán)為Unicode格式
http://propedit.sourceforge.jp/index_en.html
http://propedit.sourceforge.jp/eclipse/updates/
?
Colorer Take? 為上百種類(lèi)型的文件按語(yǔ)法著色
http://colorer.sourceforge.net/
?
XMLBuddy 編輯xml文件
www.xmlbuddy.com
?
Code Folding? 加入多種代碼折疊功能(比eclipse自帶的更多)
http://www.coffee-bytes.com/servlet/PlatformSupport
?
Easy Explorer? 從eclipse中訪(fǎng)問(wèn)選定文件、目錄所在的文件夾
http://easystruts.sourceforge.net/
?
Fat Jar 打包插件,可以方便的完成各種打包任務(wù),可以包含外部的包等
http://fjep.sourceforge.net/
?
RegEx Test 測(cè)試正則表達(dá)式
http://brosinski.com/stephan/archives/000028.php
?
JasperAssistant 報(bào)表插件(強(qiáng),要錢(qián)的)
http://www.jasperassistant.com/
?
Jigloo GUI Builder JAVA的GUI編輯插件
http://cloudgarden.com/jigloo/
?
Profiler 性能跟蹤、測(cè)量工具,能跟蹤、測(cè)量BS程序
http://sourceforge.net/projects/eclipsecolorer/
?
AdvanQas 提供對(duì)if/else等條件語(yǔ)句的提示和快捷幫助(自動(dòng)更改結(jié)構(gòu)等)
http://eclipsecolorer.sourceforge.net/advanqas/index.html
?
Log4E???? Log4j插件,提供各種和Log4j相關(guān)的任務(wù),如為方法、類(lèi)添加一個(gè)logger等
http://log4e.jayefem.de/index.php/Main_Page
?
VSSPlugin VSS插件
http://sourceforge.net/projects/vssplugin
?
Implementors?? 提供跳轉(zhuǎn)到一個(gè)方法的實(shí)現(xiàn)類(lèi),而不是接中的功能(實(shí)用!)
http://eclipse-tools.sourceforge.net/implementors/
?
Call Hierarchy 顯示一個(gè)方法的調(diào)用層次(被哪些方法調(diào),調(diào)了哪些方法)
http://eclipse-tools.sourceforge.net/call-hierarchy/index.html
?
EclipseTidy 檢查和格式化HTML/XML文件
http://eclipsetidy.sourceforge.net/
?
Checkclipse 檢查代碼的風(fēng)格、寫(xiě)法是否符合規(guī)范
http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm
?
Hibernate Synchronizer Hibernate插件,自動(dòng)映射等
http://www.binamics.com/hibernatesync/
?
spring updatesite 插件
http://springide.org/updatesite/

VeloEclipse? Velocity插件
http://propsorter.sourceforge.net/
?
EditorList?? 方便的列出所有打開(kāi)的Editor
http://editorlist.sourceforge.net/
?
MemoryManager 內(nèi)存占用率的監(jiān)視
http://cloudgarden.com/memorymanager/

Eclipse的游戲插件
http://eclipse-games.sourceforge.net/

JBoss-IDE
http://jboss.sourceforge.net/jbosside/updates/

自動(dòng)反編譯class,安裝后要設(shè)定class文件缺省關(guān)聯(lián)到j(luò)ode
http://www.technoetic.com/eclipse/update


jigloo swing/sw設(shè)計(jì)工具,里面自帶的form/anchor布局很好用!
http://cloudgarden.soft-gems.net/update-site/

jinto的資源文件編輯工具,同時(shí)編輯多種語(yǔ)言,而且自動(dòng)轉(zhuǎn)換成iso8859-1編碼。很好用!
http://www.guh-software.de/eclipse/



星星 2006-11-07 22:32 發(fā)表評(píng)論
]]>
主站蜘蛛池模板: 沐川县| 右玉县| 遵义县| 永吉县| 商丘市| 天峻县| 綦江县| 鲁山县| 南平市| 磐石市| 游戏| 林芝县| 兴宁市| 宜春市| 松江区| 富川| 海盐县| 藁城市| 高密市| 浦江县| 合山市| 安泽县| 嘉鱼县| 昌黎县| 山东省| 康马县| 深水埗区| 秭归县| 金沙县| 崇礼县| 微山县| 凤庆县| 疏附县| 天津市| 濉溪县| 武川县| 积石山| 高台县| 安塞县| 新乡市| 桦甸市|