Akdora’s Blog

Programming, Oracle, Life, Fun

Clear extJS combo value when text is cleared or doesn’t match October 11, 2011

Filed under: Non-technical — Akdora @ 12:58 pm
Tags: , , , , ,

Here is the scenario;
-Type something to combobox
-Select something on the list
-Search and fill gridPanel
-Clear combobox and then search again
-It fills gridPanel with value that before we cleared.
I this this is a bug.
If you use Ext.getCmp(‘myCombo’).getValue() or Ext.getCmp(‘myCombo’).lastSelectionText, it does not work.
You have to use Ext.getCmp(‘myCombo’).getRawValue(). This works 😉
By the way comboBox is not readonly.

 

How to find changed columns in EditorGridPanel, ExtJS? February 6, 2009

Filed under: ExtJS — Akdora @ 9:35 pm
Tags: , , , ,

While we are using EditorGridPanel, if we change some data, we see a red sign on the corner of the cell. If you want to get the changed or unchanged column info via javascript code, then read the following writing.
s
You may see the Editor Grid Example . Then, let’s we have a data record as following:

 var myRecord = new Ext.data.Record.create([
  {name:'vcompanyname', type: 'string'},
  {name:'vcompanybilladdress', type: 'string'},
  {name:'vcompanyaddress', type: 'string'},
  {name:'vcompanycontact', type: 'string'},
  {name:'vcompanyphone', type: 'string'},
  {name:'vcompanyemail', type: 'string'},
  {name:'vcompanytaxdept', type: 'string'},
  {name:'vcompanytaxno', type: 'string'}
  
]);
 (more...)
 

How to use Ext.Ajax.request with Response Text?

If we want to query something via ajax and show a response on the screen, we can use Ext.Ajax.request class of ExtJS. It provides a simple way to make Ajax requests with maximum flexibility. We will set the action url and get a response from action. Then, we will show the response on the screen. Let’s do it.

Firstly, I am writing the JSP page:

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<link rel="stylesheet" type="text/css" href="/xx/resources/extjs/css/ext-all.css">
<script type="text/javascript" src="/xx/resources/extjs/ext-base.js"></script>
<script type="text/javascript" src="/xx/resources/extjs/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function() {

 function fn_AKExt( message, title ){
   Ext.Msg.show({
      title: title,
      msg: message ,
      buttons: Ext.MessageBox.OK,
      icon: Ext.MessageBox.INFO
     });
 } (more...)
 

Live Combo Search with ExtJS February 4, 2009

Filed under: Ajax,ExtJS,Java,PL/SQL — Akdora @ 10:39 am
Tags: , , , , , , , , , , , , , , ,

Live Combo Search with ExtJS

 

If you trying to list thousands of data in a combobox, then you have a problem. I faced this problem a while ago. I was developing the presentation layer with ExtJS. ExtJS has a live search solution for this situation. Check the web page: http://extjs.com/deploy/dev/examples/form/forum-search.html

I will explain the whole story from beginning to end about this online dynamic checkbox control. I will use Oracle XE 10g, Java-Struts with JPS pages and ExtJS. We will pass the data with JSON. You may make some changes in the code. It all depends on you. My metod is just a suggestion.

 

Lets create a procedure that returns a cursor. It also takes an input parameter that’s our search string. We have 60000 rows in  table company. It is also recommended to create an Function-Based Index (FBI) on “lower(t. company_name)”.

s

(more…)

 

Isola Framework February 3, 2009

Filed under: News — Akdora @ 7:07 am
Tags: , , , , , ,

Turkcell Technology (the company I work for)  announced its first open source framework called Isola.

It depends on ExtJS layer. Since It is hard to write ExtJS without any tool. This framework makes it easier. You may write the code as java code. I wrote it in some project. It is really efficient. Thanks Infrastructure Team 😉 

You may check the web page : http://labs.turkcellteknoloji.com.tr/magnoliaPublic/isola.html