write bean without propertys with primitve Datatypes

2004-09-14 Thread Claudia Woestheinrich
HI,

I have a question. I want to user the iterate tag like:

 

   
   
  ?   here the
property code is an other bean



The Beans-Code:

public class Entity(){

 private Code code;
 private String name;
publich Entity(){}

public String getName(){ return name; }

public Code getCode(){ return code; }
.
}

public class Code(){


 private String name;
publich Code(){}

public String getName(){ return name; }

...
}

How can I do this?
Thanks
Claudia


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



multibox indexed

2004-09-10 Thread Claudia Woestheinrich
Hello,

I have a big Problem with reading the values of the text-field in
the iterate-tag.
The Value with the ID=1 is all time wrong! and the athers are
ok.?
The Value with the index=1 is all time the value of the
initialisation and not the
changed.

My JSP:

.
 


 


" size="2"/>


 

My ActionForm:

  public LabelValueBean getLabelValue(int index){
return beans[index];
}

public void setLabels(LabelValueBean[] beans){
this.beans=beans;
   }

public void setSelDDE(String[] selDDE){
this.selDDE=selDDE;
}

public String[] getSelDDE(){
return selDDE;
}

In the ActionClass befor show the JSP I write the LabelValueBeans:

LabelValueBean[] beans=new LabelValueBean[enten.size()];
 for(int i=0;i

struts-el

2004-09-09 Thread Claudia Woestheinrich
Hallo,

I want to uses Struts-el but I can't find the source.
Where can I get it?

Thanks Claudia


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



Antwort: Re: problem with multibox

2004-09-07 Thread Claudia Woestheinrich

..Thanks that works.

Now I have  in the JSP-Page checkboxes and textfields. I want to
write
the two values (test,info) in an Map or Array[][]. How must I do
this
in the ActionForm?

Thanks
Claudia

My JSP:


 

 
 




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



problem with multibox

2004-09-07 Thread Claudia Woestheinrich
Hi,

I have a Problem with using multiboxes. I want to generate following
HTML-Code:

Ronja
Petra
Heini

But I became:
2002 Ronja
2003 Petra
2004 Heini

What must I do???
Thanks
Claudia

My JSP-Code:

 





   



   


And my ActionForm:

public class MyForm extends ActionForm{

/** Creates a new instance of MyForm */
public MyForm() {
MyBean eins=new MyBean();
eins.setJahr("2002");
eins.setName("Ronja");

MyBean zwei=new MyBean();
zwei.setJahr("2003");
zwei.setName("Petra");

MyBean drei=new MyBean();
drei.setJahr("2004");
drei.setName("Heini");

init=new Object[3];
init[0]=eins;
init[1]=zwei;
init[2]=drei;


}

private Object[] items, init,sel;


public Object[] getItems(){
return items;
}

public void setItems(Object[] v){
items=v;
}

public Object[] getSel(){
return sel;
}

public void setSel(Object[] selected){
sel=selected;
}



public void reset(ActionMapping mapping,HttpServletRequest req){
System.out.println("bin in reset");

items=new Object[3];
items=init;

}

}


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



map-backed ActionForm

2004-09-06 Thread Claudia Woestheinrich
Hello,

my JSP-Code is:

..


 <%=ent.getDde
()%>

Anzahl: 
 

and the ActionForm:

public class ProjektDDEForm extends ActionForm{

private Map enten;


/** Creates a new instance of ProjektDDEForm */
public ProjektDDEForm() {

}

public Map getEnten(){
return enten;
}

public void setEnten(Map _map){
enten=_map;
}

public void setValue(String _key, String _value)throws Exception
{
getEnten().put(_key,_value);
}

public Object getValue(String _key)throws Exception{
return enten.get(_key);
}


}

In the Action-Class:

... ProjektDDEForm form=(ProjektDDEForm)actionForm;

   Map map=form.getEnten();
  Line 60:  Iterator it=map.keySet().iterator();
  while (it.hasNext()){
String key=(String)it.next();
System.out.println("key  "+key);
System.out.println("value "+map.get(key));
}



2004-09-06 10:19:57 StandardWrapperValve[action]: Servlet.service()
for servlet action threw exception
java.lang.NullPointerException
 at
de.vit.AdisAded.actions.ProjektDDEAction.execute(ProjektDDEAction.java:60)
 at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.jav

What is wrong???

Thanks Claudia


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



Problem with

2004-05-10 Thread Claudia Woestheinrich
Hi,

I have a Problem with the a -tag () The first time the client push the link,
it works correctly and the ein.do action is startet, but the second
time( when the key has the same value) the ein.do action doesn't
start to work and the browser shows the old side . What can I do? I
want the ein.do action to start every time because the values have
changed.

Here the struts-config:

   

 

   


Thanks
Claudia


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