Hi, all
Using the image control in your, we can click the "Browse" button and choose a local image file and upload. I want to choose a file from our repository and put the URL of the chosen file into an element like: <control-1>http://localhost/images/path/to/my/image/file</control-1> We have already wrote a popup window to browse and choose files in our repository. The remaining things are how to let the "Browse" button pops our window and don't upload. I've read the code of "typed-controls.xbl", but don't how to start. Can anyone give some suggestion? Thanks in advance. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
To be fair it's not that easy! With the latest code, upload of
attachments is handled partly here (see the xf:upload): https://github.com/orbeon/orbeon-forms/blob/master/src/resources/forms/orbeon/builder/form/form.xhtml#L522 and partly on the client-side: https://github.com/orbeon/orbeon-forms/blob/master/src/resources/forms/orbeon/builder/resources/cell/action-icons.coffee -Erik On Wed, Nov 14, 2012 at 11:03 PM, bpmf <[hidden email]> wrote: > Hi, all > > Using the image control in your, we can click the "Browse" button and > choose a local image file and upload. I want to choose a file from our > repository and put the URL of the chosen file into an element like: > > <control-1>http://localhost/images/path/to/my/image/file</control-1> > > We have already wrote a popup window to browse and choose files in our > repository. The remaining things are how to let the "Browse" button pops our > window and don't upload. > > I've read the code of "typed-controls.xbl", but don't how to start. Can > anyone give some suggestion? Thanks in advance. > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thank you, Eric.
Now I encounter another issue when using javascript: can the javascript get event property? For example, <xf:var name="control-effective-id" value="some-dynamic-data"/> <xf:trigger id="myButton"> <xf:label>Browse... </xf:label> <xf:action ev:event="DOMActivate"> <xf:dispatch name="selectImage" targetid="myButton" > <xf:property name="control-effective-id" value="134314"/> </xf:dispatch> </xf:action> <xf:action ev:event="selectImage"> <xxf:script> var element = this; var event = event; // Can I get control-effective-id here </xxf:script> </xf:action> </xf:trigger> |
Free forum by Nabble | Edit this page |