Can you tell me where I can get access to the nightly builds please?
Announcement
Collapse
No announcement yet.
X
-
I have been thinking of a way to facilitate inline editing for the FileItem type. I declared a class in the following way
Code:isc.ClassFactory.defineClass( "CustomBinaryEditor", FileItem ); isc.CustomBinaryEditor.addProperties ( { transformInput: function( form, item, value, oldValue ) { return this.Super( "transformInput", arguments ); } } );
Should this be possible or do you have another suggestion? Also, could you give me a pointer regarding the nightly builds or reply with the example to which you referred in your post yesterday please?
Comment
-
Originally posted by IsomorphicNightlies are in the FAQ.
If this is the correct FAQ can you give me an indication of roughly where the sample can be found, and if not can you point me in the right direction please?Last edited by somewhereinbelgium; 11 May 2010, 00:41.
Comment
-
Thanks for your excellent help to date. I now have my binary data coming over to the server side, but when DSRequest.parseUploadedFiles() is invoked, the attempt to retrieve the datasource given the data source name (which is dynamically generated for uniqueness reasons) fails, i.e. the variable
Code:DataSource ds = DataSourceManager.getDataSource( getDataSourceName() );
Therefore the question is, do I need to register the name for my dynamically generated DataSource instance with DataSourceManager and if so, how? I don't see much of a public interface on this class, although I can see that it seems to be a proxy for a PoolManager instance.
Any guidance here would be gratefully received.
Comment
-
Originally posted by IsomorphicFor any such failure, always post the stack trace you're seeing, as well as surrounding code (not just a single line).
Comment
-
Here are images showing the call stack and contents of the variable window when debugging on the server side. You will notice that the variable ds (type DataSource) is null and therefore the attempt to retrieve the DSField instance for the field whose name is 'picture' will fail.
So the question remains: do I need to register my dynamically generated datasource?
Comment
-
There isn't a registration API, so in essence, you can't currently upload to a dynamically generated DataSource. However you can have a DataSource that actually exists as a .ds.xml file, target that DataSource with the upload and actually commit the data to a dynamically generated DataSource.
If that doesn't sound feasible, then start with the very big picture - why, in terms of requirements for your application and what the end users are doing, did you choose to build DataSources dynamically and upload to them.
Comment
-
Originally posted by Isomorphicwhy, in terms of requirements for your application and what the end users are doing, did you choose to build DataSources dynamically and upload to them.
This way I can write one jsp which allows the user to maintain data for any table in a consistent and uniform manner.
Editing of all other data is now complete and uploading of binary files is the only outstanding issue.
Comment
-
The uploading of binary files to the server is now completed without the need to manually write a .ds.xml file when the datasource is created.
I have achieved this by handling the request at a very early stage as in the following snippet:
Code:@Override public void service( final ServletRequest servletRequest, final ServletResponse servletResponse ) throws ServletException, IOException { boolean processed = false; try { final RequestContext context = RequestContext.instance( servletRequest, servletResponse ); Map<?, ?> queryParamsMap = ServletTools.parseQueryString( context.request.getQueryString() ); if ( queryParamsMap.get( "singleUpload" ) != null
Once the database update has occurred successfully I then set a response in the following manner:
Code:if ( servletResponse instanceof HttpServletResponse ) { final HttpServletResponse httpServletResponse = (HttpServletResponse) servletResponse; httpServletResponse.setStatus( HttpServletResponse.SC_OK ); response = new DSResponse( httpServletResponse ); response.setAffectedRows( rowsAffected ); }
Could you offer some advice on what kind of logic I should write so that the client is informed that the update has occurred successfully?
Comment
-
Solved
After some searching I discovered that it is possible to register a dynamically generated datasource, and this is achieved by a call to
Code:DataStructCache.addCachedObjectWithNoConfigFile( "dataSourceName", ds );
Originally posted by IsomorphicFor your use case, it's probably sufficient to just also save the DataSource to disk as a .ds.xml file the first time it's generated.
Comment
Comment