An integrated ext application without writing Javascript

Source: Internet
Author: User

I believe many people like ext but do not like JavaScript very much. One reason is that JavaScript is too flexible and powerful, so it is sometimes difficult to control it. Therefore, during the Spring Festival, modeled on the source code downloaded on the http://wlr.easyjf.com, based on easyjweb1.1, using the rich component technology to write a single user blog with William amraym function is exactly the same extjs integrated application, the difference is that manage is not required here. JS, core. JS, topic. javaScript and other JavaScript code. All components and custom controls are written in Java on the server.

This application demonstrates how to use Java code to write various controls of extjs, how to respond to various events, and how to integrate with the server. The advantages of using Java are in many aspects. Interested friends will gradually learn about it.

Application Example address: http://wlr2.easyjf.com
Source code: ftp://ftp1.easyjf.com/easyjweb/demo/blog2.zip
Extjs related technical information: http://wlr.easyjf.com
Online "extjs2.0 practical concise tutorial": http://www.easyjf.com/blog/html/20080217/1179671.html
About easyjweb1.1: http://www.easyjf.com/html/20080218/2424833.html http://wiki.easyjf.com/display/wiki/EasyJWeb

  Let's work together to support domestic open source and start from me.

Application:

(Log Category Management)

(Post-user management)

The code in adminloginaction logged on by the Administrator:

Public class adminloginaction extends richcomponentaction ...{
Public void doindex ()...{
Window win = new window ("win1", "Login System", 265,140 );
Win. setclosable (false );
Form F = new form ("FP ");
F. setlabelalign ("right ");
F. setlabelwidth (55 );
F. Set ("bodystyle", "padding-top: 6px ");
F. Set ("frame", true );
F. getdefaults (). Put ("width", 158 );
Textfield TF1 = new textfield ("username", "account ");
Tf1.set ("CLS", "user ");
Textfield TF2 = new textfield ("password", "password ");
Tf2.setinputtype ("password ");
Tf2.set ("CLS", "key ");
F. Add (TF1, TF2 );
Win. Add (f );
Function success = new actionfunction (
"Window. Location. href = 'Manage. ejf ';");
Function Failure = new actionfunction (
"Form. reset (); If (action. failuretype = ext. form. action. server_invalid) Ext. messageBox. alert ('Warning ', action. result. errors. MSG );");
Formaction action = new formaction ("Action1 ",
"Portal. EJF? Cmd = adminlogin ", success, failure );
Action. setwaitmsg ("Please wait ...");
Button B = new button ("login", new function (
"Var fp = ext. getcmp ('fp '); FP. Form. Submit (Action1 );"));
Button b2 = new button ("reset", new function (
"Var fp = ext. getcmp ('fp '); FP. Form. Reset ();"));
Win. addbuttons (B, B2 );
Win. Show ();
This. addcomponents (action, Win );
}
}

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.