Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSource And Sub-Select Problem

    Hello Team,
    I have some problem with datasource and sub-selects.

    My Env :
    1. SGWTEE 2.5 (Evaluation) - build Date - 2011-08-02
    2. GWT 2.3.0
    3. Firefox 5.
    4. OpenSuse 11.4
    5. jdk1.6.0_26
    6. Oracle DB 11g
    7. Eclipse Indigo (With GWT Plugin.)

    As usual when i want to use fetch operation, my datasource operation binding looks like :
    Code:
    <operationBinding operationId="SomeOperId" operationType="fetch">			
    	<selectClause>
    		t.someField1,
    		t.someField2,
    		................. 
    	</selectClause>
    	<tableClause>MySomeTable t</tableClause>
    	<whereClause>
    		 <![CDATA[
    			 t.someFieldAny like '%'||($criteria.someFieldAny)||'%'
    		 ]]>
    	</whereClause>
    </operationBinding>

    and when I look into logs i see thet default page size is 75. It's great for me.
    everything works fine.

    Now I want to write some sub-selects. and I don't know how to white sub-select's construction in this case.

    Now I decide to use customSQL. It looks like :

    Code:
    <operationBinding operationId="customOrgSearchForCallCenter" operationType="fetch">			
    	<customSQL>
          <![CDATA[
             select * from (
            	select   
            		t.someField1,
    				t.someField2,
    				t.someMasterFieldId,
    				t.someChildId,
    				t.someOrderField
    				.................
    		 from MySomeTable t
    		 where  
    		 		 t.someFieldAny like '%'||($criteria.someFieldAny)||'%'
    	 		)  tt
    	 	 start with tt.someMasterFieldId = 0
    		 connect by prior tt.someChildId = tt.someMasterFieldId
    		 order siblings by tt.someOrderField
           ]]>
         </customSQL>
    </operationBinding>

    Also Everything works fine except page size :(
    Select retrieves all database not 75. (Sometimes I see into logs for example fetching 2500 and more records)

    How I cant to Set page size for customSQL ?

    Code:
    listGrid.setDataPageSize(75);
    didn't helped me :(


    Or how I can write sub-select using selectClause, tableClause, whereClause ?
    Is there any example ?


    Any idea will appreciated.
    Thank's In advance.

    ______________
    Regards
    Paata Lominadze.

    #2
    As doc'd when you use <customSQL> by default we do not try to add SQL to do database-level paging. There doesn't appear to be an obstacle to breaking your SQL into separate <selectClause> et al overrides in this case.

    Comment

    Working...
    X