File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes need help from top Struts experts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "need help from top Struts experts" Watch "need help from top Struts experts" New topic

need help from top Struts experts

Tuong Nguyen

Joined: Mar 23, 2007
Posts: 9
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.
I agree. Here's the link:
subject: need help from top Struts experts
It's not a secret anymore!