Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help from top Struts experts

Tuong Nguyen
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is app-config.xml file:

<SPCList level="default">
<column headerKey="SPC.hading.articlenr" handlerClass="model.column.ArticleNr" cssClass="spcartnr"/>
<column headerKey="SPC.heading.quantity" handlerClass="model.column.Quantity" cssClass="spcqty"/>
<column headerKey="SPC.heading.description" handlerClass="model.column.Description" cssClass="spcname"/>
<column headerKey="SPC.heading.actions" handlerClass="ACTIONICON" cssClass="spcai"/>

This is a Model class (ArticleNr):
package model.column;

import ambo.jupiter.model.globalsearch.*;
import ambo.jupiter.model.spc.*;
import ambo.jupiter.model.shoppingcart.*;
import ambo.jupiter.context.UserContextIF;
import ambo.jupiter.model.spc.localsearch.LocalSearchItem;
import ambo.jupiter.util.SearchStringParser;
import ambo.jupiter.model.variant.VariantItem;
import ambo.jupiter.model.history.HistoryItem;

import java.util.List;

public class ArticleNr extends AbstractColumnHandler

public ArticleNr()
public ArticleNr( UserContextIF p_ciContext)
super( p_ciContext);
public String formatField( VariantItem p_sc)
return p_sc.getArticleNr();

This is code of displayed page: itemlist.jsp

<!------------------------ result writing --------------------------------->
<c:forEach var="row" items="${SPCList.elements}">
<a name="<c ut value='${row.itemId}' />"></a>
<c:forEach var = "col" items="${ClientState.SPCColumnsLevel}">
<td class="<c ut value="${col.cssClass}" />" >
<c:when test = "${col.handlerClass !='ACTIONICON' }">
<jupiter:renderColumn row="row" column="col" />
</c therwise>


| ArticleNr | Description | Quantity
rows: | 7383 | Servlet Programming | 0
| 7384 | Core Jsp | 0
| ... | ... | ...

Now, i want to add 1 column Quantity contains textboxes & 1 Shopping Cart button.
After i enter data (quantity which customer orders) into textboxes, click shoppingcart button, it will direct to ShoppingCart page with data has just entered from previous page.

Problems: Should i add a form contains Quantity data (in textbox) & a private Action.
If so, it will break app's architecture? I feel equivocal. Please show me.
If question isn't clear, please inform me.
I greatly appreciate your help.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic