When I was writing a program yesterday, I used the gridpanel of Jquery and Extjs and found that the scroll bar of the gridpanel was rolled in anyway ..
Later, the dynamic data was changed to static data, and the problem was finally solved. But the specific reason is not clear yet. Write out the solution for future use.
/**
* The first tab is selected by default.
*/
$ (Function (){
ShowBackRole ();
Change_option (1 );
});
ShowBackRole (); loads data into the GridPanel of Extjs.
Change_option (1); is to activate the first tab (place GridPanel In the second tab)
According to the above Code, it can be correctly executed, but if you put the two methods on hold for replacement, then the scroll bar will not display. I printed the GridPanel height and found no error.
The specific cause is not found, but the problem is solved.
Today, I encountered a problem when I used Jquery to write a form for submission. I used Jquery. form. js, the official jquery plug-in, to submit forms asynchronously using AJax.
/**
* Parameter settings
*/
Var options = {
Url: path + "user! AddBackRole. action ",
ContentType: "application/x-www-form-urlencoded; charset = UTF-8 ",
BeforeSubmit: beforeSubmit,
Success: afterSubmit
};
However, if I am in beforeSubmit, assign a value to a control in the form: $ ("# selectIds "). val (valueString), a null value is obtained in the action at the time of submission. I personally think it's a bug,
Therefore, we can only put it honestly in the save method of js to assign values.