On Sunday 12 February 2006 16:10, Izak Wessels 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.

I am not sure I fully understand what you are doing. 

 If you use the @DirectLink component, you can specify some parameters which 
get passed to the listener when he clicks on the link.  Pass the ID (or the 
object if its not too big) of the right object.  

<a jwcid="@DirectLink" listener="listener:doSomthing" parameters="ognl:
{supplierProduct.id, any other parameters ...}"> ...


If on the other hand you are trying to use a component

<span jwcid="@MyComponent" product="ognl:supplierProduct" >

inside your java class for the component

@Parameter
public abstract CementSupplierProductSpecificationComponent getProduct();

or maybe its a combination of the two?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

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

Reply via email to