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

    Bug using Timeline. Opening Dialog causes infinite fetches of t/sc/skins/Tahoe/images/blank.gif

    On a client containing only a Timeline, opening an an event edit dialog, my browser gets hosed by constantly requesting /sc/skins/Tahoe/images/blank.gif. HELP!!!!!!!

    SmartGWT 12.1d
    + gwtquery-1.4.0
    Chrome 77.0.3865.120

    = Robert =

    We're not seeing this with a simple test or in our Showcase.

    You didn't mention your SGWT build-date, but if it isn't the latest nightly build from, the first step is to get that build and re-test.

    If you still see the problem, we'll need to see test-code we can run that shows the problem.
    Last edited by Isomorphic; 25th Oct 2019, 22:50.


      Ok i stopped it by commenting out the call to timeline.setEventDialogFields ... still working on narrowing it down


        Ok here are my fields, and the problem only happens when I add the LAST field ...

        public FormItem[] createEventDialogFields()
            List<FormItem> array = new ArrayList<FormItem>();
            array.add( createHiddenEventTypeField() );
            array.add( createNameEditField() );
            array.add( createDescriptionEditField() );
            array.add( createLocationField() );
            array.add( createStatusField() );
            array.add( createLaneField() );
            array.add( createWorkdayCountField() );
            array.add( createEventDialogDetailsField() );
            return array.toArray( new FormItem[array.size()] );
        private SubmitItem createEventDialogDetailsField()
            SubmitItem field = new SubmitItem( "details" );
            field.setShowIfCondition( new FormItemIfFunction() {
                public boolean execute( FormItem item, Object value, DynamicForm form ) {
                    return false;
            } );
            return field;
        Last edited by RobertHana; 26th Oct 2019, 10:56. Reason: formatted code


          Sorry, I was wrong about it being only the last field. It seems the start of the requests for blank.gif has an initial delay.


            Ok I figured out it was an attempt at dynamically changing a StaticTextItem field (for the EventDialog) to hide/show it's hint. Here's the code:

            StaticTextItem field = new StaticTextItem( "workDayCount", "Workday Count" );
            field.setHint( "Click to split this Event" );  // <-- 1/3 I commented THIS out to fix the issue
            field.setShowHint( false );
            field.setValueFormatter( new FormItemValueFormatter() {
               public String formatValue( Object value, Record record, DynamicForm form, FormItem item )
                   if ( value instanceof Integer )
                       int intValue = (Integer)value;
                       if ( intValue > 1 )
                            item.setShowHint( true );  // <---- 2/3 I commented THIS out to fix the issue
                           return "<div style='display: inline-block;' class='button ValueButton' title='Click to split this Event'>" + intValue + "</div>";
                    item.setShowHint( false );  // <----3/3  I commented THIS out to fix the issue
                   return ( value != null ? value.toString() : "" );
            } );
            The idea was to only show the hint if the value is actionable (per the logic of the field's clickHandler).


              We can't really get a picture of your use-case with just the snippet you provided - but you don't want to be unconditionally calling setShowHint() (or any other API with expected proactive effects on the UI) from inside value-formatters - those methods are already running as a result of effects on/interactions with the UI and are also fairly critical-path, since they run in various circumstances.

              Instead, you should see things work as expected if you call itemWithHint.setShowHint() from the changed() or click() handler that you're interested in, followed by a call to itemWithHint.redraw().

              If you still see issues with this technique, please provide a standalone, working test-case we can run to see the problem.
              Last edited by Isomorphic; 27th Oct 2019, 01:05.