external input parameters

aniramg
User offline. Last seen 6 weeks 4 days ago. Offline
Joined: 06/19/2011
Points: 80

Hello!

I have 1) a web page with some form in it and 2) I've also created custom App in Presto whitch merges RSS feeds.

I would like to filter those feeds depending on the answers given from the form (as input).

Is it possible? How can I do this?

Thanks in advance!

0
Your rating: None
smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

It is possible, although you may have to rework a few things. You can do both the form and using the form data as input to trigger the merge of RSS feeds using Mashboard in Presto along with a mashup to do the merge of the RSS feeds. What you need is:

1. To create a mashup (probably in Wires), that:
    a. Invokes all the RSS feeds you want to merge
    b. Uses the Merge block to merge all the RSS articles and
    c. Uses a Filter block to define the filter condition. Each filter condition compares RSS article titles (or description or any one specific RSS item field) to the value of an Input block. You can add the input block (the input parameter) as you create the filter). You can define several filter conditions if you need to.
    d. Take the results of the filter and wire that to the Output block of the mashup.
    The result is a mashup with one (or more) input parameters.
2. Create an App, probably using the Feed Reader view, for this mashup. The App will now have one or more input parameters that point directly to the mashup.
3. In Mashboard, create a new workspace and:
    a. Use the Palette tab to add a form to the workspace. This form will replace the form you have created in your web page. It sounds like it is basically just one field where users define something about the articles that they want to see.
    b. Add the App you created for your mashup.
    c. In the workspace "wire" the form to the input parameter for the mashup. Basically, the form passes the user's value as the input parameter to the RSS feed App, which passes it to the mashup and returns articles from those merged feeds that match the user's entry in the form.
    d. Save this workspace. This creates a single workspace App which you can embed in your original web page (minus the form you created originally).

There are Quick Tour videos that show some of this process. See http://www.jackbe.com/prestodocs/v3.0/#quickTour in the Presto documentation. This is an image map that opens the 4 videos for Quick Tour, #2 shows a mashup that is very similar to what I have described here. #3 shows how to create a workspace and wire Apps within that workspace to work together. For information on how to add a form to a workspace, see http://www.jackbe.com/prestodocs/v3.0/mashboard/addForm.html.

Hope this helps,

Sara, technical writer/jackbe

 

aniramg
User offline. Last seen 6 weeks 4 days ago. Offline
Joined: 06/19/2011
Points: 80

Sara,

thank you very much for your reply.

Actually, my form has many fields, it's not in english (so I use utf-8) and it's in php...

I tried to import it in my workspace (Add Tab -> Web page) along with the app which I created following the steps 1 and 2.

But when I try to wire those two it's not possible (wire manager identifies only the app).

What am I doing wrong?  What's the catch here?

Thanks again :-)

 

smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

Mashboard does not support wiring between Apps and other widgets, such as HTML pages. The only way to do this from Mashboard is to recreate the form with the Add Form option in the Palette menu.

If that doesn't work for you, another option is to create your form as a custom App and then pull that custom App into the workspace in Mashboard. Docs unfortunately do not have an example of a custom App that is a form. But there is a fair amount of basic information on how to create a custom App and how to make sure that the custom App supports 'loosely-coupled interactions' with basic Apps in Mashboard. Which is what you are trying to do, wire the custom App form to your existing basic App.

My best suggestion is to take your existing code for the form that you have created and see if you can use that, along with the necessary Presto App API calls and the required App Spec to remake this form into a custom App.

Links in docs to the basics of creating custom Apps and supporting wiring in custom Apps include:

* http://www.jackbe.com/prestodocs/v3.0/apps-dev/editor-intro.html

* http://www.jackbe.com/prestodocs/v3.0/apps-dev/createSimpleGrid.html

* http://www.jackbe.com/prestodocs/v3.0/apps-dev/wiringIntro.html

* http://www.jackbe.com/prestodocs/v3.0/apps-dev/appFiles.html

* http://www.jackbe.com/prestodocs/v3.0/apps-dev/appSpecIntro.html

 

Good luck. And please let us know if this work for you,

Sara, technical writer/jackbe