• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

jsp form loading issue

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Friends..

I try to coding for my portlet application use liferay + JSP , in this code jsp form loading two times .. so i will get two timew my form display
i attached screen shot for your reference .

any one can help solve this issue... i will getting this issue in long time....


This is my JSP soure code...

**************************************************************

<liferay-ui:tabs names="" refresh="<%= false %>">
<liferay-ui:section>
<div id="<portlet:namespace />block1">
<form name="<portlet:namespace />EdcsForm" method="POST"
action="<portlet:actionURL/>">
<table>
<tr>
<td >Search Keyword</td>
<td ><input type="text" name="keyword" /></td>
</tr>
<tr>
<td >Search By</td>
<td ><select name="searchBy">
<option value="">Select Option</option>
<option value="DOCNO">EDCS Doc No</option>
<option value="FILENAME">EDCS File name</option>
<option value="TITLE">EDCS Title</option>
<option value="USERID">Author user ID</option>
<option value="CONTENT">EDCS Content</option>
<option value="DOCTYPE">Document type</option>
</select></td>
</tr>
<tr>
<td ></td>
<td ><input type="submit" name="Submit"
value="Start Search" /></td>
</tr>
<tr>
<td ></td>
<td ></td>
</tr>
</table>
</form>
<%

String jspDisplay = (String)renderRequest.getAttribute("jspDisplay");

if(jspDisplay=="yes")
{
List<Map<String, Object>> edcsList =(List<Map><String, Object>>)renderRequest.getAttribute("edcsList");

%>
<table border="0" id="results" >

...............................................................................................................................................................


Search Results : <%=edcsList.size()%> Records founds.



<%System.out.println("***************>>>> "+edcsList.size());%>

<%
int j=0,k=0;
int re = edcsList.size();
for (Map<String, Object> index : edcsList) {
// for (int i=0;i<edcsList.size();i++) {
k=++j;
System.out.println(" ----- "+k);

// System.out.println("*********" +edcsList.size());

%>

<tr>
<td>
<%String str =(String) index.get("documentLocation");%> <%=k%>.  <a <br /> ><%=index.get("documentTitle") %>

    Doc No:<%=index.get("documentNo") %>Format:<%=index.get("fileFormat")%>
Size:<%=index.get("fileSize") %> Add to
favorites
</td>
</tr>

<%}%>
<% if(re == k) break; %>
<%} %>

</table>
<div align="right" id="pageNavPosition"></div>
<script type="text/javascript">
var pager = new Pager('results', 10);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
</script>


</div>
</liferay-ui:section>
</liferay-ui:tabs>

******************************************************
what is i am wrong with here... any one can let me...

thanks
arjun




edcs1.JPG
[Thumbnail for edcs1.JPG]
Screen shot
 
A feeble attempt to tell you about our stuff that makes us money
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic