Solved

check/uncheck in multibox

Posted on 2006-10-19
5
423 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Scenario: Your operations manager has discovered an anomaly in your security system. The business will start to suffer within 15 minutes if it is a major IT incident. What should she do? We have 6 recommendations for managing major incidents (https:…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now