Announcement

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

    ListGrid advancedFieldPicker is unable to add fields where detail='true'

    I sort of fell into the new advancedFieldPicker by accident, as did this guy. Nice feature, and we'd like to use it, but:

    Fields having 'detail' attributes set to true are shown in the 'Available Fields' panel, can be selected and added to the 'Current Fields' panel, but the 'Save' action has no effect. The field is not added, nor is it in the 'Current Fields' list on subsequent attempts.

    No output in the Developer Console.

    Tested with 3.1.d20120807.

    Code:
    <!-- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -->
    
    <DataSource xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt"
        ID="Order"  
        serverType="sql"
        autoDeriveSchema="true"
        tableName="MASTERDETAIL_ORDER" >  
        
        <fmt:setBundle basename="com.islandpacific.testcase.shared.datasources.Order"/>
        
        <fields>  
            <field name="ORDERID" type="sequence" primaryKey="true" canEdit="false">
                <title><fmt:message key="orderId.title"/></title>
                <prompt><fmt:message key="orderId.prompt"/></prompt>
            </field>
            <field name="CUSTOMERNAME">
                <title><fmt:message key="customerName.title"/></title>
                <prompt><fmt:message key="customerName.prompt"/></prompt>
            </field>
            <field name="ORDERDATE">
                <title><fmt:message key="orderDate.title"/></title>
                <prompt><fmt:message key="orderDate.prompt"/></prompt>
            </field>
            <field name="TRACKINGNUMBER" detail="true">
                <title><fmt:message key="trackingNumber.title"/></title>
                <prompt><fmt:message key="trackingNumber.prompt"/></prompt>
            </field>
        </fields>  
          
    </DataSource>
    Code:
    public final class TestCaseEntryPoint implements EntryPoint {
    
    	public void onModuleLoad() {
    
    		VLayout layout = new VLayout();
    		layout.setWidth100();
    		layout.setHeight100();
    		
    		DataSource orderDS = DataSource.get("Order");
    		DataSource itemDS = DataSource.get("OrderItem");
    
    		ListGrid grid = new MyListGrid();
    		grid.setDataSource(orderDS);
    			
    		layout.addMembers(grid);
    		
    		layout.draw();
    
    		/*
    		 * enable the sgwt debug console in development mode
    		 */
    		if (!GWT.isScript()) {
    			KeyIdentifier debugKey = new KeyIdentifier();
    			debugKey.setCtrlKey(true);
    			debugKey.setAltKey(true);
    			debugKey.setKeyName("D");
    			Page.registerKey(debugKey, new KeyCallback() {
    				public void execute(String keyName) {
    					SC.showConsole();
    				}
    			});
    		}
    
    	}
    
    	
    	class MyListGrid extends ListGrid {
    		public MyListGrid() {
    			setAttribute("useAdvancedFieldPicker", true, false);
    			setAttribute("advancedFieldPickerThreshold", 1, false);
    		}
    	}
    	
    }

    #2
    This has been fixed in the latest development stream. It should be in the next build (SC 8.3d/SGWT 3.1d).

    Comment

    Working...
    X