GWT Browse files/directories - gwt

Here is my requirement:
In my application, I want to get a path of file from user and process the file accordingly.
I am providing a text box in which user can directly enter the path.
Or user can opt to choose a file by clicking on Browse button and selecting a file.
Which widget shall I use to browse local files and directories?
I found one widget called FileUpload but whenever I get the fileName by fileUpload.getFileName, it does not give me the whole path.

You don't need the whole path.
Please see the links below.
The first link covers the client side and the second one the servlet side.
http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload
http://commons.apache.org/fileupload/using.html

Related

Images not showing in Form Recognizer Label Editor

I have created a Form Recognizer Service using the Quick Start instructions and created the connection and project in the label editor without errors. The SAS URI is valid and the Form Recognizer key and end point are valid. I have validated the container location by entering the URL with a file name in a browser and viewing them. According to the Instructions in Quick Start and instructions provided by Microsoft and others my setup is complete and correct. When the project is saved the image files are supposed to appear in the label editor and they do not. I have created numerous projects and connections with the same result. I believe the key items are the Form Recognizer end point and key, the SAS URI, and the source (the form to be recognized) location. Everything else is text of my choosing. Can you provide any insights into what I have missed? Thanks
Is your data flat on the container or in a folder ? If in a folder please add the folder name to the folder path in the project setting.
If it is not in a folder can you please try copying it into a folder and see if it works.

New file in template is not accessed

I am trying to display results in a web page. I want to link this from the waterfall page of buildbot. But when I useclick , the required web page does not open. I have placed this new web page in the templates directory. Is there something more that needs to be done?
Since the results you want to display are produced by one of your builds,
the waterfall web templates are not relevant, since they are templates
for the whole waterfall, including all builds, whether or not they
are builds that produce these particular results.
If you wish to provide links to some files generated by a build, you select
a buildstep in the build, or create one for the purpose, that will provide
those links within its status box in the waterfall display (e.g. in the
way that a ShellCommand buildstep provides a link to its stdio log).
For example, you might just add a final step to the build with the description
Report or Publish.
You must write a customized BuildStep class to execute the step that you select
or create. Your customized BuildStep class must be derived from LoggingBuildStep,
or from a class, such as ShellCommand, that is already derived from LoggingBuildStep.
The necessary customization is to override the createSummary method with
your own implementation, and in that implementation call the addURL method to adds URL(s)
to the file(s) you want to publish to the buildstep's status box. You can add as
many URLs as you like. Here is an outline example:
class ReportingStep(ShellCommand):
...
command = ['upload','report',to','some','server']
...
def createSummary(self,log):
...
url = "url/to/the/report/on/the/server"
self.addURL("Report", url)
Now, when ReportingStep completes, its status box will contain
a link labelled Report to the report that the step has uploaded to the server.
Google "buildbot buildstep createSummary" for more leads.
What if my files are saved locally and for now I just want the user to have a link to download the zipped files?
From what I understand, the above customization will help provide an external url.
The user clicks a link that is served from your buildmaster. If your
build just saves these files locally, then they're saved on the buildslave.
So unless your buildslave is on the same machine as the buildmaster then the link has to be URL to an "external" file.
On the other hand, if your buildstep uploads the file to the buildmaster,
then the link can be a link to local file - local on the buildmaster, which
is serving the link.
If your buildslave is on the same machine as your buildmaster, then obviously
you don't need to do any uploading:
addURL("Report",file:///path/to/the/zipfile.zip)
But remember, if you want the content at these links to be persistent then
/path/to/the/zipfile.zip had better not be somewhere that gets clobbered
by every build.

upload a file using gwt with out showing the file chooser,send file by picking it from default location

I'm beginner to GWT,I've a task that I need to upload a file to the server
but the constraint here is, we should not show the file chooser dialogbox.
with the given input file name we pick that file from the default file location and uploads it.
I think the requirement is clear to you..Please help me on this.
thank you
FileUpload is the widget in GWT for uploading file but you have to choose a file. follow this.
There is no way in GWT to get file in client. If you don't want to choose a file from a default location then just give a text box and read file name, then pass this file name to server and do enough processing there, you can't take File in client side.

Trying to get along with Interwoven

I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.

GWT FileUpload get File Full Path

our Boss wants us to build a client only GWT App. so no server side coding will be involved in our GWT app.
Now we use a FileUpload widget to select a file from user file-system. most Browsers -for security reasons- don't allow FileUpload to return the full path of selected file. a real problem for us!
Is there a way, client-side, to fetch the filepath from a FileUpload widget?
any clever workaround or any other GWT widget that enables user file selection and returns selected file full path in file-system?
thanks.
You cannot get the full path of a selected file of an input element. The path will be absent or changed to avoid security risks in almost every browser browser.
You can get the file's name, and even its content, with the HTML5 FileAPI.