je travail sur orbeon form 4.4, je vous upload an attachment dans un formulaire mais j'arrive pas a déterminer le bon chemin pour sauvegarder mes pièces jointe (attachment)
-- s'il vous plaît si vous avez un solution pour m'aider. Bien cordialement You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Bonjour Aldjia,
Que voulez-vous dire par "sauvegarder mes pièces jointe"? Voulez-vous dire que vous avez votre propre code qui interagit avec la l'API de persistance de Orbeon Forms, et que vous souhaitez sauvegarder un fichier au travers de cette API? Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Bonjour Alex,
-- je voulais dire par "sauvegarder mes pièces jointe", dans notre application on a un champ dans le formulaire xml Fichier, on veut faire un bouton upload pour upload la pièce jointe et à coté de cette pièce on veut deux doutons ( edit, delette)pour la gérer .et une fois on upload cette pièce on volait préciser le chemin d'enregistrement. est ce que c'est possible ou bien dans orbeon 4.4 il y a un chemin définit pour sauvegarder les pièces jointes? voilà mon code sur la partie orbeon et dans application on utilise java EE et glassFish. dans le fichier read.xml { <xhtml:span class="field read"> <xslcomp:one-file-read ref="file-container-with- <xforms:label>Fichier : </xforms:label> <xforms:hint>Activer pour télécharger le fichier joint.</xforms:hint> </xslcomp:one-file-read> </xhtml:span> } write.xml { <xhtml:span class="field write"> <xslcomp:one-file-write ref="file-container-with- <xforms:label>Fichier : </xforms:label> <xforms:hint>Activer pour télécharger le fichier joint.</xforms:hint> </xslcomp:one-file-write> </xhtml:span> } et dans le fichier copy-section-content.xsl { <!--pèces jointes --> <xsl:template match="xslcomp:one-file-read"> <xsl:param name="part"/> <!-- TODO: replace by a group. --> <xhtml:span class="xforms-control xforms-output an-company-file vertical"> <xhtml:label class="sectionLabel xforms-label"><xsl:value-of select="xforms:label" /></xhtml:label> <xhtml:label class="sectionLabel xforms-label"></xhtml:label> <xhtml:table style="" cellspacing="0"> <xhtml:tr> <xhtml:td class="download"> <xforms:output ref="{@ref}/download" incremental="true" appearance="xxforms:download"> <xforms:filename ref="../@filename" /> <xforms:mediatype ref="../@mime-type" /> <xforms:label><xforms:output ref="../@filename"/></xforms: <xsl:copy-of select="xforms:hint"></xsl: </xforms:output> <xforms:output value="if(normalize-space({@ <xsl:attribute name="style"> <xsl:text>{if(normalize-space( <xsl:value-of select="@ref"/> <xsl:text>/@filename) = '') then '' else 'display: none'}</xsl:text> </xsl:attribute> </xforms:output> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="vignette"> <xforms:output mediatype="image/*" ref="{@ref}/vignette" /> </xhtml:td> </xhtml:tr> </xhtml:table> </xhtml:span> </xsl:template> <!--pèces jointes --> <xsl:template match="xslcomp:one-file-write" <xsl:param name="part"/> <xhtml:span class="xforms-control xforms-output an-company-file vertical" > <xhtml:label class="sectionLabel xforms-label"><xsl:value-of select="xforms:label" /></xhtml:label> <xhtml:label class="sectionLabel xforms-label"></xhtml:label> <xhtml:table style="" cellspacing="0"> <xhtml:tr> <!-- <fr:attachment ref="my-data" xmlns:fr="http://orbeon.org/ <xf:label>Attached file</xf:label> Optional <xf:filename ref="@filename" /> <xf:mediatype ref="@mediatype" /> <xxf:size ref="@size" /> </fr:attachment> --> <xhtml:td class="download"> <xforms:upload ref="{@ref}/url" accept="{@accept}"> <xforms:filename ref="../@filename" /> <xforms:mediatype ref="../@mime-type" /> <xxforms:size ref="../@length" /> <xsl:copy-of select="xforms:hint"></xsl: </xforms:upload> </xhtml:td> </xhtml:tr> <xhtml:tr> <xhtml:td class="vignette"> <xforms:output mediatype="image/*" ref="{@ref}/vignette" /> </xhtml:td> </xhtml:tr> </xhtml:table> </xhtml:span> </xsl:template> } et dans le fichier make-stuff.xsl { <!-- Binds pièce j --> <xsl:template match="part/bind"> <xsl:if test="../action"> <xsl:apply-templates select="doc(concat('oxf:', ../section/form-xhtml/@url, ../action/@file ))/*"><xsl:with-param name="part" select=".." /></xsl:apply-templates> </xsl:if> <!-- TODO: use id-selector-Xpath --> <xforms:bind nodeset="instance('{../ <!-- what must be drawn where the section is in read state --> <xforms:bind ref="@ui:mode-read"> <xforms:bind relevant="instance('{../ </xforms:bind> <xforms:bind relevant="not(instance('{../ </xforms:bind> </xforms:bind> <!-- what must be drawn where the section is in write state --> <xforms:bind ref="@ui:mode-write" relevant="instance('{../ <!-- the section is open or not --> <xforms:bind ref="@ui:open" relevant="instance('{../ <!-- I must draw the edit button --> <xforms:bind ref="@ui:edit"> <xforms:bind relevant="instance('{../ </xforms:bind> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xsl:if test="../section/ <xforms:bind relevant="{../section/ </xforms:bind> </xsl:if> </xforms:bind> <!-- I must draw the ??? button --> <xforms:bind ref="@ui:add" relevant="instance('{../ </xforms:bind> <!-- I must draw the save for update button --> <xforms:bind ref="@ui:update"> <xforms:bind relevant="instance('{../ </xforms:bind> <!-- Allow update when Frozen to allow putting now data in frozen state (if not allowed, you cannot save after choosing "FROZEN" <xforms:bind relevant="not(instance('{../ --> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xsl:if test="../section/ <xforms:bind relevant="{../section/ </xforms:bind> </xsl:if> </xforms:bind> <!-- I must draw the trash button --> <xforms:bind ref="@ui:trash"> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xforms:bind relevant="instance('{../ </xforms:bind> <xforms:bind relevant="instance('{../ </xforms:bind> <xsl:if test="../section/ <xforms:bind relevant="{../section/ </xforms:bind> </xsl:if> </xforms:bind> <!-- I must draw the delete button --> <xforms:bind ref="@ui:delete"> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xforms:bind relevant="(instance('{../ </xforms:bind> <xsl:if test="../section/ <xforms:bind relevant="{../section/ </xforms:bind> </xsl:if> </xforms:bind> <!-- I must draw the restore button --> <xforms:bind ref="@ui:restore"> <xforms:bind relevant="not(instance('{../ </xforms:bind> <xforms:bind relevant="instance('{../ </xforms:bind> <xforms:bind relevant="instance('{../ </xforms:bind> <xsl:if test="../section/ <xforms:bind relevant="{../section/ </xforms:bind> </xsl:if> </xforms:bind> <xsl:if test="../multiple/is-multiple = 'true' and ../multiple/is-show-unique = 'true'"> <!-- Cas sans tableau, alors maintient l'id de la selection calculate="instance('{../ --> ICI il FAUT FINIR ligne 233 make-stuff.xsl : ../multiple/is-multiple = 'true' and ../multiple/is-show-unique = 'true' <xforms:bind ref="instance('{../instance- <xsl:attribute name="calculate"><xsl:call- </xforms:bind> </xsl:if> </xforms:bind> <!-- Lorsque les valeurs fournies étaient null c'est que l'utilisateur a rempli le champ, mettre null a faux. --> <!-- Pour chaque instance du document. --> <xforms:bind nodeset="instance('{../ <!-- POUR CACHER UNE SECTION ENTIERE --> <!-- <xforms:bind ref="instance('{./instance- <!-- ici test de confidentialitée --> <!-- ici test de droit de lecture de l'instance --> <!-- Warning, '..' because part is parent of current. --> <xforms:bind nodeset="instance('{../ <!-- for the upload files --> <xforms:bind nodeset="//company-file"> <xforms:bind ref="@length" calculate="if(normalize-space( <xforms:bind ref="url" type="xs:anyURI" /> <!-- TODO: make the service --> <!-- Pour une vignette qui serait contruite avec l'url suffixé par -v --> <!-- <xforms:bind ref="vignette" type="xs:anyURI" calculate="if (not(ends-with(../url, '-v'))) then concat(../url, '-v') else ../url" relevant="not(string-length(.. <xforms:bind ref="vignette" type="xs:anyURI" calculate="../url" relevant="not(normalize-space( <xforms:bind ref="download" type="xs:anyURI" calculate="../url" relevant="not(normalize-space( </xforms:bind> <xsl:if test="../section/form-xhtml and ../section/form-xhtml/@url and ../section/form-xhtml/@ <xsl:apply-templates select="doc(concat('oxf:', ../section/form-xhtml/@url, '/',../section/form-xhtml/@ </xsl:if> <xsl:if test="../section/form-xhtml and ../section/form-xhtml/@url and (not(../section/form-xhtml/@ <xsl:apply-templates select="doc(concat('oxf:', ../section/form-xhtml/@url, '/binds.xml' ))/binds/*"><xsl:with-param name="part" select=".." /></xsl:apply-templates> </xsl:if> </xforms:bind> </xsl:template> } 2018-03-28 7:00 GMT+02:00 Alessandro Vernet <[hidden email]>: Bonjour Aldjia, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Bonjour Aldjia,
J'imagine que le bouton "Edit" permettrait de changer le fichier, et le bouton "Delete" de la supprimer. C'est ce que fait par défaut le champs `<fr:attachment>`. Je ne sais pas s'il était déjà disponible dans Orbeon Forms 4.4, et dans le cas contraire, ma recommandation serait de mettre à jour Orbeon Forms à une version plus récente, et d'utiliser `<fr:attachment>`. Est-ce que vous pensez que ce soit possible? Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Bonjour Aldjia,
Est-ce que vous avez eu l'occasion de considérer une mise à jour de Orbeon Forms, et l'utilisation du composant `<fr:attachment>`, suite à mon message précédent? Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Bonjour Alex, Non, je n'ai utilisé le composant
`<fr:attachment>`, car je n'ai pas arrivé a mettre à jour la version de Orbeon (4.4 vers 4.5 ou bien vers la dernière version). j'aimerai bien si vous pouvez m'aidez pour faire la mise à jour de Orbeon 2018-04-09 20:48 GMT+02:00 Alessandro Vernet <[hidden email]>: Bonjour Aldjia, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Bonjour Aldjia,
Entendu. Je ne crois que cette discussion soit particulièrement intéressante pour les autres lecteurs de ce forum, et vais donc vous contacter directement par email. Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |