329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
InViewEdit to change field names
Thu, Mar 21st 2013 157
We would like to understand why you were Very Dissatisfied with the the ease of opening this service/support request.
Mon, Mar 18th 2013 329
Open DocLink in Frameset
Tue, Feb 26th 2013 223
NotesViewNavigator - turn off AutoUpdate
Fri, Jan 11th 2013 411
Clear out "ghost" attachments
Fri, Jan 11th 2013 368
XPage onBeforePageUnload
Fri, Nov 30th 2012 522
All MIMEs little children
Wed, Nov 14th 2012 450
Top 10
Get all attachment names for xPages
Sat, Aug 20th 2011 597
XPage onBeforePageUnload
Fri, Nov 30th 2012 522
All MIMEs little children
Wed, Nov 14th 2012 450
Many RESTful documents all at once
Mon, Jul 16th 2012 447
NotesViewNavigator - turn off AutoUpdate
Fri, Jan 11th 2013 411
Clear out "ghost" attachments
Fri, Jan 11th 2013 368
Validate a Combobox
Wed, Nov 3rd 2010 361
PDFs from XPages via iText - presentation at MWLUG 2012
Sun, Aug 19th 2012 357
iText in XPages
Sun, Aug 14th 2011 338
We would like to understand why you were Very Dissatisfied with the the ease of opening this service/support request.
Mon, Mar 18th 2013 329


Agent to facesContext stream: I'm missing the connection
Brian M Moore    

Stephan has a great post on using facesContext to handle the output of an agent. But I'm missing how you hook the agent output to this. I'm not a deep Java guy, and I've been looking for it and not finding it.

What I want to do is have an agent where I create a document (a PDF at this point, so Java) and create a file then serve the file to the browser. All the examples I'm finding are showing how to do it all in via the writer where you write the text in (like the example in the xPages cheat sheet). I'm sure it's real simple, but I'm not seeing where I tell the code in the xpage I don't render to get the output of the agent I trigger. 

I'm thinking I could create a NotesStream, get my file and hook it up it up to the "getResponse", but I can't find how to do that. Stephan says to use the stream, I just can't find a sample of how that goes from soup to nuts.

If someone gives me a working sample, I'll buy dinner.

Cheers,

Brian



---------------------
http://www.bleedyellow.com/blogs/DominoHerald/entry/agent_to_facescontext_stream_i_m_missing_the_connection
Sep 27, 2011
155 hits



Recent Blog Posts
157


InViewEdit to change field names
Thu, Mar 21st 2013 3:15p   Brian Moore
Now I've not dug deep into this, but I made an error today in classic Notes development. I've just installed Notes9 (named in honour of the great podcast Notes in 9 [joke]). I'm working on an InViewEdit. I have two of them in this view, and they have the programmatic names of "useFT" and "useWE". They display values from the "generateFT" and "generateWE" fields. What I did was this: If Colprogname(0) = "UseFT" Then Call doc.Replace [read] Keywords: notes development podcast
329


We would like to understand why you were Very Dissatisfied with the the ease of opening this service/support request.
Mon, Mar 18th 2013 2:13p   Brian Moore
I mostly get great support from IBM when I call into Domino support. Except now the phone is answered by what appears to be some outsourced call center that has no clue what they are supporting. I know outsourcing is all the rage, but this does not work in this case. As a programming professional, when I call into support, I expect the person on the line to be familiar with the product. I am not a consumer calling in wondering why I can't get to my email or why the internet is broken, I' [read] Keywords: domino ibm xpages email
223


Open DocLink in Frameset
Tue, Feb 26th 2013 12:09p   Brian Moore
I love have brilliant co-workers. I have been working on a project in classic Notes that sent out a view DocLink. I had a request for it to open the database in the frameset used for navigation. By default, a view DocLink will open the database to the default view tree. Workable, but not as nice as the frameset. I mentioned this to my work partner David Jones and he tole me that if you name the target frame "NotesView" the view DocLink will open in the frameset. I tried it and it worked. Da [read] Keywords: lotus notes database
411


NotesViewNavigator - turn off AutoUpdate
Fri, Jan 11th 2013 4:14p   Brian Moore
I'm a big fan of the NotesViewNavigator. I use it a lot since I can put a view together and see how data is supposed to act, then call from it. I make checklists, tables, documents, all sorts of thing out of it. One of the reasons I like it is because you can work on just a single category and inside the NotesViewNavigator "jump" from category to category if you want. I was using this today and I was getting an error that it couldn't find the next sibling. I know there where 5, the d [read] Keywords: ibm ldd lotus lotusscript bleedyellow bleedyellow.com
368


Clear out "ghost" attachments
Fri, Jan 11th 2013 10:12a   Brian Moore
For a project, I had to provide a way for users to select certain images to delete out of an XPage. Displaying and giving a checkbox to delete was easy - but then I had to actually delete the images. There could be any number of attachments (all images, so I don't need to worry about type), and the user should be able to delete any of the images. Here is where my problem came up. I could delete the embedded objects from the NotesDocument no problem - but this left "ghosts" in the rich te [read] Keywords: agent notes rich text richtext
522


XPage onBeforePageUnload
Fri, Nov 30th 2012 3:10p   Brian Moore
This is one of those "I've trooped all over the internet and found the answer sitting at my front door" posts. I'm working on an app, and I have a requirement that if the user tries to navigate away from the page without saving they will get a warning. It's a good idea, and it's something Notes does natively - not so in XPages. I cast around a bit and found onBeforePageUnload, a browser event that can be used in just this situation. So I did some digging trying to integrate it [read] Keywords: notes xpages apple application bleedyellow bleedyellow.com properties
450


All MIMEs little children
Wed, Nov 14th 2012 9:12p   Brian Moore
I've used a NotesStream to put a file in a Rich Text Field or MIME quite a number of times over the last few years. Recently, I've needed to expand on this and put multiple attachments in a field. I didn't find much on this, so I thought I'd post. The important trick seems to be setting a ParentEntity. In your typical MIMEEntity, which is "body" in all the examples (including this one) set body as a parent entity. Then create child entities for each file, and stream it in. Here [read] Keywords: lotusscript rich text java
260


Using the Custom REST Control: Notes in 9
Wed, Nov 14th 2012 8:10p   Brian Moore
I've just done a new Notes in 9 - on using the Custom REST Control - head over and watch it. Here is the full XPage with the control. And here is the script library I used to handled the input. I also mentioned the Chrome Advanced REST Client and the Firefox RESTClient. I would also suggest looking at JSONLint for checking the JSON format. A couple of big things to remember when using the REST control - be sure to add the pathInfo to your control, and to reference it in your URL. Set th [read] Keywords: notes script library xpages bleedyellow bleedyellow.com firefox google xml




240


Get the UNID for Custom REST service toGet method
Tue, Oct 30th 2012 7:15p   Brian Moore
I bypassed the out-of-the-box REST services to go directly into making custom REST services with the Extension Library. At the moment, I'm working on a couple, but for one I want to respond to a GET request. I've been doing POST, but this was new. The problem I found was how to determine what document I was acting on. The XPage didn't automatically (as far as I can tell) make a connection to the DominoDocument as a data source - even though I had the XPage set to this and to edit or [read] Keywords: notes xpages
257


Are you sure you are registered for LotusSphere/Connect?
Fri, Oct 26th 2012 9:12a   Brian Moore
So I registered for LotusSphere yesterday. Something odd happened - I didn't get a confirmation number or email. This disturbed me since it is a pretty good chunk of change. This morning, still nothing to either of the email accounts I gave them. I really don't like having nothing at all back, not even a reference number. The website had sent me on to make my hotel reservation, which I did. So this morning I called the customer support line. I was told that the LotusSphere reservation [read] Keywords: notes xpages email reservation




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition