Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

check/uncheck in multibox

Posted on 2006-10-19
5
Medium Priority
?
499 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 750 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 750 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

610 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