Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help from top Struts experts

 
Tuong Nguyen
Greenhorn
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"/>
</SPCList>

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:choose>
<c:when test = "${col.handlerClass !='ACTIONICON' }">
<jupiter:renderColumn row="row" column="col" />
</c therwise>
</c:choose>
</td
</c:forEach>

columns:

| 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