I seem to be missing something with Parameters.  I am using 3.0.3.  

Here is my class declaration

public abstract class QueryComponent extends BaseComponent implements
IFormComponent


Here is the code in my renderComponent method, which I grabbed from the
palette component:

protected void renderComponent(IMarkupWriter writer, IRequestCycle
cycle)
        {
                
                IForm form = Form.get(getPage().getRequestCycle());
                if (form == null)
                        throw new ApplicationRuntimeException("Query
component must be wrapped by a Form.", this, null, null);
                setForm(form);
                IValidationDelegate delegate = form.getDelegate();
                if (delegate != null)
                        delegate.setFormComponent(this);
                setName(form.getElementId(this));
                if (form.isRewinding())
                        handleSubmission(cycle);
                if (!cycle.isRewinding())
                {
        mQueryBar = getQueryBarService().loadQueryBarType(getAppArea(),
getType());
                        //              mCompanies =
getLookupService().getCollection(Company.class,
                        //
((FacilityGroupValue) mCurrentFg).getDatasetValue());
                        mFilterTypeModel = new
FilterTypeModel(mQueryBar.getFilterTypes());
                        if (mFilterType == null)
                                mFilterType = (QueryBarFilterType)
mFilterTypeModel.getOption(0);
                }
                super.renderComponent(writer, cycle);

        }


Notice I am setting up some models before it renders. 

This renders ok the first time, but when I do something which performs a
submit, when it redraws, I get an error because of the following in my
template:

<span jwcid="[EMAIL PROTECTED]" value="ognl:facilityGroup.name">Sinclair
Facility Group</span>

I notice that the facilitygroup parameter gets reset after the first
render, and the next time the component draws it is still null.


Here is how I reference the component from the page:
            <span jwcid="[EMAIL PROTECTED]"
month="ognl:month" appArea="MONTHLY"
queryBarService="ognl:masterMaintenanceService" type="BATT_S2"
facilityGroup="ognl:facilityGroup"> </span>

Any help would be appreciated.

craig


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to