Ok, made some progress, by removing the line
@InjectPage("CementSupplierProductSpecificationComponent"), however I get a
NullPointerException at the following line :

getCementSupplierProductSpecificationComponent().setSupplierProductID(supplierProductID);

I believe that it doesn't actually set the supplierProductID on the
component. Anybody have any thoughts
on how I can accomplish this?

On 2/12/06, Izak Wessels <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I was wondering, how do one inject a component into a page?
> For example, when the user clicks on a link, I want to pass the
> id of the link that they clicked to my custom component.
>
> // Trying to inject the page, so that I can set the id, so that the
> correct
> details can be
> // displayed on the following page
>
> ------------------------------------------------------------------------------------------------------------
> @InjectPage("CementSupplierProductSpecificationComponent")
> public abstract CementSupplierProductSpecificationComponent
> getCementSupplierProductSpecificationComponent();
>
> // When clicking the link, set the id on the page -> Line 4
> ------------------------------------------------------------------------
> 1.    public QuotationSupplierProductDetailsPage
> onShowQuotationSupplierProductDetails(Integer supplierProductID) {
> 2.
> 3.        if
> (getAgentSession().getCategory().getCategoryName().equals("Cement")) {
> 4.
>
> getCementSupplierProductSpecificationComponent().setSupplierProductID(supplierProductID);
> 5.        }
> 6.        return getQuotationSupplierProductDetailsPage();
> 7.    }
>
>
> Thanks,
>
> -- Izak
>
>

Reply via email to