I have built a custom form component that is acting funny.

The render method (edited for brevity):

protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    throws RequestCycleException {
     
    IForm form = getForm(cycle);
    if (form == null) {
        // throw exception
   }

   boolean rewinding = form.isRewinding();

    _name = form.getElementId(this);
 
        if (rewinding) {
            String stringIndex = cycle.getRequestContext().getParameter(_name);
            int selectionIndex = stringIndex == null ? -1 : Integer.parseInt(stringIndex);
            _selection = (selectionIndex < 0) ? null : _selectionData.get(selectionIndex);
            return;
        }
 
       // do the real render
       

    } 

}

What's weird is that when I run this stuff on my machine, all works fine.
But, I checked this stuff into CVS and a colleauge of mine has set up an evironment that's
as close to identical to mine as possible (we spent a lot of time making sure).
 
But, when he runs a server, and calls up the same page, the call above to set the 'rewinding' variable always returns false. So, of course, the component does not work as it should. If he points his browser at the same page served by my machine, it works, so the browser is not the problem.
 
Any ideas why this is happening? The setup is identical, same page, same parameters but the form is not rewinding.
 
Geoff

Geoffrey Longman
Intelligent Works Inc.

Reply via email to