RE: html:submit value not found in request, found a solution

2002-11-20 Thread Linnea Ahlbeck
Hi David!

Thanks for your tip. The "button.view" property in your properties file has
been found all the time but I'm not used to add the property attribute to
the html:submit tag. When I did that the request parameter was found (and
probably created to begin with) and therby able to reach from my action
class.

My solution:


   
  
   


Sorry for the version mix up, I'm using the  1.1b2 version.

Thanks again!

/Linnéa

-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 6:41 PM
To: Struts Users Mailing List
Subject: RE: html:submit value not found in request, version 1.02 beta


I would guess it can't find the "button.view" property in your properties
file.  If that was nonexistent, the value would be null.

(Note that there is no "1.02 beta" version.  There's versions 1.02 and 1.1b2
(and the nightly).)

> -Original Message-
> From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
>
> Hi!
>
> On my jsp pages I have the following code:
>
> 
>
>   
> 
> 
>
> (On my jsp page I only have one html:form tag)
>
> In my SaveAction class I collect the submit value from the
> request, like
> this:
>
> String submit = request.getParameter("submit");
>
> The submit value is null.
>
> I'm using the Struts 1.02 beta version. Have anybody
> experienced the same
> problem??

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




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




html:submit value not found in request, version 1.02 beta

2002-11-20 Thread Linnea Ahlbeck
Hi!

On my jsp pages I have the following code:


   
  



(On my jsp page I only have one html:form tag)

In my SaveAction class I collect the submit value from the request, like
this:

String submit = request.getParameter("submit");

The submit value is null.

I'm using the Struts 1.02 beta version. Have anybody experienced the same
problem??

So thankful for som help :)

/Linnéa Ahlbeck

Linnéa Ahlbeck - Software Engineer



RE: Help needed with Indexed Tags, Contributor taglib by Dave Hays

2002-10-29 Thread Linnea Ahlbeck
Hi!

Thanks for your tip! Unfortunaltey it did not solve my problem.
The line:



causes the same error as before:

javax.servlet.ServletException: No getter method for property subject of
> bean mondayEvent

In the class the mondayEvent is an instance of - should there be anything
else than a setter and a getter for the value I want to show on my jsp page?

Thanks!

/Linnéa

-Original Message-
From: deepak [mailto:deepak@;ltp.soft.net]
Sent: Tuesday, October 29, 2002 12:48 PM
To: Struts Users Mailing List
Subject: Re: Help needed with Indexed Tags, Contributor taglib by Dave
Hays


Try doing this




  




- Original Message -
From: "Linnea Ahlbeck" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 3:55 PM
Subject: Help needed with Indexed Tags, Contributor taglib by Dave Hays


> Hi!
>
> I'm using the indexed tag lib written by Dave Hays.
>
> On my jsp page I have the following code:
>
>  property="mondayEventList">
> property="subject" indexed="true"/>
> 
>
>
> In my formbean I have a the following getters:
>
>public List getMondayEventList() {
>   return mondayEventList;
>}
>
>public CalendarEvent getMondayEvent(int index) {
>   return (CalendarEvent) mondayEventList.get(index);
>}
>
> In my CalendarEvent class I have the following getter:
>
> public String getSubject() {
>  return subject;
>   }
>
>
> Still, I get the following error message:
>
> javax.servlet.ServletException: No getter method for property subject of
> bean mondayEvent
>
> The 'mondayEvent' is found correctly I guess but the subject getter can't
be
> reached.
> Have anyone experienced the same problem?? Thankful for help!!
>
> /Linnéa
>
>
> 
> Linnéa Ahlbeck - Software Engineer
> phone +46 40 664 29 70
> fax +46 40 30 32 62
> mobile +46 708 96 14 56
>
> Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden
> www.appium.com
>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Help needed with Indexed Tags, Contributor taglib by Dave Hays

2002-10-29 Thread Linnea Ahlbeck
Hi!

I'm using the indexed tag lib written by Dave Hays.

On my jsp page I have the following code:


   



In my formbean I have a the following getters:

   public List getMondayEventList() {
  return mondayEventList;
   }

   public CalendarEvent getMondayEvent(int index) {
  return (CalendarEvent) mondayEventList.get(index);
   }

In my CalendarEvent class I have the following getter:

public String getSubject() {
 return subject;
  }


Still, I get the following error message:

javax.servlet.ServletException: No getter method for property subject of
bean mondayEvent

The 'mondayEvent' is found correctly I guess but the subject getter can't be
reached.
Have anyone experienced the same problem?? Thankful for help!!

/Linnéa



Linnéa Ahlbeck - Software Engineer
phone +46 40 664 29 70
fax +46 40 30 32 62
mobile +46 708 96 14 56

Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden
www.appium.com



Re: two submit buttons

2002-01-10 Thread Linnea Ahlbeck

Hi!!

I have problems with several submit buttons too -  a question - the
attribute accesskey in the html:submit tag - is it possible to use it to
somehow move focus a certain submit button in the form so this submit
button's action will be executed if you press enter? Has anybody tried this?

/ Linnéa



- Original Message -
From: "Andrew B Forman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 3:13 PM
Subject: RE: two submit buttons


> Hi Mur,
>
> there are two possible diagnosies i see:
>
> one: Internet Explorer automatically selects the
> first submit when the user hits enter
> (Netscape doesn't).  Mostly likely what you
> would want to do is intercept the enter key.
> (
>
http://faqchest.dynhost.com/msdn/IE-HTML/script-99/script-9907/script9907290
> 5_17902.html )
> ( see Intercept keyCode 13 )
>
> two: a little known addition to html 2.0
> was that if you have a form with one input
> type=text hitting enter will submit the
> form without going through the submit
> button.
> ( http://ppewww.ph.gla.ac.uk/%7Eflavell/www/formquestion.html )
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 10, 2002 10:37 AM
> > To: Struts Users Mailing List
> > Subject: two submit buttons
> >
> >
> >
> >
> > Hi all,
> > I have two submit image in my JSP . when  the user presses the
> > 'ENTER' key the
> > first occurance of the Submit button in my JSP gets invoked. This
> > leads to a
> > problem as my first submit button is a previous button and next
> > is the submit
> > button. I cannot change the sequence of button on the jsp as it
> > directly affects
> > the view.
> > Can anybody suggest me how to handle this problem
> > This could be of some help
> >  > onclick="return previous();"/>
> >  > onclick="return Confirm();"/>
> > Thanks in advance
> > Regards
> > Mur.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




- how do I use the attribute "accesskey"?

2002-01-03 Thread Linnea Ahlbeck

Hi!

I have several submit buttons on a jsp page and wants to use the accesskey
attribute to decide which submit button that shoul be connected to the enter
key! Can't get it rightAny suggestions???

Thanks in advance!

/Linnéa


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Another questions about checkboxes

2002-01-03 Thread Linnea Ahlbeck

Hi Alex!

Have you solved your problem yet? I was facing the same situation a cuple of weeks ago.

All values from your formbean are sent in the request as parameters when you
press submit - but checkbox values are only in the request if they have the
value on = they are checked. The reset method works like this:  values are first set 
to false by the reset method and then, if they are present i the request they receive 
value true, otherwise the have the value false. 

Is your problem the following: when you come to your second page the values are 
correct but when you submit this page you go to an action class that forwards to the 
first page - is that correct or do you go via two action classes to reach the first 
page from the second page? 

Anyway, since the formbean values are present as parameters in scope request, they are 
not found the last time the reset method is called. First the reset method sets the 
checkbox values to false, after that no parameters are found in the request and thats 
way the final checkbox value is false, even though it was true on your second page.

I solved this problem by checking the formbean's checkbox values in the first action 
class after my second page and when I forwarded to a second action class before my 
first page was shown again I added parameters to the requset manually if the checkbox 
value was on = true. When the reset method was called these parameters were found and 
the formbean was populated in a correct way.

Good luck / Linnéa

By the way:

A while ago someone sent an alternative version of the doStartTag that should solve 
the checkbox problem: new version for doStartTag() method :


public int doStartTag() throws JspException {
// Create an appropriate "hidden" element to put it before the "input" element
// with value false. This will force to uncheck in the ActionForm if the checkbox 
// is not checked 
StringBuffer resultsHidden = new StringBuffer("");
if (accesskey != null) {
results.append(" accesskey=\"");
results.append(accesskey);
results.append("\"");
}
if (tabindex != null) {
results.append(" tabindex=\"");
results.append(tabindex);
results.append("\"");
}
results.append(" value=\"");
if (value == null)
results.append("on");
else
results.append(value);
results.append("\"");
Object result = RequestUtils.lookup(pageContext, name, property, null);
if (result == null)
result = "";
if (!(result instanceof String))
result = result.toString();
String checked = (String) result;
if (checked.equalsIgnoreCase("true")
|| checked.equalsIgnoreCase("yes")
|| checked.equalsIgnoreCase("on"))
results.append(" checked=\"checked\"");
results.append(prepareEventHandlers());
results.append(prepareStyles());
results.append(">");

// Print this field to our output writer
ResponseUtils.write(pageContext, results.toString() + resultsHidden.toString());

// Continue processing this page
this.text = null;
return (EVAL_BODY_TAG);

}




 
Linnéa Ahlbeck - Software Engineer 
phone +46 40 664 29 70 fax +46 40 30 32 62 
mobile +46 708 96 14 56 

Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden 
www.appium.com 



Re: Another questions about checkboxes

2002-01-03 Thread Linnea Ahlbeck

Hi Alex!

Have you solved your problem yet? I was facing the same situation a cuple of
weeks ago.

All values from your formbean are sent in the request as parameters when you
press submit - but checkbox values are only in the request if they have the
value on = they are checked. The reset method works like this:  values are
first set to false by the reset method and then, if they are present i the
request they receive value true, otherwise the have the value false.

Is your problem the following: when you come to your second page the values
are correct but when you submit this page you go to an action class that
forwards to the first page - is that correct or do you go via two action
classes to reach the first page from the second page?

Anyway, since the formbean values are present as parameters in scope
request, they are not found the last time the reset method is called. First
the reset method sets the checkbox values to false, after that no parameters
are found in the request and thats way the final checkbox value is false,
even though it was true on your second page.

I solved this problem by checking the formbean's checkbox values in the
first action class after my second page and when I forwarded to a second
action class before my first page was shown again I added parameters to the
requset manually if the checkbox value was on = true. When the reset method
was called these parameters were found and the formbean was populated in a
correct way.

Good luck / Linnéa

By the way:

A while ago someone sent an alternative version of the doStartTag that
should solve the checkbox problem: new version for doStartTag() method :


public int doStartTag() throws JspException {
// Create an appropriate "hidden" element to put it before the "input"
element
// with value false. This will force to uncheck in the ActionForm if the
checkbox
// is not checked
StringBuffer resultsHidden = new StringBuffer("");
if (accesskey != null) {
results.append(" accesskey=\"");
results.append(accesskey);
results.append("\"");
}
if (tabindex != null) {
results.append(" tabindex=\"");
results.append(tabindex);
results.append("\"");
}
results.append(" value=\"");
if (value == null)
results.append("on");
else
results.append(value);
results.append("\"");
Object result = RequestUtils.lookup(pageContext, name, property, null);
if (result == null)
result = "";
if (!(result instanceof String))
result = result.toString();
String checked = (String) result;
if (checked.equalsIgnoreCase("true")
|| checked.equalsIgnoreCase("yes")
|| checked.equalsIgnoreCase("on"))
results.append(" checked=\"checked\"");
results.append(prepareEventHandlers());
results.append(prepareStyles());
results.append(">");

// Print this field to our output writer
ResponseUtils.write(pageContext, results.toString() +
resultsHidden.toString());

// Continue processing this page
this.text = null;
return (EVAL_BODY_TAG);

}





Linnéa Ahlbeck - Software Engineer
phone +46 40 664 29 70 fax +46 40 30 32 62
mobile +46 708 96 14 56

Appium AB - Adelgatan 5, SE-211 22 Malmö, Sweden
www.appium.com
- Original Message -
From: "Alex Colic" <[EMAIL PROTECTED]>
To: "Struts" <[EMAIL PROTECTED]>
Sent: Wednesday, January 02, 2002 4:04 PM
Subject: Another questions about checkboxes


> Hi,
>
> I have a form that has a Boolean property that in the form reset method is
> reset to false.
> This form is used over two pages. In the first page there is a checkbox
that
> the user can select to modify this Boolean property. This page is
submitted
> to an action class that just forwards to the second page. In the second
page
> I display the checkbox value. After the second page the form is submitted
to
> another action to process.
>
> The problem. In the first page the checkbox works correctly. In the second
> page, which is a summary page of selections on the first page, the form
> values are shown correctly. When the second page gets submitted to the
last
> action class, the checkbox is reset to false and that is the value that
the
> action class gets.
>
> I know that the second page, even though it only displays the values shown
> in the first page, is calling the reset method of the form. I need the
reset
> method to set the Boolean to false because the user might go back a page
and
> uncheck the checkbox.
>
> Does anyone have any experience of using checkboxes when the form goes
over
> multiple pages? Any ideas on how I can fix this.
>
> Thanks a lot of any help.
>
> Alex
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Checkbox's question.

2001-12-17 Thread Linnea Ahlbeck

Hi!!

I think it's a bug...

Javascript is funny but it slows down the prestanda a lot

/Linnéa

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 8:27 PM
Subject: RE: Checkbox's question.


So it is the way supposed to be or just a bug of struts?

-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 1:41 PM
To: 'Struts Users Mailing List'
Subject: RE: Checkbox's question.


I was just thinking about this problem, too.  I think this
checkbox-in-request-only-when-checked anomaly should be handled with
javascript like this:

The checkbox jsp tag should create a hidden field named after the property,
and a checkbox with some other name.  When the checkbox is checked or
unchecked, it should change the value of the hidden field with a generated
line of javascript.

This way, the controller doesn't have to know that the field is rendered as
a checkbox (and do this special checkbox jig), and the field's value is only
changed when the field exists in the request.  So if another jsp doesn't
have the checkbox at all, the value isn't touched.

Dan

> -Original Message-
> From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 10:29 AM
> To: Struts Users Mailing List
> Subject: Re: Checkbox's question.
>
>
> Hi!!
>
> All values from your formbean are sent in the request as
> parameters when you
> press submit - but checkbox values are only in this request
> if they have the
> value on = they are checked. If you use the reset method it
> should work in a
> correct way  -  values are first set to false by the reset
> method and then,
> if they are present i the request they receive value true,
> otherwise the
> have the value false. /Linnéa
>
>
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 17, 2001 7:07 PM
> Subject: RE: Checkbox's question.
>
>
> coincidentally, I was working on the check box today for the
> first time. I
> found the problem too.
> It seems OK when you set the check box "unchecked" as defaut
> (openWindow=null;). but when you set it "checked" as default,
> each time you
> uncheck the box and submit. the value won't change, it still remained
> checked. In fact. the setOpenWindow(..) function has never
> been called when
> the box was unchecked. It is only called when the check box
> is checked.
> Any one knows what went wrong?
>
> Thanks
>
> Yunming Li
>
> -Original Message-
> From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 17, 2001 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: Checkbox's question.
>
>
> Hi!
>
> Use the reset method in the form bean:
>
> public void reset(ActionMapping mapping, HttpServletRequest request) {
>   openWindow= false;
>  }
>
> This is a well known problem, see link:
> http://www.jguru.com/faq/view.jsp?EID=471957
>
> Good luck / Linnéa
>
>
> - Original Message -
> From: "Hong Xing" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 17, 2001 4:05 PM
> Subject: Checkbox's question.
>
>
> Hi all,
> I am a newbie.
> I used  in my work. But it worked strange. When I
> first view the page and submit the form, the checkbox is OK. Then if I
> view the page again and change the checkbox's state, the
> checkbox is not
> ok. It's always checked. How to fix it?
> 
>
> public void setOpenWindow(String openWindow)
> {
> this.openWindow=openWindow;
> }
> public String getOpenWindow()
> {
> return openWindow;
> }
> private String openWindow="on";
>
> Please help me!!!
>
> Sincerely, Hong Xing
>
>
> ==
> Bioinformatics Department
> Beijing Genomics Institute
> Beijing Center
> Beijing Airport Industrial Zone B6
> Beijing 101300
> Tel: 0086-10-80494199-3306(Office)
> Email : [EMAIL PROTECTED]
> ==
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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


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




Re: Checkbox's question.

2001-12-17 Thread Linnea Ahlbeck

Hi!!

All values from your formbean are sent in the request as parameters when you
press submit - but checkbox values are only in this request if they have the
value on = they are checked. If you use the reset method it should work in a
correct way  -  values are first set to false by the reset method and then,
if they are present i the request they receive value true, otherwise the
have the value false. /Linnéa



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 7:07 PM
Subject: RE: Checkbox's question.


coincidentally, I was working on the check box today for the first time. I
found the problem too.
It seems OK when you set the check box "unchecked" as defaut
(openWindow=null;). but when you set it "checked" as default, each time you
uncheck the box and submit. the value won't change, it still remained
checked. In fact. the setOpenWindow(..) function has never been called when
the box was unchecked. It is only called when the check box is checked.
Any one knows what went wrong?

Thanks

Yunming Li

-Original Message-
From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 11:51 AM
To: Struts Users Mailing List
Subject: Re: Checkbox's question.


Hi!

Use the reset method in the form bean:

public void reset(ActionMapping mapping, HttpServletRequest request) {
  openWindow= false;
 }

This is a well known problem, see link:
http://www.jguru.com/faq/view.jsp?EID=471957

Good luck / Linnéa


- Original Message -
From: "Hong Xing" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 4:05 PM
Subject: Checkbox's question.


Hi all,
I am a newbie.
I used  in my work. But it worked strange. When I
first view the page and submit the form, the checkbox is OK. Then if I
view the page again and change the checkbox's state, the checkbox is not
ok. It's always checked. How to fix it?


public void setOpenWindow(String openWindow)
{
this.openWindow=openWindow;
}
public String getOpenWindow()
{
return openWindow;
}
private String openWindow="on";

Please help me!!!

Sincerely, Hong Xing


==
Bioinformatics Department
Beijing Genomics Institute
Beijing Center
Beijing Airport Industrial Zone B6
Beijing 101300
Tel: 0086-10-80494199-3306(Office)
Email : [EMAIL PROTECTED]
==




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



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


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




Re: Checkbox's question.

2001-12-17 Thread Linnea Ahlbeck

Hi!

Use the reset method in the form bean:

public void reset(ActionMapping mapping, HttpServletRequest request) {
  openWindow= false;
 }

This is a well known problem, see link:
http://www.jguru.com/faq/view.jsp?EID=471957

Good luck / Linnéa


- Original Message -
From: "Hong Xing" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 4:05 PM
Subject: Checkbox's question.


Hi all,
I am a newbie.
I used  in my work. But it worked strange. When I
first view the page and submit the form, the checkbox is OK. Then if I
view the page again and change the checkbox's state, the checkbox is not
ok. It's always checked. How to fix it?


public void setOpenWindow(String openWindow)
{
this.openWindow=openWindow;
}
public String getOpenWindow()
{
return openWindow;
}
private String openWindow="on";

Please help me!!!

Sincerely, Hong Xing


==
Bioinformatics Department
Beijing Genomics Institute
Beijing Center
Beijing Airport Industrial Zone B6
Beijing 101300
Tel: 0086-10-80494199-3306(Office)
Email : [EMAIL PROTECTED]
==




--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Hi I'm totally new, yes a total idiot on STRUTS ;-)

2001-12-14 Thread Linnea Ahlbeck

Hi!

I have a link to good article to start with, gives a good overview. Examples
are included!

Check:
http://www7.software.ibm.com/vad.nsf/data/document2557?OpenDocument&p=1&BCT=
1&Footer=1


/Linnéa


- Original Message -
From: "Samuele Brignoli" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 10:27 AM
Subject: Hi I'm totally new, yes a total idiot on STRUTS ;-)


> Hi all,
> I'm totally new on jakarta-struts. As you surely know I've got a mountain
of
> documentation on my desk and I can't figure out where to start. I've got
> JBuilder 5 Enterprise and I' ve got an Oracle db. I' ve got a couple of
> things to do in my existence. The first is to write an e-commerce
> application suitable for all my customers and really easy to maintain and
> customize. The second is to put up a sort of content-manager with
role-based
> authentication to permit to my customers to publish datas without HTML or
> similar knowledge... I know, these are the things that all want !!! ;-)
But
> can you help me in some way to better and quickly understand this
> interesting way of coding, and maybe some reusable code and configuration
> written by some goog guy ? I need only a couple of directive to suitable
> begin my trip in this adventure. Can you help me ?
>
> bye, kako --
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Checkboxes + reset + scope=session doesn't work...

2001-12-14 Thread Linnea Ahlbeck

Hi!!

I have a checkbox problem.

On my jspA page I have two checkboxes. From this jsp page I go to
saveaAction class A, this class sometimes forwards to a viewAction class
B(depending on a submit value), which forwards to jsp page B, which forwards
so saveAction class B which forwards to viewAction class A and the the first
jsp page(A) is shown again. In viewAction class A, saveAction classA and
saveActin classB I use the form bean A. Are you with me?!!

My problem is:

1) If scope is set to request in ViewActionA.do in my struts-confg.xml
file -  the checkbox values set on jsp page A are lost in the last forward
action (between saveAction class B and viewAction class A).

2) If scope is set to session in ViewActionA.do in my struts-confg.xml file
, the checkbox values are lost immediately in the first forward action.

I am aware of the "known " checkbox problem and uses the reset method in my
form bean.
Is this problem familiar to someone?
Has anybody tried gridcheckboxes? Are they better to use?

Thanks in advance - Linnéa


- Original Message -
From: "Shashi" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 5:08 AM
Subject: Re: preselected checkboxes


> You can have one FormBean having the scope set to session (in
> struts-config.xml), used accross all the JSP pages. In the JSP pages use
the
> "jsp:useBean" tag to have the same FormBean in the session. In all the JSP
> send the action to a single action class. To distinguish between different
> pages in the Action Class have a session variable to identify the page
> number and set it in each page.
>
> Hope this helps.
>
> --Shashi.
>
> - Original Message -
> From: "Crisalyn Ramos" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, December 14, 2001 8:09 AM
> Subject: preselected checkboxes
>
>
> > Hi, all. I have several checkboxes in several JSP pages. In each page,
> > there are different sets of checkboxes that needs to be in checked
> > status during page loads.
> >
> > The option I have in mind is to make a separate ActionForm and Action
> > class for each page but I thought that maintenance wise this is not
> > appropriate because I need to revise several classes when some procedure
> > changes.
> >
> > The Action that needs to be done is the same accross all JSP pages, just
> > that these pages has different sets of accounts that needs to be in
> > checked status during page load.
> >
> > Any design technique to handle this?
> >
> > thanks,
> > Cris
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Checkbox problem still not fixed :(

2001-06-28 Thread Linnea Ahlbeck



Hi! 
I had a similar problem and solved it by changing 
the attribute scope in my 
action in the struts-config.xml file to request 
instead of session.
/Linnéa

  - Original Message - 
  From: 
  Joel Vogt 
  
  To: [EMAIL PROTECTED] 
  Sent: Thursday, June 28, 2001 10:04 
  AM
  Subject: Checkbox problem still not fixed 
  :(
  
  Hi everyone.
   
  I've tried just about everything in the mail 
  archive but can't get check/multi boxes to perform how I want to.
  I use an iterate tag over a collection, basically 
  on my jsp page I have as follows
   
  
  blah  blah  
  
   
  In my form bean I have an array pk[] and another 
  member[].
  In the reset method I do:
  for(int i = 
0;i
      member[i] = 
  "false";
   
  When I check the values off the form in my action 
  class, i still only get the values set to true. I need a long list, true, 
  false, true, true etc for all the values.
   
  Sorry to be a pain but can someone give me some 
  sort of 'exact' steps to solve the problem? I haven't been able to piece 
  together all the help on the mail archive.
   
  Thanks,
  Joel
  [EMAIL PROTECTED]


Re: design question

2001-06-26 Thread Linnea Ahlbeck

Hi!

In the struts-config.xml-file:


   
  
  
   

Hope I understood your problem correctly and that this can help you!!
/Linnéa

- Original Message -
From: "Vandenberk, Kris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 10:26 AM
Subject: design question


> I have a detail screen with some fields on it
> and a save button, reset button and a link to the master page...
>
> How do I return to the same page after the save ?
> let say the link to this page is something like
> /editPersonalInfo.do?action=edit
>
>
> thanks,
> Kris
>
> P.S. can you put me in cc when replying I am using a different email
account
> here at work
> [EMAIL PROTECTED]
>
>
>
>
>




Re: Indexed property of ActionForm

2001-06-25 Thread Linnea Ahlbeck

Hi!!

Try to use a vector instead of String[]!

/Linnéa
- Original Message -
From: "Thai Thanh Ha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 10:16 AM
Subject: Indexed property of ActionForm


>
> I want to get value for an attribute named "vehicleTypes" in my
ActionForm.
> This is an array of Strings. But I don't know how to do it. Struts always
> reports internel server error(500) when I  try to submit the form. Please
> help me!
>
> This is my ActionForm:
> --
> public final class SearchVehicleForm extends ActionForm {
>
> private String[] vehicleTypes;
>
> public String[] getVehicleTypes() {
> return vehicleTypes;
> }
>
> public void setVehicleTypes(String[] vehicleTypes) {
> this.vehicleTypes = vehicleTypes;
> }
> }
>
>
> This is the exception from Tomcat's log file
> ---
> 2001-06-25 15:22:54 StandardWrapperValve[action]: Servlet.service() for
> servlet action threw exception
> javax.servlet.ServletException: BeanUtils.populate
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
> at
>
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
> 61)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:254)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:194)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:255)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:225)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> )
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :163)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> 875)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
> at java.lang.Thread.run(Thread.java:484)
> - Root Cause -
> java.lang.IllegalArgumentException: argument type mismatch
> at java.lang.reflect.Method.invoke(Native Method)
> at
>
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98
> 8)
> at
>
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90
> 4)
> at
> org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932)
> at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509)
> at
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772)
> at
>
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
> 61)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563)
> at
> org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:254)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:194)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:255)
> at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at
> org.apache.catalina.core.ContainerBase.in

Re: form is null in Action

2001-06-20 Thread Linnea Ahlbeck



Hi!!
 
In your struts-config.xml-file - is your form-bean correctly defined 
there??
 
      
type="Web.AddressBook.AddressForm"/>
 
The formbean should also be specified in your the action, tag name:
 
        
type="Web.AddressBook.EditAddressAction"    
name="addressForm"    
scope="session"    
validate="false">       

 
Hope this can help!! 
 
/Linnéa
 
- Original Message - 

  From: 
  Michelle Popovits 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, June 20, 2001 5:47 
  PM
  Subject: form is null in Action
  
  
  Hi,
   
   
  - In my SEARCH action I retrieve the required 
  data from a datasource based on user entered search criteria.
  - I place this data in a new EDIT Form 
  instance and place it in the session.
  - I Then forward to the EDIT jsp (which uses the 
  EDIT Form) and the data is displayed nicely in a table.
  - I then click SUBMIT which sends me to the EDIT 
  Action.
  - In the EDIT action the form argument is 
  null.  I am expecting that my EDIT Form would be available here.  If 
  I do a getAttribute from the session the EDIT Form is there.
   
  Why is the form argument in the perform() method 
  of the EDIT action null?
   
  Thanks,
  Michelle


Re: select options doesn't work

2001-06-15 Thread Linnea Ahlbeck

Hi!

Try to change your property for the option to a boolean!!

private String strValue;

private boolean value;

/Linnéa
- Original Message -
From: "Pal, Gaurav" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:18 PM
Subject: select options doesn't work


> Hi,
> I have been trying to get the select options tag to work in the html tag
> library. I tried to follow the sample code given in the struts-mailing
list.
> I keep getting jsp exceptions at
> org.apache.struts.taglib.template.InsertTag.doEndTag ...
>
> The code snippets are below...any help is appreciated.
> Thanks,
> Gaurav
>
> 
>  scope="request" />
>
>
>labelProperty="description" />
>
>
>
> Here is my bean with a Vector consisting of Option objects with value and
> description as the property.
>
>
> public class MyForm extends ActionForm
> {
>private Vector marketList;
>public void setMarketList(Vector marketList)
>{
>   // SBgen: Assign variable
>   this.marketList = marketList;
>}
>
>public Vector getMarketList()
>{
>   // SBgen: Get variable
>   return(marketList);
>}
> }
>
> class Option
> {
>private String strValue;
>private String strDescription;
>
>public void setValue(String value)
>{
>   strValue = value;
>}
>
>public String getValue()
>{
>   return strValue;
>}
>
>public void setDescription(String description)
>{
>   strDescription = description;
>}
>
>public String getDescription()
>{
>   return strDescription;
>}
> }
>




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-15 Thread Linnea Ahlbeck

Hi Pete!!

This works, I didn´t know that I could use the target attribute in the
 tag! Thanks! Do you also know how to specify the "old window" as
target from the second window , I would like to return to the first window
when the actions here are done?

/Linnéa

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 7:33 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???




On Thu, 14 Jun 2001, Peter Alfors wrote:

>
> What happens when you execute this?
>
>  target="_blank">
>
> I would think that this should do what you want??
>

You can also use the "target" attribute on an  or 
tag:

  

  

  

One advantage to this is that URL rewriting is automatically applied to
maintain session state even if you're not using cookies.

> Pete
>

Craig


>
> >  -Original Message-
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>






Re: Accessing session attributes

2001-06-14 Thread Linnea Ahlbeck

Hi!

You can access session attributes and their values by using the bean:write
tag. For example - in the following tag myScheduleWeekDayStopTime is a
session attribute. (Here the value is written on the form as plain text and
not in a text field).

Hope this can help!

/Linnéa



- Original Message -
From: "James Howe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 4:59 PM
Subject: Accessing session attributes


> This is probably a stupid question, but here it goes.  I have a handful of
> string values that I'm storing in the session object.  These values aren't
> associated with any "bean" (actually, in a sense the session object is the
> bean).  I have a couple of places where I need to display these values in
a
> form.  I want to use the  tag, but I don't know what I need to
> specify.  Let me give an example.  Suppose I have a String value stored in
> the session by the name of "filter".  How would I get the "filter" value
to
> display in a form text field?
>
> Thanks.
>
>




Re: struts-config.xml - How do I open a "success" path as a new window???

2001-06-14 Thread Linnea Ahlbeck

Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:



in Struts-Config.xml this action looks like this:

   
  
  
  
  
   

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

path="/viewInsertAddress.do?action=Insert"/>

The action in struts_config.xml looks like this:


   
  
  
   

>From this class I return success and the path is :

path="/InsertAddress.jsp"/>

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



- Original Message -
From: "Peter Alfors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???


> Your javascript code looks correct.  :)
>
> However, if at all possible, I would avoid using javascript.  Basically,
> because the user may have javascript turned off in their browser.
>
> Pete
>
> Abraham Kang wrote:
>
> > Hi Linnea,  I think it would be easier to use > href="javascript:window.open('yourAction.do','windowName',
> > 'status=no')">Your action will return mapping.findForward("success")
> > to load the popup windows contents.Pete,  my javascript is rusty so if
> > you see any errors please correct.--Abraham
> >
> >  -Original Message-
> >  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >  Sent: Wednesday, June 13, 2001 1:52 AM
> >  To: [EMAIL PROTECTED]
> >  Subject: struts-config.xml - How do I open a "success" path
> >  as a new window???
> >
> >  Hi!!
> >
> >  I want to my path
> >
> >  
> >
> >  to open the jsp-page as a new window/page ( like the html
> >  tag
> >
> >  http://./";
> >  target="_blank"> )
> >
> >  Any ideas how to do this with struts???
> >
> >  Thanks / Linnéa
> >
> >
> >
>




Re: action help

2001-06-13 Thread Linnea Ahlbeck



 
Hi!
 
Use the  tag instead of the  tag in the jsp page; 

 

 
Maby this can help???
 
/L

  - Original Message - 
  From: 
  Mike Thompson 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, June 13, 2001 3:24 
  PM
  Subject: action help
  
  Ok, I'm feeling totally lost.
   
  Here is a snippet from my 
  struts-config.xml
   
    
          
  type="com.instanton.secureex.web.action.service.ListServiceAction">    
      
  
      ...
      
  
   
  now in a jsp page I have
      
      
      
  
  I do have /*.do aliased for the 
  ActionServlet.
   
  Why is this not working?  I am using TomCat 
  4.0b1 in Suns j2ee reference container.  Thanks in advance.
      --m
   
  Michael R. Thompsonhttp://www.instanton.com512.439.3815


struts-config.xml - How do I open a "success" path as a new window???

2001-06-13 Thread Linnea Ahlbeck




Hi!!
I want to my path
    path="/InsertAddress.jsp"/>
to open the jsp-page as a new window/page ( like the html tag 
target="_blank"> )
Any ideas how to do this with struts???
Thanks / Linnéa