On Thu, 2004-04-29 at 00:44, JD Daniels wrote:
> hmmm... i am confused again..
> 
>     <xsp:logic>
>         Form form = (Form)request.getAttribute("woody-form");
>         Field field = (Field)form.getWidget("customerId");
>     </xsp:logic>
> 
> The field customerId is there and has a value.. but it gives me
> java.lang.NullPointerException.. which makes me think with v2 I have to
> change how I get a handle on the widgets...
> 
> any help?

sure, I actually didn't understand why you said in your other message
that it worked, as I suddenly thought of why it couldn't work: I assume
the XSP page is not the form template shown as part of form.showForm,
but a separate page after that? Then the woody-form isn't set in the
request object and you need to do that yourself.

I should warn though, that in fact you are not supposed to do this, as
the V2 API is designed to give you no access to the original java widget
(you'd better use the non-v2 api then) (I'm currently working on merging
both in a third proposal).

This should work:

cocoon.request.setAttribute("woody-form", form.formWidget_.unwrap());

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


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

Reply via email to