Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci
Hello everyone,

I have this weird little problem and I don't know how to fix it. I have a
form (actually I have many forms but the others work just fine) and a form
bean and action class for it. Now when the form gets processed (after
hitting 'submit') its form bean should get stored in the request. But it
isn't for some reason. When the action class now tries to access this form
bean, it can't find it in the request and creates a new one - which
results in exceptions since it doesn't have the data the form bean
should've had.

Any ideas why? I've checked the action mapping, it is set to request and
there is an attribute defined for the form bean. I know the form does not
get stored in the request since that would usually be logged in my log
file (it gets logged for all the other forms, anyway) but there is no such
entry for it. I would include code with this email but I have no idea
where the error might be and I don't want to post all of the code of those
two classes, the form and the action mapping for it, since that would be
way too much code, I fear... If you could tell me what you need to look to
find out where the error is, I'll send it in - and I'd greatly appreciate
any kind of help. This error is slowly driving me crazy...

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re: Form bean is not stored in request

2003-07-07 Thread Nagendra Kumar O V S








  can u paste the "action form class" code and the "struts-config 
  action mapping" here
  
  -nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Monday, July 07, 
  2003 02:45:34 PM
  To: [EMAIL PROTECTED]
  Subject: Form bean is 
  not stored in request
  Hello everyone,I have this weird little problem 
  and I don't know how to fix it. I have aform (actually I have many 
  forms but the others work just fine) and a formbean and action class 
  for it. Now when the form gets processed (afterhitting 'submit') its 
  form bean should get stored in the request. But itisn't for some 
  reason. When the action class now tries to access this formbean, it 
  can't find it in the request and creates a new one - whichresults in 
  exceptions since it doesn't have the data the form beanshould've 
  had.Any ideas why? I've checked the action mapping, it is set to 
  request andthere is an attribute defined for the form bean. I know the 
  form does notget stored in the request since that would usually be 
  logged in my logfile (it gets logged for all the other forms, anyway) 
  but there is no suchentry for it. I would include code with this email 
  but I have no ideawhere the error might be and I don't want to post 
  all of the code of thosetwo classes, the form and the action mapping 
  for it, since that would beway too much code, I fear... If you could 
  tell me what you need to look tofind out where the error is, I'll send 
  it in - and I'd greatly appreciateany kind of help. This error is 
  slowly driving me 
  crazy...Greetings,Nadja-Nadja 
  SenoucciUniversitaet HamburgZentrum für Molekulare 
  NeurobiologieService-Gruppe EDVFalkenried 9420251 
  HamburgGermanyTel.:040 - 428 - 03 - 6619Fax.:040 - 428 - 03 - 
  6621-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Re: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Nadja,

  

***

NS Hello everyone,

NS I have this weird little problem and I don't know how to fix it. I have a
NS form (actually I have many forms but the others work just fine) and a form
NS bean and action class for it. Now when the form gets processed (after
NS hitting 'submit') its form bean should get stored in the request.
Why do you expect it in the request? Why don't you use the action form
parameter of the execute method? Are you doing some kind of action
chaining?

NS But it
NS isn't for some reason. When the action class now tries to access this form
NS bean, it can't find it in the request and creates a new one - which
NS results in exceptions since it doesn't have the data the form bean
NS should've had.

NS Any ideas why? I've checked the action mapping, it is set to request and
NS there is an attribute defined for the form bean. I know the form does not
NS get stored in the request since that would usually be logged in my log
NS file (it gets logged for all the other forms, anyway) but there is no such
NS entry for it. I would include code with this email but I have no idea
NS where the error might be and I don't want to post all of the code of those
NS two classes, the form and the action mapping for it, since that would be
NS way too much code, I fear... If you could tell me what you need to look to
NS find out where the error is, I'll send it in - and I'd greatly appreciate
NS any kind of help. This error is slowly driving me crazy...

NS Greetings,
NS Nadja

NS -
NS Nadja  Senoucci
NS Universitaet Hamburg
NS Zentrum für Molekulare Neurobiologie
NS Service-Gruppe EDV
NS Falkenried 94
NS 20251 Hamburg
NS Germany
NS Tel.:040 - 428 - 03 - 6619
NS Fax.:040 - 428 - 03 - 6621


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


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



Re: Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci

Hello again,

it is actually struts that seems to be expecting the form bean in the
request, under name given in 'attribute' in the mapping for the action. At
least, the log-file tells me that struts looks there for the form bean and
creates a new one if it can't find it.

Okay, here is the action mapping for this:

action
attribute=suchen
input=/index.jsp
name=suchen
path=/suchen
scope=request
type=de.zmnh.struts.action.SuchenAction /

And this is the form bean (I did not copy the imports btw):
public class SuchenForm extends ActionForm {

// - Instance
Variables
private org.apache.log4j.Logger log =
org.apache.log4j.Logger.getLogger(this.getClass().getName());

private TreeMap fields;
private TreeMap params;
private Integer cnt;
private boolean archivAnzeigen;
private ArrayList auswahl;

// - Methods

public SuchenForm(){
fields = new TreeMap();
params = new TreeMap();
cnt = new Integer(1);
}

/** 
 * Method validate
 * @param ActionMapping mapping
 * @param HttpServletRequest request
 * @return ActionErrors
 */
public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {

ActionErrors err = new ActionErrors();

Integer temp = (Integer)request.getSession().getAttribute(cnt);
if(temp!=null  (temp.intValue()cnt.intValue())){
cnt=temp;
}
if(request.getParameter(mehr)!=null){
LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
LoggerSupport.logDebug(Mehr Felder Button gedrückt,log);
cnt = new Integer(cnt.intValue()+1);
LoggerSupport.logDebug(Counter: +cnt.intValue(),log);

}else if(request.getParameter(weniger)!=null){
LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
LoggerSupport.logDebug(weniger Felder Button gedrückt,log);
LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
}   
return err;
}

/** 
 * Method reset
 * @param ActionMapping mapping
 * @param HttpServletRequest request
 */
public void reset(ActionMapping mapping, HttpServletRequest request) {
this.archivAnzeigen=false;
}

/**
 * Returns the field.
 * @return String
 */
public Object getField(String key) {
if(fields == null)
return ;
else if(fields.get(key)==null)
return ;
return this.fields.get(key);
}

public void setField(String key, String value){
this.fields.put(key,value);
}

/**
 * Returns the fields.
 * @return String[]
 */
public TreeMap getFields() {
return fields;
}

/**
 * Returns the parameter.
 * @return String
 */
public Object getParameter(String key) {
if(params == null)
return ;
else if(params.get(key)==null)
return ;
return this.params.get(key);
}

public void setParameter(String key, String value){
this.params.put(key,value);
}

/**
 * Returns the params.
 * @return String[]
 */
public TreeMap getParams() {
return params;
}

/**
 * Sets the parameter.
 * @param parameter The parameter to set
 */


/**
 * Returns the cnt.
 * @return int
 */
public Integer getCnt() {
return cnt;
}

/**
 * Feldauswahl
 */
public Collection getSearchFields(){
if(auswahl==null){
auswahl = new ArrayList();
Properties search = new Properties();
try{
FileInputStream in = new
FileInputStream(InventarKonfiguration.getHandle().getInvpropPath());
search.load(in);
}catch(Exception e){
LoggerSupport.logFatal(e,log);
}
int i=1;
String temp;
while((temp=search.getProperty(search+i))!=null){
LoggerSupport.logDebug(Nächstes Element für 

Re[2]: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Nadja,

  

***


NS Hello again,

NS it is actually struts that seems to be expecting the form bean in the
NS request, under name given in 'attribute' in the mapping for the action. At
NS least, the log-file tells me that struts looks there for the form bean and
NS creates a new one if it can't find it.

NS Okay, here is the action mapping for this:

NS action
NS attribute=suchen
Do you need the above line for some good reason. If not, drop it.

NS input=/index.jsp
NS name=suchen
NS path=/suchen
NS scope=request
NS type=de.zmnh.struts.action.SuchenAction /

NS And this is the form bean (I did not copy the imports btw):
NS public class SuchenForm extends ActionForm {

NS // - Instance
NS Variables
NS private org.apache.log4j.Logger log =
NS org.apache.log4j.Logger.getLogger(this.getClass().getName());

NS private TreeMap fields;
NS private TreeMap params;
NS private Integer cnt;
NS private boolean archivAnzeigen;
NS private ArrayList auswahl;

NS // - Methods

NS public SuchenForm(){
NS fields = new TreeMap();
NS params = new TreeMap();
NS cnt = new Integer(1);
NS }

NS /** 
NS  * Method validate
NS  * @param ActionMapping mapping
NS  * @param HttpServletRequest request
NS  * @return ActionErrors
NS  */
NS public ActionErrors validate(
NS ActionMapping mapping,
NS HttpServletRequest request) {

NS ActionErrors err = new ActionErrors();

NS Integer temp = (Integer)request.getSession().getAttribute(cnt);
NS if(temp!=null  (temp.intValue()cnt.intValue())){
NS cnt=temp;
NS }
NS if(request.getParameter(mehr)!=null){
NS LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
NS LoggerSupport.logDebug(Mehr Felder Button gedrückt,log);
NS cnt = new Integer(cnt.intValue()+1);
NS LoggerSupport.logDebug(Counter: +cnt.intValue(),log);

NS }else if(request.getParameter(weniger)!=null){
NS LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
NS LoggerSupport.logDebug(weniger Felder Button 
gedrückt,log);
NS LoggerSupport.logDebug(Counter: +cnt.intValue(),log);
NS }   
NS return err;
NS }

NS /** 
NS  * Method reset
NS  * @param ActionMapping mapping
NS  * @param HttpServletRequest request
NS  */
NS public void reset(ActionMapping mapping, HttpServletRequest request) {
NS this.archivAnzeigen=false;
NS }

NS /**
NS  * Returns the field.
NS  * @return String
NS  */
NS public Object getField(String key) {
NS if(fields == null)
NS return ;
NS else if(fields.get(key)==null)
NS return ;
NS return this.fields.get(key);
NS }

NS public void setField(String key, String value){
NS this.fields.put(key,value);
NS }

NS /**
NS  * Returns the fields.
NS  * @return String[]
NS  */
NS public TreeMap getFields() {
NS return fields;
NS }

NS /**
NS  * Returns the parameter.
NS  * @return String
NS  */
NS public Object getParameter(String key) {
NS if(params == null)
NS return ;
NS else if(params.get(key)==null)
NS return ;
NS return this.params.get(key);
NS }

NS public void setParameter(String key, String value){
NS this.params.put(key,value);
NS }

NS /**
NS  * Returns the params.
NS  * @return String[]
NS  */
NS public TreeMap getParams() {
NS return params;
NS }

NS /**
NS  * Sets the parameter.
NS  * @param parameter The parameter to set
NS  */


NS /**
NS  * Returns the cnt.
NS  * @return int
NS  */
NS public Integer getCnt() {
NS return cnt;
NS }

NS /**
NS  * Feldauswahl
NS  */
NS public Collection getSearchFields(){
NS if(auswahl==null){
NS auswahl = new ArrayList();
NS Properties search = new 

Re: Form bean is not stored in request

2003-07-07 Thread Nagendra Kumar O V S








  hi,
  change the scope to session , just to track down the problem.
  also make sure u have properly defined the form-bean== suchen 
  to SuchenForm in the config
  remove attribute "attribute" in the action mapping if not 
needed
  
  
  -nagi
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
  Date: Monday, July 07, 
  2003 03:09:19 PM
  To: Struts Users Mailing 
  List
  Subject: Re: Form bean 
      is not stored in request
  Hello again,it is actually struts that seems to 
  be expecting the form bean in therequest, under name given in 
  'attribute' in the mapping for the action. Atleast, the log-file tells 
  me that struts looks there for the form bean andcreates a new one if 
  it can't find it.Okay, here is the action mapping for 
  this:actionattribute="suchen"input="/index.jsp"name="suchen"path="/suchen"scope="request"type="de.zmnh.struts.action.SuchenAction" 
  /And this is the form bean (I did not copy the imports 
  btw):public class SuchenForm extends ActionForm {// 
  - 
  InstanceVariablesprivate org.apache.log4j.Logger log 
  =org.apache.log4j.Logger.getLogger(this.getClass().getName());private 
  TreeMap fields;private TreeMap params;private Integer 
  cnt;private boolean archivAnzeigen;private ArrayList 
  auswahl;// 
  - 
  Methodspublic SuchenForm(){fields = new TreeMap();params = 
  new TreeMap();cnt = new Integer(1);}/** * Method 
  validate* @param ActionMapping mapping* @param HttpServletRequest 
  request* @return ActionErrors*/public ActionErrors 
  validate(ActionMapping mapping,HttpServletRequest request) 
  {ActionErrors err = new ActionErrors();Integer temp = 
  (Integer)request.getSession().getAttribute("cnt");if(temp!=null 
   
  (temp.intValue()cnt.intValue())){cnt=temp;}if(request.getParameter("mehr")!=null){LoggerSupport.logDebug("Counter: 
  "+cnt.intValue(),log);LoggerSupport.logDebug("Mehr Felder Button 
  gedrückt",log);cnt = new 
  Integer(cnt.intValue()+1);LoggerSupport.logDebug("Counter: 
  "+cnt.intValue(),log);}else 
  if(request.getParameter("weniger")!=null){LoggerSupport.logDebug("Counter: 
  "+cnt.intValue(),log);LoggerSupport.logDebug("weniger Felder Button 
  gedrückt",log);LoggerSupport.logDebug("Counter: 
  "+cnt.intValue(),log);} return err;}/** * Method 
  reset* @param ActionMapping mapping* @param HttpServletRequest 
  request*/public void reset(ActionMapping mapping, 
  HttpServletRequest request) 
  {this.archivAnzeigen=false;}/*** Returns the 
  field.* @return String*/public Object getField(String key) 
  {if(fields == null)return "";else 
  if(fields.get(key)==null)return "";return 
  this.fields.get(key);}public void setField(String key, String 
  value){this.fields.put(key,value);}/*** Returns the 
  fields.* @return String[]*/public TreeMap getFields() 
  {return fields;}/*** Returns the parameter.* 
  @return String*/public Object getParameter(String key) 
  {if(params == null)return "";else 
  if(params.get(key)==null)return "";return 
  this.params.get(key);}public void setParameter(String key, 
  String value){this.params.put(key,value);}/*** Returns 
  the params.* @return String[]*/public TreeMap getParams() 
  {return params;}/*** Sets the parameter.* @param 
  parameter The parameter to set*//*** Returns the 
  cnt.* @return int*/public Integer getCnt() {return 
  cnt;}/*** Feldauswahl*/public Collection 
  getSearchFields(){if(auswahl==null){auswahl = new 
  ArrayList();Properties search = new 
  Properties();try{FileInputStream in = 
  newFileInputStream(InventarKonfiguration.getHandle().getInvpropPath());search.load(in);}catch(Exception 
  e){LoggerSupport.logFatal(e,log);}int i=1;String 
  temp;while((temp=search.getProperty("search"+i))!=null){LoggerSupport.logDebug("Nächstes 
  Element für SearchFields Coll.:"+temp,log);SearchOption temp2=new 
  SearchOption(temp,search.getProperty("value"+i));auswahl.add(temp2);i++;}}return 
  auswahl;}/*** Returns the archivAnzeigen.* @return 
  boolean*/public boolean isArchivAnzeigen() {return 
  archivAnzeigen;}/*** Sets the archivAnzeigen.* @param 
  archivAnzeigen The archivAnzeigen to set*/public void 
  setArchivAnzeigen(boolean archivAnzeigen) {this.archivAnzeigen = 
  archivAnzeigen;}}Thanks for the 
  help.Greetings,Nadja

Re: Re[2]: Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci
Hello again,

Do you need the above line for some good reason. If not, drop it.

I deleted the attribute line. Stupid easy-struts is still telling me that
attribute=suchen but I can't find the line the struts-config.xml anymore. I
have that line in all my action mappings (for forms anyway), it never did
anything... Why shouldn't I have the line in there?

Still things seem to be behave oddly... Here's the logging (with comments
from me) I don't quite understand what is going on anymore...

1) Looking for ActionForm bean instance in scope 'request' under attribute
key 'suchen'
2) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'

This is the first call to the form, it correctly creates a new instance.

Then comes some general struts initialisation. Next 16 lines are from my
own debugging info for the dropdown in my form and then follows some more
struts message initialisations and such. All these are not really of
consequence here, so I deleted them.

Then after info in entered into the form and submit is pressed:

3) Get module name for path /suchen.do
4) Module name found: default
5) Processing a 'POST' for path '/suchen'
6) Looking for ActionForm bean instance in scope 'request' under attribute
key 'suchen'
7) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'
8)  -- [EMAIL PROTECTED]

As you can see, the form bean is stil being looked for even though I
deleted that line. Maybe, it's easy-struts messing things up but I checked
the code the line is not there anymore...
(mapping: action
input=/index.jsp
name=suchen
path=/suchen
scope=request
type=de.zmnh.struts.action.SuchenAction /
Tried switching to session, no change...)

9) Storing ActionForm bean instance in scope 'request' under attribute key
'suchen'

Now, it created a new one and stores this one in the request right away...
Why?

10) Populating bean properties from this request

It can't. The data of the form is gone...

11) BeanUtils.populate([EMAIL PROTECTED],
{field(searchfield1)=[Ljava.lang.String;@41a12f,
submit=[Ljava.lang.String;@bd4e3c,
parameter(searchparam1)=[Ljava.lang.String;@5b78cf})
12) setProperty([EMAIL PROTECTED], field(searchfield1),
[string_Geraet.Hersteller])
13) Skipping read-only property

I don't have a ready-only property in the form... Not that I know of
anyway. I have one in the next page, that should be displayed when all this
works, but not here...

14) setProperty([EMAIL PROTECTED], submit, [Suchen])
DEBUG 2003-07-07 12:13:44,519 [HttpProcessor[8080][3]] (BeanUtils.java:873)
org.apache.commons.beanutils.BeanUtils -
setProperty([EMAIL PROTECTED], parameter(searchparam1),
[HP])
15) Skipping read-only property
16) Validating input form properties
17) No errors detected, accepting input
18) Looking for Action instance for class de.zmnh.struts.action.SuchenAction
19) Creating new Action instance

The next two line are from a bean created in my Action class, that does a
few things with the data it shoudl be getting from my form. I have added
one line telling me the size of one of the maps that are stored in my form
bean and get passed to the this SearchSupportBean but since a new form bean
was created the size of this map is of course zero...

20) SearchSupportBean.createNew()
21) Fields size: 0

Any ideas? I know, I don't have any anymore... Completely confused now...
Thanks for the help so far.

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re[4]: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Nadja,

  

***

NS Hello again,

Do you need the above line for some good reason. If not, drop it.

NS I deleted the attribute line. Stupid easy-struts is still telling me that
NS attribute=suchen but I can't find the line the struts-config.xml anymore. I
NS have that line in all my action mappings (for forms anyway), it never did
NS anything... Why shouldn't I have the line in there?

NS Still things seem to be behave oddly... Here's the logging (with comments
NS from me) I don't quite understand what is going on anymore...

NS 1) Looking for ActionForm bean instance in scope 'request' under attribute
NS key 'suchen'
NS 2) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'

NS This is the first call to the form, it correctly creates a new instance.

NS Then comes some general struts initialisation. Next 16 lines are from my
NS own debugging info for the dropdown in my form and then follows some more
NS struts message initialisations and such. All these are not really of
NS consequence here, so I deleted them.

NS Then after info in entered into the form and submit is pressed:

Attention. Here the new request starts!

NS 3) Get module name for path /suchen.do
NS 4) Module name found: default
NS 5) Processing a 'POST' for path '/suchen'
NS 6) Looking for ActionForm bean instance in scope 'request' under attribute
NS key 'suchen'
NS 7) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'
8)  -- [EMAIL PROTECTED]

NS As you can see, the form bean is stil being looked for even though I
NS deleted that line.
That's okay. Its only the debugging info beeing not quite correct.
So far, everything looks okay to me.

NS Maybe, it's easy-struts messing things up but I checked
NS the code the line is not there anymore...
NS (mapping: action
NS input=/index.jsp
NS name=suchen
NS path=/suchen
NS scope=request
NS type=de.zmnh.struts.action.SuchenAction /
NS Tried switching to session, no change...)

NS 9) Storing ActionForm bean instance in scope 'request' under attribute key
NS 'suchen'

NS Now, it created a new one and stores this one in the request right away...
NS Why?
Because it is supposed to create a new form. We are dealing with a new
request, aren't we? This new request is missing the form bean named
suchen.

NS 10) Populating bean properties from this request

NS It can't. The data of the form is gone...

NS 11) BeanUtils.populate([EMAIL PROTECTED],
NS {field(searchfield1)=[Ljava.lang.String;@41a12f,
NS submit=[Ljava.lang.String;@bd4e3c,
NS parameter(searchparam1)=[Ljava.lang.String;@5b78cf})
NS 12) setProperty([EMAIL PROTECTED], field(searchfield1),
NS [string_Geraet.Hersteller])
NS 13) Skipping read-only property

NS I don't have a ready-only property in the form... Not that I know of
NS anyway. I have one in the next page, that should be displayed when all this
NS works, but not here...

NS 14) setProperty([EMAIL PROTECTED], submit, [Suchen])
NS DEBUG 2003-07-07 12:13:44,519 [HttpProcessor[8080][3]] (BeanUtils.java:873)
NS org.apache.commons.beanutils.BeanUtils -
NS setProperty([EMAIL PROTECTED], parameter(searchparam1),
NS [HP])
NS 15) Skipping read-only property
NS 16) Validating input form properties
NS 17) No errors detected, accepting input
NS 18) Looking for Action instance for class de.zmnh.struts.action.SuchenAction
NS 19) Creating new Action instance

NS The next two line are from a bean created in my Action class, that does a
NS few things with the data it shoudl be getting from my form. I have added
NS one line telling me the size of one of the maps that are stored in my form
NS bean and get passed to the this SearchSupportBean but since a new form bean
NS was created the size of this map is of course zero...

NS 20) SearchSupportBean.createNew()
NS 21) Fields size: 0

NS Any ideas? I know, I don't have any anymore... Completely confused now...
NS Thanks for the help so far.

NS Greetings,
NS Nadja

NS -
NS Nadja  Senoucci
NS Universitaet Hamburg
NS Zentrum für Molekulare Neurobiologie
NS Service-Gruppe EDV
NS Falkenried 94
NS 20251 Hamburg
NS Germany
NS Tel.:040 - 428 - 03 - 6619
NS Fax.:040 - 428 - 03 - 6621


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


-
To unsubscribe, e-mail: [EMAIL 

Re: Re[4]: Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci
And once again hello,

[snip]
NS 9) Storing ActionForm bean instance in scope 'request' under attribute
key
NS 'suchen'

NS Now, it created a new one and stores this one in the request right
away...
NS Why?
Because it is supposed to create a new form. We are dealing with a new
request, aren't we? This new request is missing the form bean named
suchen.

Wait a moment, I thought the form bean is supposed to be known in the
action. The form's data needs to be processed further in the action and
that can't really be done if there is a new form bean getting created in
the action class every time... Or am I completely misunderstanding
something here?

Also, I've added another line of debugging info and it seems that my
variables don't get filled at all, meaning my setField and setParameter
methods do not get called to. I have write debug info into my logfile
there, so that should get printed into the logfile if they were called...
Also, there are these lines that are worrying me:

setProperty([EMAIL PROTECTED], field(searchfield1),
[string_Geraet.Hersteller])
Skipping read-only property
setProperty([EMAIL PROTECTED],
parameter(searchparam1), [HP])
Skipping read-only property

I never said anything about read-only. I guess, that's actually my whole
problem (not sure though) but I have no idea how to fix it.

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re[6]: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Struts,

  

***

NS And once again hello,

NS [snip]
NS 9) Storing ActionForm bean instance in scope 'request' under attribute
NS key
NS 'suchen'

NS Now, it created a new one and stores this one in the request right
NS away...
NS Why?
Because it is supposed to create a new form. We are dealing with a new
request, aren't we? This new request is missing the form bean named
suchen.

NS Wait a moment, I thought the form bean is supposed to be known in the
NS action. The form's data needs to be processed further in the action and
NS that can't really be done if there is a new form bean getting created in
NS the action class every time... Or am I completely misunderstanding
NS something here?

No. Before your action is called the form bean exists and its values
are set.

NS Also, I've added another line of debugging info and it seems that my
NS variables don't get filled at all, meaning my setField and setParameter
NS methods do not get called to. I have write debug info into my logfile
NS there, so that should get printed into the logfile if they were called...
NS Also, there are these lines that are worrying me:

NS setProperty([EMAIL PROTECTED], field(searchfield1),
NS [string_Geraet.Hersteller])
NS Skipping read-only property
NS setProperty([EMAIL PROTECTED],
NS parameter(searchparam1), [HP])
NS Skipping read-only property

NS I never said anything about read-only. I guess, that's actually my whole
NS problem (not sure though) but I have no idea how to fix it.

This is definitely the problem.  What properties are you trying to
set?

NS Greetings,
NS Nadja

NS -
NS Nadja  Senoucci
NS Universitaet Hamburg
NS Zentrum für Molekulare Neurobiologie
NS Service-Gruppe EDV
NS Falkenried 94
NS 20251 Hamburg
NS Germany
NS Tel.:040 - 428 - 03 - 6619
NS Fax.:040 - 428 - 03 - 6621


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


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



Re: Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci
Hello,

This is definitely the problem.  What properties are you trying to
set?

I have two map backed fields in form. Since they can actually exists
repeatedly I am building the name in my .jsp and am displaying this as
follows:

tr bgcolor=#FF 
  % String fname = field(searchfield+(counter)+);
 String pname = parameter(searchparam+(counter)+);%
  td html:select property=%=fname% 
html:optionsCollection property=searchFields value=value
label=label/ 
/html:select/td
  tdhtml:text property=%=pname%//td
/tr
% counter++;
   }while(counter=number); %

So, the fields should be set via setField(String key, String value) and
setParameter(String key, String value):

public void setField(String key, String value){
LoggerSupport.logDebug(setField(): key: +key+, value: +value,log);
this.fields.put(key,value);
LoggerSupport.logDebug(setField(): sind die Daten auch in der Map?
+(this.fields.get(key)==null?Nein:Ja +this.fields.get(key)),log);
}

public void setParameter(String key, String value){
LoggerSupport.logDebug(setParameter(): key: +key+, value: +value,log);
this.params.put(key,value);
LoggerSupport.logDebug(setParameter(): sind die Daten auch in der Map?
+(this.params.get(key)==null?Nein:Ja +this.params.get(key)),log);
}

The Maps are being initialzed in SuchenForm's contructor:

public SuchenForm(){
fields = new TreeMap();
params = new TreeMap();
cnt = new Integer(1);
}

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re[6]: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Nadja,

try to change your getters (Field/Param) to return String, not Object.

Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


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



Re: Re[6]: Form bean is not stored in request

2003-07-07 Thread Nadja Senoucci
Hello Dirk,

try to change your getters (Field/Param) to return String, not Object.

Thanks, that was it!! Can't believe I have been looking in the wrong place
the whole damn time... That error had kept me guessing since last thursday!

But now this part is working and I can face a whole new and different
error. :) Thanks for all your help!

Greetings,
Nadja

-
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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



Re[8]: Form bean is not stored in request

2003-07-07 Thread Dirk Markert
Hello Nadja,

you are welcome.

***

NS Hello Dirk,

try to change your getters (Field/Param) to return String, not Object.

NS Thanks, that was it!! Can't believe I have been looking in the wrong place
NS the whole damn time... That error had kept me guessing since last thursday!

NS But now this part is working and I can face a whole new and different
NS error. :) Thanks for all your help!

NS Greetings,
NS Nadja

NS -
NS Nadja  Senoucci
NS Universitaet Hamburg
NS Zentrum für Molekulare Neurobiologie
NS Service-Gruppe EDV
NS Falkenried 94
NS 20251 Hamburg
NS Germany
NS Tel.:040 - 428 - 03 - 6619
NS Fax.:040 - 428 - 03 - 6621


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-- to success! -+ 


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