Solved

check/uncheck in multibox

Posted on 2006-10-19
5
442 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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