Attachments in Starpound

dcurt's picture

We have been struggling to get attachments to out SP applications.  Does any documentation exist on how best to do this.

 

We want to bring files in and export out. 

epetrova's picture

what attachment are  you

what attachment are  you referring to?

Thanks,
Evgenia

dcurt's picture

Attachments

We want to bring any user file from the local or network file system into our SP application.  Then we also want to send it out through an appropriate web service to another app.

Thanks.

epetrova's picture

How are you going to send

How are you going to send local file on user's local computer to starpound server? through web form? or email?

Thanks,
Evgenia

dcurt's picture

Attachments

 

Evgenia,

 

We are trying to upload a file to the SP server using a webform.

 

We use the <t:inputFileUpload id="attachmentfile" value="#{WIManager.uploadedFile}" /> tag and we use an object of type UploadFile in the value. We imported the Uploadfile from Apache Myfaces into a script task and are using it to capture the file information in the t:inputFileUpload tag. We get the error message There is no RowSet-type "uploadedFile" defined in the application "Ops_Main"

 

We tried to put the UploadFile object into a bean and use that bean to create a BDD, but this is not working.

How do we define the new UploadFile Type in the BDD

sburkett's picture

One option

Hi Don - I'm not even sure this is possible in the current release of StarPound (v1.3 RC1), but have you checked to ensure that the form is set to handle multipart data?

<form action="whatever" enctype="multipart/form-data">

 

Scott Burkett
COO, StarPound Technologies, Inc.
http://www.scottburkett.com

dcurt's picture

Yes we did

We have the form set, and the filter added to web.xml for the tag.  I hope our problem is just that we do not understand how to add beans into SP

 

Don

dcurt's picture

Tried simple bean

We ignored the attachements tag and just tried to add a simple bean, with one string property to SP.  Setters and Getters added.  We followed the word write up we were given for new bean creation.  Bean BDD was added to application. 

We can not understand how to use the bean as a value binding on the jsf page.  This seems to be the root of our problem.

We need some guidance in how to utilize a bean properly.

Thank you.

epetrova's picture

don,1) i think this doc will

don,

1) i think this doc will help you with a file uploading

http://starpound.net/developers/docs/starpound-v121-ga-documentation/starpound-how-tos/how-add-file-upload-web-form

2)  if you want to address to a SP bean property via Web Form you need to insert the following line into web form code:

<h:inputText value="#{WIManager.[SPBean_name].[SPBean_property]}"/>

Thanks,
Evgenia

dcurt's picture

Thanks, documentation looks great

Thanks SP for the great documentation on both the file upload and use of list box controls.

We will try this out shortly.

 

Don

sburkett's picture

Hey Don ...

Let us know how this approach works out for you.

Cheers.
Scott

Scott Burkett
COO, StarPound Technologies, Inc.
http://www.scottburkett.com

syelamanchi's picture

We have tried following the

We have tried following the documentation for uploading a file and we have a few questions:

1) In the documentation for "How to Add File Upload to a Web Form", you mention that

"The application in the sample project also includes model elements that store the content of the uploaded file in the Business Data Document and display file information to the user upon successful upload."

Where would I find this Sample Project?

2) We tried to follow your instructions and use your UploadBean, but it didn't work, so we tried to create our own Upload Bean.

If I create a Bean and would want to import it into my JSP, what is the path of the Bean that I have to specify.

For example, if I created a Java class - MyBean in my Project in a folder named MyBeans as follows:

Resources
    - Java
        -MyBeans
            -MyBean.java
           
           
How would I import this bean into my JSP files? Where would the file be stored and how would I access it?

3) In the JSP imports you specify the tomahawk taglib with the prefix "x". Did you mean to use the Extensions taglib with the prefix "x" or were you deliberately using the prefix "x" for the tomahawk taglib?

4) The import
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
   gives the following error in all JSP pages:       "Cannot find the tag library descriptor for "http://java.sun.com/jsp/jstl/core" "
      
       and using the tag        <c:set target="${requestScope.WIManager}" property="autocomplete" value="true"/>
   gives the following warning: Unknown Tag (c:set)
  
   While this has never created compiling problems in the JSP pages before, using this tag in the same JSP as the (tomahawk tag "t") <t:inputFileUpload> tag gives me compiler errors.
  
   Is there any clash in using the core taglib with the tomahawk taglib?

sburkett's picture

Don - Eugenia will probably

Don - Eugenia will probably chime in here with respect to your questions.  If you have a dumbed down sample Studio project that you could attach here in a reply, it might speed things up as we come have something to work with.

Cheers.

Scott

Scott Burkett
COO, StarPound Technologies, Inc.
http://www.scottburkett.com

dcurt's picture

drop.io/uploadzip    

drop.io/uploadzip

 

 

dcurt's picture

Just checking if anyone has a

Just checking if anyone has a solution to the file upload question.  I sent a sample app of what was in the prior instructions, which did not work.

It would really be appreciated if someone can suggest a solution

epetrova's picture

Don, can you define more

Don,

can you define more exactly  what file upload question you mean?

Thanks,
Evgenia

dcurt's picture

Evgenia, We had a SP

Evgenia,

We had a SP consultant come in, Jason Deegan.  He wrote up all our issues and I thought he gave it to your team.  I know it was sent to
Andrew.

At minimum, we would like to see the demo application which is referenced in the writeup you sent previously on this subject.

 

Thanks.  Don