|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in table
Folks, any thoughts on the below issue... I am trying to replicate the
tutorial in Creator 2, and 2.0 update 1 here...
http://developers.sun.com/jscreator/reference/techart/2/retrieve_binary_data.html
Using NetBeans 6.0 beta 1 and MySQL 5.0.45 OR Derby from GlassFish b58g (that ships with FULL NetBeans IDE download) ---- So, I drop a table on to any blank Visual JSF page, then drag the "PICTURE_TBL" on to it, (which creates the dataprovider and cacherowset... blah blah) The DB TABLE was created like so (in MySQL): create table PICTURE_TBL ( PICTURE_ID INT NOT NULL primary key AUTO_INCREMENT, IMAGE BLOB); and like (for Derby DB) CREATE TABLE PICTURE_TBL (PICTURE_ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), IMAGE BLOB); Then I select Table Layout, and configure it so that the table is created something like; heres the information behind the scenes, (the JSP) <ui:table augmentTitle="false" binding="#{Page1.table1}" id="table1" style="left: 72px; top: 240px; position: absolute; width: 120px" title="Images Retrieved from Database" width="120"> <ui:tableRowGroup binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10" sourceData="#{Page1.demo_blobDataProvider1}" sourceVar="currentRow"> <ui:tableColumn binding="#{Page1.tableColumn1}" headerText="IMAGE" id="tableColumn1" sort="PICTURE_TBL.PICTURE_ID"> <ui:staticText binding="#{Page1.staticText1}" id="staticText1" text="#{currentRow.value['PICTURE_TBL.PICTURE_ID']}"/> </ui:tableColumn> <ui:tableColumn binding="#{Page1.tableColumn3}" headerText="Image" id="tableColumn3"> <ui:image binding="#{Page1.image1}" id="image1" url="/servlet/DisplayImage?imageid=#{currentRow.value['PICTURE_TBL.PICTURE_ID']}"/> </ui:tableColumn> </ui:tableRowGroup> </ui:table> BUT each time I right Select the Table and Choose Table-Layout, I get the following error? Note also the changes in column names etc. Any thoughts, how-tos or advice, greatly appreciated. Chris |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in table<webuijsf:imageHyperlink actionExpression="#{admin$PictureAdministration.imageHyperlink1_action}" binding="#{admin$PictureAdministration.imageHyperlink1}" id="imageHyperlink1" imageURL="/servlet/DisplayImage?imageid=#{currentRow.value['PICTURE_TBL.PICTURE_ID']}" text="" url="/servlet/DisplayImage?imageid=#{currentRow.value['PICTURE_TBL.PICTURE_ID']}"/> I would love to know why the "Image" component doesn't work though. Chris Chris Fleischmann wrote: Folks, any thoughts on the below issue... I am trying to replicate the tutorial in Creator 2, and 2.0 update 1 here... http://developers.sun.com/jscreator/reference/techart/2/retrieve_binary_data.html --
|
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in table
I didn't want this to get lost so I logged issue:
https://woodstock.dev.java.net/issues/show_bug.cgi?id=821 lark Chris Fleischmann wrote:
|
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableThanks and I added comments to this issue John Lark Fitzgerald wrote: > I didn't want this to get lost so I logged issue: > https://woodstock.dev.java.net/issues/show_bug.cgi?id=821 > > lark > > Chris Fleischmann wrote: >> Folks, I was able to workaorund the issue, instead of an "image" >> component, I used the ImageHyperlink component, a.k.a. >> >> /<webuijsf:imageHyperlink >> actionExpression="#{admin$PictureAdministration.imageHyperlink1_action}" >> >> binding="#{admin$PictureAdministration.imageHyperlink1}" >> id="imageHyperlink1" >> >> imageURL="/servlet/DisplayImage?imageid=#{currentRow.value['PICTURE_TBL.PICTURE_ID']}" >> text="" >> url="/servlet/DisplayImage?imageid=#{currentRow.value['PICTURE_TBL.PICTURE_ID']}"/> >> >> / >> I would love to know why the "Image" component doesn't work though. >> >> Chris >> >> >> >> Chris Fleischmann wrote: >>> Folks, any thoughts on the below issue... I am trying to replicate >>> the tutorial in Creator 2, and 2.0 update 1 here... >>> http://developers.sun.com/jscreator/reference/techart/2/retrieve_binary_data.html >>> >>> Using NetBeans 6.0 beta 1 and MySQL 5.0.45 OR Derby from GlassFish >>> b58g (that ships with FULL NetBeans IDE download) >>> >>> ---- >>> >>> So, I drop a table on to any blank Visual JSF page, then drag the >>> "PICTURE_TBL" on to it, (which creates the dataprovider and >>> cacherowset... blah blah) >>> >>> The DB TABLE was created like so (in MySQL): >>> >>> create table PICTURE_TBL ( PICTURE_ID INT NOT NULL primary key >>> AUTO_INCREMENT, IMAGE BLOB); >>> >>> and like (for Derby DB) >>> >>> CREATE TABLE PICTURE_TBL (PICTURE_ID INTEGER NOT NULL GENERATED >>> ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), IMAGE BLOB); >>> >>> Then I select Table Layout, and configure it so that the table is >>> created something like; >>> >>> table >>> >>> heres the information behind the scenes, (the JSP) >>> / >>> <ui:table augmentTitle="false" binding="#{Page1.table1}" id="table1" >>> style="left: 72px; top: 240px; position: absolute; width: 120px" >>> title="Images Retrieved from Database" >>> width="120"> >>> <ui:tableRowGroup >>> binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10" >>> sourceData="#{Page1.demo_blobDataProvider1}" sourceVar="currentRow"> >>> <ui:tableColumn >>> binding="#{Page1.tableColumn1}" headerText="IMAGE" id="tableColumn1" >>> sort="/PICTURE_TBL.PICTURE_ID/"> >>> *<ui:staticText >>> binding="#{Page1.staticText1}" id="staticText1" >>> text="#{currentRow.value['*/*PICTURE_TBL.PICTURE_ID*/*']}"/>* >>> </ui:tableColumn> >>> <ui:tableColumn >>> binding="#{Page1.tableColumn3}" headerText="Image" id="tableColumn3"> >>> *<ui:image >>> binding="#{Page1.image1}" id="image1" >>> url="/servlet/DisplayImage?imageid=#{currentRow.value['*/*PICTURE_TBL.PICTURE_ID*/*']}"/>* >>> </ui:tableColumn> >>> </ui:tableRowGroup> >>> </ui:table> >>> >>> /BUT each time I right Select the Table and Choose Table-Layout, I >>> get the following error? >>> >>> error >>> >>> Note also the changes in column names etc. >>> >>> Any thoughts, how-tos or advice, greatly appreciated. >>> >>> Chris >> >> -- >> Sun Microsystems <http://www.java.com/> *Chris Fleischmann * >> Solutions Architect - Software >> >> *Sun Microsystems Australia* >> Phone x59152/+61 39869 6452 >> Mobile: +61409527930 >> FAX: +61 39869 6290 >> Email Chris.Fleischmann@... <mailto:Chris.Fleischmann@...> >> bottom <http://www.java.com> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableHi!
Which is the servlet folder? I have tried in diferent folders but i don´t know which is the best one. Thanks |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableHi!
I have tried other solution that i have found in the forum. Because many people say that inserting images in the DB it´s worst than putting a field with the url. So: Firstly i have done this: ![]() ![]() ![]() But i don´t want to see a HYPERLINKIMAGE...likes this, i want to see directly the image. I don´t know neither if the path where i have got the proyect is ok or the images path is ok: proyect path--->C:\Documents and Settings\Ibai Leizea\Escritorio\gsg images path--->C:\Documents and Settings\Ibai Leizea\Escritorio\gsg\SociedadGastronomica\web\resources |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableHi!
Ok finished! I have tried this and works! <ui:tableColumn binding="#{STOCKSOC.tableColumn6}" headerText="column6" id="tableColumn6" width="200"> <ui:imageHyperlink action="#{STOCKSOC.imageHyperlink1_action}" binding="#{STOCKSOC.imageHyperlink1}" id="imageHyperlink1" imageURL="/pics/im#{currentRow.value['producto.id_prod']}.jpg" text="" url="/pics/im#{currentRow.value['producto.id_prod']}.jpg"/> </ui:tableColumn> Thanks to everybody! |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableMay be this blog could give you more hints
http://blogs.sun.com/sakthi/entry/how_to_upload_and_retrieve - Winston http://blogs.sun.com/winston > Hi! > > Ok finished! I have tried this and works! > > <ui:tableColumn binding="#{STOCKSOC.tableColumn6}" headerText="column6" > id="tableColumn6" width="200"> > <ui:imageHyperlink > action="#{STOCKSOC.imageHyperlink1_action}" > binding="#{STOCKSOC.imageHyperlink1}" id="imageHyperlink1" > imageURL="/pics/im#{currentRow.value['producto.id_prod']}.jpg" text="" > > url="/pics/im#{currentRow.value['producto.id_prod']}.jpg"/> > </ui:tableColumn> > > Thanks to everybody! > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableThe entry does give hints, but uses JDBC to upload and retrieve. I'll post an example using dataproviders soon John
|
||||
|
|
Re: NetBeans 6.0 beta 1 with the VWP, trying to retrieve blob and display in tableHi Chris;
What does "DisplayImage" represents in your code? Can i have its full definition? |
||||
| Free embeddable forum powered by Nabble | Forum Help |