form-builder embedding parameters, buttons and processes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

form-builder embedding parameters, buttons and processes

falba48
Hello,

Is it possible to parameterize the form-builder embedded in the Java API, to give the name of the app and form, in the API headers?

<%    
    HashMap<StringStringmapa = new HashMap<StringString>();       
    
    mapa.put("app""Proves");
    mapa.put("form""test");
    
        API.embedFormJava(
            request,            // HttpServletRequest: incoming HttpServletRequest
            out,                // Writer: where the embedded form is written
            "orbeon",    // String: Form Runner app name
            "builder",          // String: Form Runner form name
            "new",              // String: Form Runner action name
            null,               // String: Form Runner document id (optional)
            null,               // String: query string (optional)
            mapa                // Map<String, String>: custom HTTP headers (optional)
        );
%>


Another question would be the consequences of changing the orbeon / builder buttons and processes in properties-local.xml.

I have managed to show only the save button and have it send a document-id to the servlet, and redirect to another page from the servlet.

Not seeing it in the documentation my question is about the consequences of doing this?

Is there any "then publish" metod?

Greetings and thanks.

<!-- Proves de parametritzar el form-builder -->
    <property as="xs:string" name="oxf.fr.detail.buttons.orbeon.builder">
        save-final
    </property>

<property as="xs:string" name="oxf.fr.detail.process.save-final.orbeon.builder">
    require-valid
    <!--        then email-->
    then save
    then send(
        uri        = "http://localhost:8080/formularis/ServletRepBuilder",
        method     = "POST",
        content    = "xml",
        replace    = "all"
    )
/>

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/f94ce33b-7b95-43f9-b0d7-ce4f46a110bf%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: form-builder embedding parameters, buttons and processes

Alessandro  Vernet
Administrator
Are you saying that you'd like to embed Form Builder, and would like to
provide the app/form name so users don't have to type it in the dialog that
shows up when you load Form Builder? If so, try passing them as request
parameters, in the query string, which is the 7th parameter to
`API.embedFormJava()`, just before the headers.

Doing this without the embedding API, which is maybe clearer, looks like
this, and you'll notice that if you load this URL you'll get right into Form
Builder without having to enter the app/form name:

https://demo.orbeon.com/demo/fr/orbeon/builder/new?fr-app=my-app&fr-form=my-form

For more on this, see:
https://doc.orbeon.com/form-builder/advanced/extensibility/integration#bypassing-the-new-form-dialog

You'll let me know if this works for you,

‑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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1590431086366-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: form-builder embedding parameters, buttons and processes

falba48
In reply to this post by falba48
Yes, this works.

Is it possible to modify the buttons and processes of the from-builder? For a button to save, publish and send the information of that form to a Servlet to use it?

I've only got these parameters with empty XML, I don't know if this integration is possible.

Parameters received in the servlet

{app=[orbeon], form=[builder], form-version=[1], document=[27835e22478afebaf22f11399fe03f94a8d546a8], valid=[true], language=[en], process=[a49008ecc675e9f5be622166eaaab5fa051a5390], data-format-version=[4.0.0]}

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/2a35a0f6-d73a-4f1d-a4be-6d1583c3ad26%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: form-builder embedding parameters, buttons and processes

Alessandro  Vernet
Administrator
Mmh… it is not completely impossible, but it is tricky to run something after
the form has been published. What is your use case? What do you need to do
with the form after it is published?

‑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 view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1590551367309-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet