 |

|
Hi There,
I ran into the same issue. You are doing it right but the "linktext" property and imageSrc property do not resolve data field value they only accept plain text. I have fixed the code and built a new jar to resolve this issue please provide your email address I can send the jar if required.
Thanks for Mr.Prasad for a wonderful grid control and source code. Helped me to customize easily. Hope you don't mind me providing customized jar.
Thanks,
Ramya
modified on Tuesday, May 19, 2009 8:15 PM
|
|
|
|

|
I have same problem please send me the jar file on this email id :
skatakdhond@gmail.com
|
|
|
|

|
I have the same problem ,I am not able to bind Anchor text with datafield
please send me the solution
Thanks
Manish
|
|
|
|

|
I am trying to figure out how i can get a handle to the fields. For example, I want to do update the data. How would I be able to edit the data and then do updates against them.
Thanks,
Boon
|
|
|
|

|
Hi Prasad,
The tool looks great. Just wanted to know if it would be OK to use this code and the associated jar files in commercial applications? Are there any legal/licensing/GPL issues ? Is there any kind of licensing at all associated with this?
Regards
PSD
|
|
|
|

|
Hello Prabhjit ,
You can use the code in commercial applications without any problem. The code is totally free. The DBGrid code does not fall under GPL.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|

|
can you tell me how to use it ??
what are the configurations must be done at first??
|
|
|
|

|
have to implement CheckBox Column in JSP DataGrid?
have new version ?
|
|
|
|

|
can anyone help me ,how the doEdit function works and what are the parameters passed in.......
Regards
Raj
|
|
|
|

|
As I am new for java developement and read this code, Finally I try to implement this code and got success also.
Only one problem I am facing that the alterText on Image Column is not working.
<grd:imagecolumn headerText="" width="5" HAlign="center" imageSrc="images/Edit.gif"
linkUrl="javascript:doEdit('{CLICORPORATION}', '{CLICLIENT}')" imageBorder="0"
imageWidth="16" imageHeight="16" alterText="Click to edit"></grd:imagecolumn>
Can some one help me why the tool tips is not showing...
Regards
|
|
|
|

|
Hi, I have to implement CheckBox Column in JSP DataGrid. Anyone knowing solution please do reply. Thanks in advance. Aman
|
|
|
|

|
Hi All,
How can I get the Pagination with Numbers(1 2 3 4 5 6 7 8 9 10 Next) instead of First,Prvious,Next,Last.
Can anyone help to get the pagination in above format.
Thanks
|
|
|
|

|
sir,
i am nw to jsp and java .I am in very much need of a data grid like this, but i cant implement it in my application.. sir please give me step by step implementation of this grid.. i had reffered to the previous post but im getting some error when i did it like that..
org.apache.jasper.JasperException: File "/WEB-INF/datagrid.tld" not found
plzz help me...
|
|
|
|

|
This tld File is in config folder
so please put this config folders file in to your web-inf folder
its work then
|
|
|
|

|
I had put the codes as per need, and it works fine.
But Unfortunately the fields of type Number/Int not being shown in grid.
Please fix the error and give the solution immeditely.
Thanking you,
Bisweswar
|
|
|
|

|
Number Field are showing correctly.
But you must include the dataFormat property to the column.
ex.
To know about format, visit :
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
|
|
|
|

|
Hi,
Is it possible to enter values and update them in the grid? If so can anyone give me a sample of the code
Regards
Anil
|
|
|
|

|
Dear sir,
Grid for java is really a great job and it will help us (the developers) a lot.
I want to use it in my college project where i am presenting information in form of table. the scenario is that I am getting value from data base using bean method which returns List. the List contains Array of string.
Now I want to use your grid to show the data in tabular format. but i am facing problem. in fact i am not how to use the list. When i go through the queries related to it i found a reply by you in this regard that is
The request attribute named 'DATALIST' stores a reference to pojo List.
In case of pojos the attribute 'dataField' of any grid column holds the name of the getter method excluding the prefix 'get'.
e.g. If you hava a getter method named 'getDescription' coded for your pojo then specify value 'Description' in 'dataField' attribute of the grid column.
In this reply you have metioned pojo List. Can you help me to understand pojo list. what it is or how can i create a pojo list. if you provie any link in this regard it will help a lot.
Plz help me.
waiting for your valuable information
Thanks
sumouser
sumouser
|
|
|
|

|
| I have tried using jsp code to generate the |
|
|
|

|
Hai friend send me generating rows using JSP code plz..
|
|
|
|

|
Hello - Is Dave Lilley's code for displaying multiple grids on a page available? It wasn't in the download project or demo. I figured I would ask before I reinvent the wheel and do it myself. Thanks!
|
|
|
|

|
Hey
hi
i tried to print the grid data...but no success
pls is ther any solution???
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|

|
What error you are getting
|
|
|
|

|
vishaldsh,
Thanks for your reply..although I dont remember what was the error as I had posted this problem way back in 2007...
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|

|
Hi, when i am scrolling the mouse in the data grid, i am getting a security alert popup. This is in https env. works fine in http env. Any issues in the css?
can anyone help on this?
|
|
|
|

|
Ok, what I want to do is to print this data sheet, how would you recommend I do that?
In exchange, I'll talk about my editing procedure. I have done a couple of things, none great but pretty cool.
I got to a point where my rows look like this.
|
<img SRC="images/Edit.gif" WIDTH=16 HEIGHT=16 BORDER=0 ALTER="null"> | 06/07/2000 00:00 | 01/01/1960 01:22 | 01/01/1960 01:42 | T - 173,973.36 Sq. Ft. | | Charles Harris | 3rd - 2200 - 0600 | |
you can see there are things in the 'doedit' fields, these are strictly to tell me what row number and column number I am on. by clicking on any of the fields it will send that particular string back to the rendering class. How?
These tag library variables work as setters and getters, google what that means. But basically, add a variable to the .tld file, and then you got to make a setter and getter function wherever the rendering is going on, I put it in DBGrid.java.
So I added
editAction
true
true
java.lang.String
editBoolean
true
true
java.lang.Boolean
to the tld file, and then
/**
* Sets editAction.
*
*/
public String getEditAction()
{
return this.mstrEditAction;
}
/**
* Sets editAction.
*
*/
public boolean getEditBoolean()
{
return this.mstrEditBoolean;
}
along witht he get functions as well. This is passed in by stating in the call to the dbgrid tag library when trying to render it.
Now, depending on what type of value is being retrieved, you basically trap these statements in either the text column, image column, number column classes and so forth. Here is an example of what I did on my text columns.
private void setFlags() throws JspException
{
isRowEdit=false;
isCellEdit=false;
isEditAction=false;
editRow=-1;
editCol=-1;
try {
objTmp = (DBGrid) getParent();
rowNum=objTmp.rowNum;
colNum=objTmp.colNum;
editAction=objTmp.getEditAction();
if (editAction.indexOf("rowNum=")>-1){
isEditAction=true;
isRowEdit=true;
editRow=Integer.parseInt(editAction.substring(7));
}
if (editAction.indexOf("mouseClick=")>-1){
isEditAction=true;
isCellEdit=true;
editRow=Integer.parseInt(editAction.substring(11,editAction.indexOf("|")));
editCol=Integer.parseInt(editAction.substring(editAction.indexOf("|")+1));
}
} catch (Exception e) {
throw new JspException(e.getMessage());
}
}
That is actually called early in render detail, this snippet is done later on.
try
{
objBuf = new StringBuffer();
objBuf.append(" 0)
objBuf.append(" WIDTH=\"" + this.mintWidth + "%\"");
if (this.mintHeight > 0)
objBuf.append(" HEIGHT=\"" + this.mintHeight + "\"");
if (this.mstrCssClass != null)
objBuf.append(" CLASS=\"" + this.mstrCssClass + "\"");
else
objBuf.append(" CLASS=\"gridColumn\"");
if (this.mstrHAlign != null)
objBuf.append(" ALIGN=\"" + this.mstrHAlign.toLowerCase() + "\"");
if (this.mstrVAlign != null)
objBuf.append(" VALIGN=\"" + this.mstrVAlign.toLowerCase() + "\"");
if (this.mstrBgColor != null)
objBuf.append(" BGCOLOR=\"" + this.mstrBgColor + "\"");
if (this.mstrForeColor != null)
objBuf.append(" COLOR=\"" + this.mstrForeColor + "\"");
objBuf.append(">");
if (isEditAction){
if (rowNum==editRow){
if ((editCol==colNum)){
//block for single cell to be edited
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append("<input type=\"text\" name=\"field"+colNum+"\" value='"+strVal+"'>");
objBuf.append("</input> | ");
} else if (editCol==-1) {
//block for whole row to be edited
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append("<input type=\"text\" name=\"field"+colNum+"\" value='"+strVal+"'>");
objBuf.append("</input>");
} else
{
//non edited rows when edit requested
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
}
} else {
objBuf.append("");
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
objBuf.append("");
}
}else {
objBuf.append("");
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
objBuf.append("");
}
// Write created HTML to output stream.
this.pageContext.getOut().print(objBuf.toString());
}
Ok, that should suffice for now. Figure out the rest (notice that I am getting a jsp datepopup to come out for the date columns?) as I am not fielding questions on this.
But someone tell me how to print this in specfic formats!!
lamarjones@nc.rr.com
|
|
|

|
"i am not able to configure this demo project...actually i changed database from oracle to mysql...and i put this all application into my context path...so which URL i have to type in my address bar for accessing this application...let me know your suggections... context path "
- johnson joseph
|
|
|
|

|
Good morning,
Two newby questions. Which is the license of that component ? Is it allowed to re use the component in a commecial application, by reproducing the content of the license ?
Does the tag lib work with Tomcat 4.1.x (J2EE 1.3 level). Are specific JSP 2.0 features used ?
Regards
|
|
|
|

|
Prasad,
Can this grid work like excel Sheet? Editable cells with navigation thru
arrow keys?
Thanks & Regards
Anjali
|
|
|
|

|
It would be very helpful if someone could post an example of the doEdit() javascript function.
|
|
|
|

|
Hi i want to know how to implement edit functin in this tld.
It's very urgent.
thanks in advance.
Thaks
AP_java
|
|
|
|

|
Dear Sir,
I am getting some problem as follows
/grid.jsp(15): Error in using tag library uri='/WEB-INF/datagrid.tld' prefix='grd': type mismatch for property 'border', for Tag class 'com.freeware.gridtag.DBGrid': tld says java.lang.Integer, implementation type is int
probably occurred due to an error in /grid.jsp line 15:
<%@ taglib uri="/WEB-INF/datagrid.tld" prefix="grd"%>
I am using jdk 1.4.2_06 with myecllipse 5.1 integrate weblogic 8.1
pls solve it....
Thanks with regs,
Rodricks
|
|
|
|
|

|
Newb Taglib conceptual error:
"Missing tagclass for tag 'dbgrid'"
I am attempting to integrate a datagrid taglib into a small test
application.
The Datagrid lives here:
http://www.codeproject.com/useritems/DBGrid.asp?df=100&forumid=82119&fr=26
My .jsp starts with the following:
< %@ taglib uri="/WEB-INF/tags/datagrid.tld" prefix="grd" % >
< %@ page import="java.sql.Connection" % >
< %@ page import="java.sql.DriverManager" % >
< %@ page import="java.sql.SQLException" % >
< %@ page import="com.freeware.gridtag.*" % >
The taglib section from my web.xml looks like this:
< taglib >
< taglib-uri >/tags/datagrid.tld< /taglib-uri >
< taglib-location >/WEB-INF/tags/datagrid.tld< /taglib-location >
< /taglib >
(The file datagrid.tld definitely lives under /WEB-INF/tags)
My datagrid taglib descriptor starts like this:
< taglib >
< tlib-version >1.0< /tlib-version >
< jsp-version >1.2< /jsp-version >
< short-name >DBGrid< /short-name >
< display-name >DBGrid< /display-name >
< small-icon >images/dbGridS.gif< /small-icon >
< large-icon >images/dbGridM.gif< /large-icon >
< description >JSP Data Grid Tag Library< /description >
< tag >
< name >dbgrid< /name >
< tag-class >com.freeware.gridtag.DBGrid< /tag-class >
The error I am receiving on the jsp is:
dg.jsp Line 1: Missing tagclass for tag "dbgrid"
In the .jsp, I can import all the classes in datagrid.tld with "@ page
import" directives, but something I am doing wrong is making it
impossible to for the application to "see" the tagclasses via a
taglib.
If it matters - I am running this on Blazix.
Any help greatly appreciated.
Geoff
|
|
|
|

|
Hello Geoff,
Have you looked at the sample project? Also check whether Blazix is compliant with JSP 2.0 spec.
Regards,
Prasad P. Khandekar
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|

|
Hi, good day,
I got a code shown below to display out number to datagrid but it seems not working.
Can someone help? Thanks in advanced.
|
|
|
|

|
I had a same problem.. You must write 'dataFormat=""' in your code..
Example: dataFormat="">
if missing 'dataFormat=""' that doesn't work...
|
|
|
|

|
i am not able to run the example, DemoGrid, please help. I trying it with Tmcat 4, is Tocat 4 is a problem??
Thanks,
Mayank
|
|
|
|

|
Has anyone given thought to coding a "FormattedObject" class (similar to DateColumn, I guess) for things like phone numbers, social security nums, and other commonly formatted values? I figured I would ask before I re-invent the wheel and code it from scratch. Thanks!
nyy2
|
|
|
|

|
Hello - I am trying to implement the JSP on this page. My attribute dataSource of the grid tag is a Connection (SQL executed in the JSP). My problem is the grid data fields are null...however, I have the correct sql total count. It seems as though I am able to page & sort fine but I can't get my data to display in the grid. Has anyone had this problem??
Thanks!
nyy2
|
|
|
|
|

|
how to include the tag lib..
how to use this source code in my project..
Will u plz give me step by step detail..
Thanks in Advance
|
|
|
|
|

|
it works but after changing the "firstName" dataField to "FirstName" & also lastName
i don't know why thought i m using userName as it s in the bean class parameter i think it'll bother me coz I'll use the grid in a code generation template.
& they r exactly the same in the bean
& also why doSort doesn't work
& how can i make doEdit work
but anyway thanks a lot for this tag lib it easy to use & no license it s really good
thanks in advance
|
|
|
|

|
i using the grid list with an arraylist fill of beans but the grid only shows the first parameter in the bean class (bean class exactly like the Client class in ur demo except it called UserBean )
User bean had (username , firstName ,lastname) the grid shows only the userName
plz help
|
|
|
|

|
I got the following warning while starting the Tomcat server, so that the error what I have posted earlier is coming. Please help me to solve it.
VenkPrabhu
---------------------------
WARNING: A docBase D:\Tomcat5\webapps\GridDemo inside the host appBase has been
specified, and will be ignored
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.T
ldConfig).
log4j:WARN Please initialize the log4j system properly.
Mar 28, 2007 12:45:47 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 28, 2007 12:45:47 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 28, 2007 12:45:47 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70 config=null
Mar 28, 2007 12:45:47 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Mar 28, 2007 12:45:47 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2563 ms
|
|
|
|

|
While deploying the GridDemo application, I got the HTTP Status 500 - Exception report.
please help to solve it.
Thanks in advance
Venkprabhu
---------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Cannot create resource instance
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: Cannot create resource instance
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.WEB_002dINF.pages.JDBCGrid_jsp._jspService(JDBCGrid_jsp.java:318)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
|
|
|
|

|
can i use a grid with a grid -- for somrthing like a table tree view
|
|
|
|

|
factory
org.objectweb.jndi.DataSourceFactory
password
janus123
url
jdbc:sybase:Tds:10.192.103.42:9000:janus
driverClassName
com.sybase.jdbc3.jdbc.SybXADataSource
user
janusop
Is it correct configuration to SYBASE am getting following error msg.
javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null'
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.JDBCGrid_jsp._jspService(org.apache.jsp.JDBCGrid_jsp:300)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
org.apache.jsp.JDBCGrid_jsp._jspService(org.apache.jsp.JDBCGrid_jsp:111)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
Thank you so much well in advance for your help.
Kind regards,
Pon
Hi am newly joined in this forum. This forum is very good for developers.
|
|
|
|

|
Hello,
I have checked the GrdDemo.xml which you have posted in your message. Apperantly you forgot to change the full class name in Type attribute in following line:
<Resource name="jdbc/DBGrid" type="oracle.jdbc.pool.OracleConnectionCacheImpl" scope="Sharable"/>
For sybase database you should be using their impl. I think if you are using j_Connect 6.05 version of sybase driver the above line would read as:
<Resource name="jdbc/DBGrid" type="com.sybase.jdbc3.jdbc.SybConnectionPoolDataSource" scope="Sharable"/>
Hope this solves your problem.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
 |