Solved

check/uncheck in multibox

Posted on 2006-10-19
5
427 Views
Last Modified: 2011-09-20
Dear experts

I have 2  jsp page1 and page2, Code in page1 is like this:

      <c:when test="${param.checkaddToCartforReports == 'disableR'}">
                                                      
<html:multibox property="selectedEditions" >
      <c:out value='${edition.editionId}'/>
</html:multibox>
      Edition <c:out value='${edition.editionId}'/>
</c:when>

<html:button value=”Add to Cart”/>

In page1, my <html:multibox>  has like 10 to 15 checkboxes .  Each checkbox corresponds to a “edition” .When I ‘check’ one of the edition, and say “Add to Cart” in page1, it goes to page2 and that edition is added to cart.so page2 contains the cart
Now in page2, for that “edition” which was added in cart, I am setting checkaddToCartforReports == 'disableR' in the url query string.
Like this

<a href="/abc.xyz.do?submitAction=viewItem&checkaddToCartforReports=disableR<c:out value="${lineItems.edition}"/>Go to Page1</a>

So , when above link is clicked, it goes to page1. so once it goes to page1, I want that edition (and its corresponding checkbox) which was added in the cart to be disabled.

That is , the checkbox which was added to cart (from the multibox ) should be disabled when I get back from page2 to page1.

Want to know if that’s possible

Any help appreciated
Thanks
J

0
Comment
Question by:jaggernat
  • 2
5 Comments
 
LVL 10

Author Comment

by:jaggernat
ID: 17770745
<html:multibox property="selectedEditions" disabled="true"> actually disables all check boxes. Is it possible to disable only a few selected checkboxes based on url query string value

thanks
J

0
 
LVL 16

Accepted Solution

by:
suprapto45 earned 250 total points
ID: 17771560
Hi J,

Do not think you can do that in easy way using html tag of Struts afaik. However, other experts may have some other ideas.

My suggestion is for you to use the traditional <input type> approach instead of Struts html tag. Then you have to use Scriptlet to generate the checkboxes.

But yeah, Scriptlet and <input type> are just the last option (until we have no choice) for us :)
0
 
LVL 9

Assisted Solution

by:owenli27
owenli27 earned 250 total points
ID: 17774777
J,

If I was you, I will use scriptlet Java code inside JSP to treat this special case

Owen
0
 
LVL 9

Expert Comment

by:owenli27
ID: 18004278
Since question is not solved, I suggest to delete this question...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question