Re: Radio button selection is not being saved on the front end

2024-03-12 Thread Lukasz Lenart
You can test 6.4.0-SNAPSHOT and confirm if this fixes the problem.
https://nightlies.apache.org/struts/snapshot/
https://struts.apache.org/builds.html#maven-snapshots


pon., 11 mar 2024 o 10:52 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> My apologies yes I meant Struts 2.5 So this means I have to wait for Struts 
> 6.4 before the radio button will be able to display on the frontend?
> Kindly confirm. Thank you.
>
> Regards
> Mahabir
>
> On Mon, Mar 11, 2024 at 5:29 PM Lukasz Lenart  wrote:
>>
>> I assume you meant Struts 2.5 and I assume you have followed the migration 
>> guide
>> https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration
>>
>> And this can be related to what Nate is suggesting
>>
>> pon., 11 mar 2024 o 09:29 Mahabir Gupta  napisał(a):
>> >
>> > Dear Lukasz,
>> >
>> > I upgraded from Struts 2-6 to struts 6.3.0.2.
>> > Thank you.
>> >
>> > Regards
>> > Mahabir
>> >
>> > On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  
>> > wrote:
>> >>
>> >> Łukasz,
>> >>
>> >> I think this might be related to the issue I reported in November last 
>> >> year which will be fixed in Struts 6.4 
>> >> (https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean 
>> >> radio button, it does sound like this is because the value is being 
>> >> processed as a string literal and not as an Ognl expression.
>> >>
>> >> Cheers,
>> >>
>> >> Nate
>> >>
>> >> -Original Message-
>> >> From: Lukasz Lenart 
>> >> Sent: Monday, 11 March 2024 07:23
>> >> To: Struts Users Mailing List 
>> >> Subject: Re: Radio button selection is not being saved on the front end
>> >>
>> >> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
>> >> > The radio button is working perfectly when using Struts2. I only did an 
>> >> > upgrade the Struts6.3.0.2 without making any changes to the code. When 
>> >> > using Struts6.3.0.2 the radio button issue arises. There is no change 
>> >> > of code made.
>> >>
>> >> Could you provide more information from which version you have migrated 
>> >> as there is no such data in your first message?
>> >>
>> >>
>> >> Cheers
>> >> Łukasz
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>>
>>
>> --
>> Łukasz
>> mobile +48 606 323 122 http://www.lenart.org.pl/
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Radio button selection is not being saved on the front end

2024-03-11 Thread Lukasz Lenart
I assume you meant Struts 2.5 and I assume you have followed the migration guide
https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration

And this can be related to what Nate is suggesting

pon., 11 mar 2024 o 09:29 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> I upgraded from Struts 2-6 to struts 6.3.0.2.
> Thank you.
>
> Regards
> Mahabir
>
> On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  wrote:
>>
>> Łukasz,
>>
>> I think this might be related to the issue I reported in November last year 
>> which will be fixed in Struts 6.4 
>> (https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean 
>> radio button, it does sound like this is because the value is being 
>> processed as a string literal and not as an Ognl expression.
>>
>> Cheers,
>>
>> Nate
>>
>> -Original Message-
>> From: Lukasz Lenart 
>> Sent: Monday, 11 March 2024 07:23
>> To: Struts Users Mailing List 
>> Subject: Re: Radio button selection is not being saved on the front end
>>
>> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
>> > The radio button is working perfectly when using Struts2. I only did an 
>> > upgrade the Struts6.3.0.2 without making any changes to the code. When 
>> > using Struts6.3.0.2 the radio button issue arises. There is no change of 
>> > code made.
>>
>> Could you provide more information from which version you have migrated as 
>> there is no such data in your first message?
>>
>>
>> Cheers
>> Łukasz
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>


-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Radio button selection is not being saved on the front end

2024-03-11 Thread Mahabir Gupta
Dear Lukasz,

I upgraded from Struts 2-6 to struts 6.3.0.2.
Thank you.

Regards
Mahabir

On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  wrote:

> Łukasz,
>
> I think this might be related to the issue I reported in November last
> year which will be fixed in Struts 6.4 (
> https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean
> radio button, it does sound like this is because the value is being
> processed as a string literal and not as an Ognl expression.
>
> Cheers,
>
> Nate
>
> -Original Message-
> From: Lukasz Lenart 
> Sent: Monday, 11 March 2024 07:23
> To: Struts Users Mailing List 
> Subject: Re: Radio button selection is not being saved on the front end
>
> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> > The radio button is working perfectly when using Struts2. I only did an
> upgrade the Struts6.3.0.2 without making any changes to the code. When
> using Struts6.3.0.2 the radio button issue arises. There is no change of
> code made.
>
> Could you provide more information from which version you have migrated as
> there is no such data in your first message?
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: Radio button selection is not being saved on the front end

2024-03-11 Thread Nate Kerkhofs
Łukasz,

I think this might be related to the issue I reported in November last year 
which will be fixed in Struts 6.4 
(https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean radio 
button, it does sound like this is because the value is being processed as a 
string literal and not as an Ognl expression.

Cheers,

Nate

-Original Message-
From: Lukasz Lenart  
Sent: Monday, 11 March 2024 07:23
To: Struts Users Mailing List 
Subject: Re: Radio button selection is not being saved on the front end

pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> The radio button is working perfectly when using Struts2. I only did an 
> upgrade the Struts6.3.0.2 without making any changes to the code. When using 
> Struts6.3.0.2 the radio button issue arises. There is no change of code made.

Could you provide more information from which version you have migrated as 
there is no such data in your first message?


Cheers
Łukasz

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Radio button selection is not being saved on the front end

2024-03-11 Thread Lukasz Lenart
pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> The radio button is working perfectly when using Struts2. I only did an 
> upgrade the Struts6.3.0.2 without making any changes to the code. When using 
> Struts6.3.0.2 the radio button issue arises. There is no change of code made.

Could you provide more information from which version you have
migrated as there is no such data in your first message?


Cheers
Łukasz

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Radio button selection is not being saved on the front end

2024-03-10 Thread Mahabir Gupta
Dear Lukasz,

The radio button is working perfectly when using Struts2. I only did an
upgrade the Struts6.3.0.2 without making any changes to the code. When
using Struts6.3.0.2 the radio button issue arises. There is no change of
code made.
Thank you.

Regards
Mahabir

On Sat, Mar 9, 2024 at 10:37 PM Lukasz Lenart 
wrote:

> śr., 6 mar 2024 o 08:08 Mahabir Gupta  napisał(a):
> > DotsCarRental dotsCarRental = new DotsCarRental();
> > dotsCarRental = (DotsCarRental)
> session.getAttribute(DBConstants.sessionCarId);
>
> You don't have to create an instance if in the next line you assign a
> value from session, this is enough:
>
> DotsCarRental dotsCarRental = (DotsCarRental)
> session.getAttribute(DBConstants.sessionCarId);
>
> > request.setAttribute("dotsCarRentalForm",frm);
> >  listKey="lookupTitle" listValue="lookupTitle" />
>
> You assign the form to the "dotsCarRentalForm" request attribute but
> in the value attribute you call "#frm.rentalReason" - maybe this is
> the problem.
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Radio button selection is not being saved on the front end

2024-03-09 Thread Lukasz Lenart
śr., 6 mar 2024 o 08:08 Mahabir Gupta  napisał(a):
> DotsCarRental dotsCarRental = new DotsCarRental();
> dotsCarRental = (DotsCarRental) 
> session.getAttribute(DBConstants.sessionCarId);

You don't have to create an instance if in the next line you assign a
value from session, this is enough:

DotsCarRental dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);

> request.setAttribute("dotsCarRentalForm",frm);
>  listKey="lookupTitle" listValue="lookupTitle" />

You assign the form to the "dotsCarRentalForm" request attribute but
in the value attribute you call "#frm.rentalReason" - maybe this is
the problem.


Cheers
Łukasz

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Radio button selection is not being saved on the front end

2024-03-05 Thread Mahabir Gupta
Hi,

I have some radio button where I can select one radio button at a time and
safe it. It is being saved in the database but on the frontend it is not
being saved.

public class getDotsCarRentalAction extends GenericMappingDispatchAction{

public String saveCr(){
HttpSession session = request.getSession();
String result = null;
DotsCarRentalForm frm = null;
DotsCarRental dotsCarRental = new DotsCarRental();
dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);
frm = (DotsCarRentalForm) form;
dotsCarRental = frm.getFormData(dotsCarRental);
result = frm.getFctSelected().trim();

if(result == null || result.length() < 1) result = "CARRENTAL";
ActionErrors errors = frm.validate(getTextProvider(),request);
if(errors != null){
saveErrors(errors);
return "CARRENTAL";
}
session.setAttribute(DBConstants.sessionCarId,dotsCarRental);
return result;
}

public String getCr(){
HttpSession session = request.getSession();
DotsCarRental dotsCarRental = new DotsCarRental;
dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);
DotsCarRentalForm frm = new DotsCarRentalForm();
if(dotsCarRental !=null){
frm.setFormData(dotsCarRental);
}
frm.setFctSelected(null);
frm.setValSelected(null);
request.setAttribute("dotsCarRentalForm",frm);
return "success";

}
}

There is no error on the console and neither is there any error on the
developer tools on MS Edge



Staff








SAVE
AS DRAFT













Please assist.
Thank you.

Regards

Mahabir