Anonymous - 2003-03-12

Why can't I set the value of a hidden input and do a submit?  Can someone provide me the sample code to do this?

<input="hidden" name="linkSource"
value=""/>

I need to set this hidden field to "addComponentPage".  However, I cannot do this:

This is what happens:

Testcase: testMakeFromPart_AddComp(com.ge.ne.psi.view.TestParts_test):      Caused an ERROR
Parameter 'linkSource' must have the value ''. Attempted to set it to: { addComponentPage }
com.meterware.httpunit.MissingParameterValueException: Parameter 'linkSource' must have the value ''. Attempted to set it to: { addComponentPage }
     at com.meterware.httpunit.FormControl.claimValueIsRequired(FormControl.java:256)
     at com.meterware.httpunit.TextFormControl.claimValueIsRequired(FormControl.java:664)
     at com.meterware.httpunit.HiddenFieldFormControl.claimRequiredValues(FormControl.java:704)
     at com.meterware.httpunit.FormParameter.setValues(WebForm.java:719)
     at com.meterware.httpunit.WebForm.setParameter(WebForm.java:481)
     at com.meterware.httpunit.WebForm.setParameter(WebForm.java:474)
     at com.meterware.httpunit.WebRequest.setParameter(WebRequest.java:123)
     at com.ge.ne.psi.view.TestParts_test.submitForm(TestParts_test.java:397)
     at com.ge.ne.psi.view.TestParts_test.addComponents(TestParts_test.java:966)
     at com.ge.ne.psi.view.TestParts_test.testMakeFromPart_AddComp(TestParts_test.java:323)

TEST com.ge.ne.psi.view.TestParts_test FAILED
t] Using Xalan version: 2.1.0