Hi Naveen :

Well after browsing around your code, i don't like :

 <input name="payee1" type="text"
onFocus="this.value='';
>
> AutoComplete_Create('payee1',<%=names%>,<%=ids
> %>,'txnLedgerId1','category1','Direction1')"
>                                        class="textboxInput" id="payee1"
> size="25"
> value="Enter first few letters"/>



What is this ?

thx

bb

On Wed, Mar 3, 2010 at 4:00 PM, navS <naveenkumarnl1...@gmail.com> wrote:

> sure,
>
> code starts from here.
>
>
>
> <%@ page language="java" pageEncoding="UTF-8"%>
> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%>
> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%>
> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%>
> <%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display" %>
> <%@ taglib uri="/WEB-INF/rl-display.tld" prefix="rl" %>
> <%@ page import="java.util.*" %>
> <%@ page import="fn.pfolio.value.HALedgerValue"%>
> <%...@page import="fn.web.common.NumberGenerator"%>
> <%...@page import="fn.pfolio.value.FixedLedgerNameValue"%>
> <%...@page import="fn.pfolio.cmp.vo.FixedLedgerAltNameEntityValue"%>
> <html:html>
> <script language=javascript src="/pit/js/common.js"></script>
> <script language="javascript" src="/js/calendar/calendar.js"
> type="text/javascript"></script>
> <script language="javascript" src="/pit/js/pitCommonSearchAjax.js"
> type="text/javascript"></script>
> <script>
> function openModalPopup(){
> document.getElementById("equityTable").style.display="block";
> document.getElementById("containerId").className="modalStyle";
>        objDiv = document.getElementById("containerId");
>        objDiv.style.width = document.body.scrollWidth;
>        objDiv.style.height= document.body.scrollHeight;
> }
> function hideModalPopup(){
> document.getElementById("equityTable").style.display="none";
> document.getElementById("containerId").className="nonmodalStyle";
>
> }
> </script>
> <style type="text/css">
> <!--
> .style1 {
>        color: #FF0000
> }
> .style2 {
>        color: #008000
> }
> -->
> </style>
> <%
>        Map currencyRateMap = NumberGenerator.getCurrencyRateMap();
>        pageContext.setAttribute("currencyRateMap", currencyRateMap);
> %>
> <%
> Collection ledgerList =
> (Collection)request.getAttribute("ledgerList");
>
> String name = null;
> String displayName=null;
> Long id = null;
> String groupName = null;
> String idval =null;
> Long selId=null;
> String viewName="";
> String viewCat="";
> Long viewtxnLedId=null;
>
>
> List names = new ArrayList();
> List ids =new ArrayList();
> List groupNames =new ArrayList();
> for (Iterator i = ledgerList.iterator(); i.hasNext();) {
>        FixedLedgerNameValue fixedLedgerNameValue = (FixedLedgerNameValue)
> i.next();
>        groupName =
> fixedLedgerNameValue.getFixedLedgersEntityValue().getLedgerName();
>        groupName =
> fixedLedgerNameValue.getFixedLedgersEntityValue().getLedgerName();
>        id =
> fixedLedgerNameValue.getFixedLedgersEntityValue().getSubgroupId();
>        for(Iterator j =
> fixedLedgerNameValue.getFixedLedgerAltNameList().iterator();
> j.hasNext();){
>                FixedLedgerAltNameEntityValue altName =
> (FixedLedgerAltNameEntityValue) j.next();
>                name = altName.getAltName()+"-"+groupName;
>                names.add("'"+name+"'");
>                idval ="'"+id.toString()+""+"~"+""+groupName+"'";
>                ids.add(idval);
>                displayName=name;
>        }
> }
> %>
> <body>
> <html:form action="/secure/pitIncomeExpense">
> <table>
>      <tr><td>
>          <div class="pouptabNormalCenter"><a href="/secure/
> pitIncomeExpense.do?event=2expenseOverview">Expense</a></div>
>       </td><td>
>          <div class="pouptabSelectedCenter"><a href="#"
> onclick="">Cash Receive</a></div>
>          </td></tr>
> </table>
>
> <!-- Code starts to add a transaction -->
> <table>
> <tr>
> <td>
>                        <table width="98%" border="0" cellspacing="0"
> cellpadding="0"
> style="border:1px solid #2662AA; ">
>                         <tr>
>                        <td class="tableexpenseHeading"
> width="20%">Date(dd/mm/yyyy)</td>
>                        <td class="tableexpenseHeading"
> width="20%">Description</td>
>                        <td class="tableexpenseHeading"
> width="20%">Amount</td>
>                        <td width="25%"
> class="tableexpenseHeading">Category</td>
>                        <td width="15%"
> class="tableexpenseHeading">Transaction Mode</td>
>                        </tr>
>                        <tr>
>                        <td colspan="6">
>
>                        <logic:present name="addSuccess"
> scope="request">Transaction Added
> successfully</logic:present>
>                        <logic:present name="notAddSuccess"
> scope="request">Transaction not
> added</logic:present>
>                        </tr>
>
>                        <tr>
>                        <td width="19%" align="left"
> class="tableContents-transactions"
> style="padding-top: 20px; padding-left: 5px">
>                         <rl:calendar  property="txnDate1" id="txnDate1"
> formName="pitIncomeExpenseMgmtForm"/>
>                                                  </td>
>                        <td width="24%" align="left"
> class="tableContents-transactions">
>                        <html:text property="description1"
> styleClass="textboxInput"
> styleId="txnDescription10" size="22" /></td>
>
>                        <td width="16%" align="left"
> class="tableContents-transactions">
>                        <html:text property="amount1"
> styleClass="textboxInput"
> styleId="amount1" size="13" /></td>
>
>                        <td width="25%"  align="left"
> class="tableContents-transactions">
>                        <input name="payee1" type="text"
> onFocus="this.value='';AutoComplete_Create('payee1',<%=names%>,<%=ids
> %>,'txnLedgerId1','category1','Direction1')"
>                                        class="textboxInput" id="payee1"
> size="25"
> value="Enter first few letters"/>
>                <input type="hidden" id ="txnLedgerId1"
> name="txnLedgerId1"/>
>                <input name="category1" type="hidden" id="category1"/>
>                        </td>
>
>
>
>                        <td width="19%" style="padding-right:5px;"
> align="left"
> class="tableContents-transactions">
>                                <html:select property="bankId"
> styleId="bankId">
>                  <html:option value="">Select</html:option>
>                  <html:option value="cash">Cash</html:option>
>                  <html:options collection="creditCardsList"
> labelProperty="nickName" property = "baid"/>
>                        </html:select>
>                        </td>
>                        </tr>
>                        <tr>
>                        <td colspan="6" style="padding: 10px 5px;"
> align="right"><a
> onclick="saveAddIncomeTxn()">Save</a>
>                        </td>
>                        </tr>
>                        </table>
>
>                        <!-- Code ends to add a transaction -->
>                </td></tr>
>                <tr><td>
>                Summary
>                </td></tr>
>                <tr><td><table width="100%" cellpadding="0" cellspacing="0">
>      <tr><td>Select Date Range:</td>
>      <td valign="top" style="padding-top: 3px;">
>        Start Date</td><td>
>        <rl:calendar  property="startDate" id="startDate"
> formName="pitIncomeExpenseMgmtForm" />
>        </td>
>        <td valign="top" style="padding-left:20px; padding-top:
> 3px;">End Date </td>
>        <td><rl:calendar  property="endDate" id="endDate"
> formName="pitIncomeExpenseMgmtForm" /></td>
>        <td valign="top"  style="padding-left:20px;">
>        <a onclick="fetchIncomeMonthlyAll2()"><img src="/pit/rxifa/
> images/gobtn.jpg" width="39" height="23" /></a>
>        </td></tr>
>                        <tr><td>&nbsp;</td></tr>
>                </table></td></tr>
>                <tr>
>          <td  style="padding-left:5px; padding-right:5px;" >
>
>                  <!-- Display table starts here -->
>          <div id="showIncomeTransactions">
>            <display:table name="incomeList"
> decorator="com.pit.incomeexpense.decorator.IncomeExpenseDecorator"
>                        pagesize="10"
> requestURI="/secure/pitIncomeExpense.do" id="expTbl"
> defaultsort="1" defaultorder="descending"
>                        sort="list" style="width:100%; margin-bottom: 15px"
> cellpadding="0px" cellspacing="0px">
>
>                        <display:column title="Date" property="openDate"
> style="text-align:
> left;width:12%; "
>                        headerClass="tableexpenseHeading" sortable="true"
> class="tableex_pense"/>
>
>                        <display:column title="Description"
> property="description"
> style="text-align: left;width:13%;"
>                        headerClass="tableexpenseHeading" sortable="true"
> class="tableex_pense"/>
>
>                        <display:column title="Account" property="source"
> style="text-
> align: left;width:13%;"
>                        headerClass="tableexpenseHeading" sortable="true"
> class="tableex_pense"/>
>
>                        <display:column title="Payee" property="payee"
> style="text-align:
> left;width:13%;"
>                        headerClass="tableexpenseHeading" sortable="true"
> class="tableex_pense"/>
>
>                        <display:column title="Category" property="category"
> style="text-
> align: left;width:13%;"
>                        headerClass="tableexpenseHeading" sortable="true"
> class="tableex_pense"/>
>
>                        <display:column title="Amount" property="amount"
> style="text-align:
> right; padding-right:10px; width:13%;"
>                        headerClass="tableexpenseHeadingrig"
> class="tableex_pense"/>
>
>                        <display:column title="" property="incomeTool"
> style="text-align:
> right; padding-right:10px; width:13%;"
>                        headerClass="tableexpenseHeadingrig"
> class="tableex_pense"/>
>
>                        </display:table>
>                        </div>
>                        <!-- Display table ends here -->
>                        </td>
>        </tr>
>        <tr><td><div id="equityTable">
> </div>
>  <div id="containerId" class="nonModalStyle"></div></td>
>                </tr>
>                </table>
>                <html:hidden styleId="txnId" property="txnId"/>
>                <html:hidden styleId="event" property="event"/>
> </html:form>
> </body>
> </html:html>
>
>
>
> On Mar 3, 12:31 pm, bambang teleinfocom
> <bambang.teleinfocomproj...@gmail.com> wrote:
> > Hi Naveen :
> >
> > Can i see your codes ?
> >
> > tq
> >
> > bb
> >
> >
> >
> > On Wed, Mar 3, 2010 at 2:40 PM, navS <naveenkumarnl1...@gmail.com>
> wrote:
> > > Hello team,
> >
> > > I am facing some problem with sorting in displaytag.
> >
> > > Statement :-
> >
> > >      I have one jsp page in which the top portion is adding a
> > > transaction.
> > > second portion is to display the added data using display table.
> >
> > > when i add new transaction the page get refreshed to show newly added
> > > data in display table.
> >
> > > some columns has sorting option in display table. when i click some
> > > column header to sort, the page gets refreshed and the transaction
> > > that added just before will add again, i.e., creating duplicate
> > > transactions.
> >
> > > Please help me regarding this.
> > > One more thing is, why it is refreshing the whole page when i click
> > > only sort for a column in display table.
> >
> > > Note: am using struts framework.
> >
> > > Regards
> > > naveeN
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Java EE (J2EE) Programming with Passion!" group.
> > > To post to this group, send email to
> > > java-ee-j2ee-programming-with-passion@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com>
> <java-ee-­j2ee-programming-with-passion%2bunsubscr...@googlegroups.com<j2ee-programming-with-passion%252bunsubscr...@googlegroups.com>
> >
> > > For more options, visit this group at
> >
> > >
> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?...-Hide 
> quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Java EE (J2EE) Programming with Passion!" group.
> To post to this group, send email to
> java-ee-j2ee-programming-with-passion@googlegroups.com
> To unsubscribe from this group, send email to
> java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
>
> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to