Re: Initializing of DynaValidatorForm.

2003-06-06 Thread Gemes Tibor
Kazda Juraj írta:

Hi Tibor,

You mean, that I need to add scope="request" to showRec action too? When I add it, I have to add also name="editRecForm" and then, after I click on the link targeting the showRec action, it will throw an exception:
 

If it goes to input it means that validation error occures.
You migth want to turn off validation in showRec.
You might want to throw away that low level code in which you
create your form, leave it to the struts framework. You just
initialize in the action by setting some attributes.
Hth,

Tib



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


RE: Initializing of DynaValidatorForm.

2003-06-06 Thread Kazda Juraj
Hi Tibor,

You mean, that I need to add scope="request" to showRec action too? When I add it, I 
have to add also name="editRecForm" and then, after I click on the link targeting the 
showRec action, it will throw an exception:

  com.ibm.ws.webcontainer.webapp.WebAppErrorReport: No input attribute for mapping 
path /showRole

(I'm using WebSphere Studio 5 and it's Test Environment)

Ok, I add input attribute, and then it ignore all the action, goes directly to the 
defined input, so nothing is filled in...

I don't understand what's going on...

Have you any idea?

-jerryk.



-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2003 3:56 PM
To: Struts Users Mailing List
Subject: Re: Initializing of DynaValidatorForm.

Kazda Juraj írta:

>  
>
>  
>
>  scope="request">
>
>  
>
>  name="editRecForm" validate="true" input="edit.rec">
>
>  
>  
>
The forms are not in the same context.

Tib




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


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



Re: Initializing of DynaValidatorForm.

2003-06-06 Thread Gemes Tibor
Kazda Juraj írta:

 
   
 
   
 
scope="request">
   
 

 
name="editRecForm" validate="true" input="edit.rec">
   
 
 

The forms are not in the same context.

Tib



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


Initializing of DynaValidatorForm.

2003-06-06 Thread Kazda Juraj
Hello everyone,

this was several times on the list, but I lost myself in all mail
archives. What doesn't work for me is this:

One of my action returns list of records. Every record is actually a
link to other action, which should have to display a form with this
records details to edit. What I need, is to fill this form with data.
The link sends a parameter with record ID and action should ask for data
from the source and fill a form with them.

Here's my code & config:

  





  

  

  

  

  

  

  

All paths are tiles definitions.

  
<-- snippet from sk.jerryk.ShowRecAction.execute(...) -->
  ModuleConfig moduleConfig =
(ModuleConfig)request.getAttribute(Globals.MODULE_KEY);
  FormBeanConfig config =
moduleConfig.findFormBeanConfig("editRecForm");
  DynaActionFormClass dynaClass =
DynaActionFormClass.createDynaActionFormClass(config);
  DynaValidatorForm dvf = (DynaValidatorForm) dynaClass.newInstance();
  dvf.set("name", new String("Hello"));

  request.setAttribute("editRecForm", db);
  forward = mapping.findForward("showRec");
  return (forward);
<-- end snippet -->

<-- snippet from tile edit.rec -->






















<-- end snippet -->


First, when I say that the link should goto editRec, it will never reach
the action and it goes to the input. Second, when I say that it should
go to showRec, it goes there, execute the above code, continues to
specified forward, but nothing's filled in the text box.

What should I do to make it working?

TIA and have a nice day

Best regards

-jerryk.

===
ICQ#: 135207538
===
 


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