14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

throw new JboException(e);<br />

}<br />

}<br />

return fileName;<br />

}<br />

public Number getPhotoSize()<br />

{<br />

Number size = null;<br />

if (getPhoto() != null)<br />

{<br />

try<br />

{<br />

size = new Number(getPhoto().getContentLength());<br />

}<br />

catch (SQLException e)<br />

{<br />

throw new JboException(e);<br />

}<br />

}<br />

return size;<br />

}<br />

4. Go to the Application Definition, and synchronize the group to get items for the<br />

new attributes.<br />

5. Change the item properties (for example the Prompt) where desired, and<br />

generate the application.<br />

If you want to use the file name as the label for a download link (in case the file is not<br />

an image, video or audio file), you can use the Hint Text property on the<br />

fileDownload item to refer to the item that holds the name of the file.<br />

For example, if you have a group named “Employees”, an item “DocItem” with<br />

Display Type “fileDownload” that is based on an attribute of type OrdDocDomain,<br />

and an item “DocItemFileName” that returns the name of the uploaded DocItem<br />

using the technique explained above, you can set the Hint Text property of DocItem<br />

as follows:<br />

#{bindings.EmployeesDocItemFileName.inputValue}<br />

This will display the name of the actual file on the download link.<br />

6.10.3. Using <strong>JHeadstart</strong> File Up/Download on BLOB Columns<br />

<strong>JHeadstart</strong> 10.1.2 supported upload and download functionality of files stored as<br />

BLOB columns in the database. In <strong>JHeadstart</strong> 10.1.3 this is not supported anymore<br />

because of the superior functionality of the Intermedia object types. If, however you<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating User Interface Widgets 6- 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!