|
As I was playing around with uploading documents to an Xpages application, some of my documents were not being created as they should. Looking at the console, I saw the following error:
[1347586:00011-04627] 02/25/2010 08:38:42 HTTP JVM: WARNING: CLFAD####W: File Domino Web Service Part 3.pdf of size: 1258647 exceeds the max file upload size of 1048576. ClientId: view:_id1:_id34:fileUpload1
Is it possible to bubble this error to the xpage and notify the user that the file was too big? The current behavior is not appropriate as the user will not know why the document disappeared to lala land!
|
Ratings
0
|
|
|
Ratings
0
|
Yesterday, I completed the Xpages tutorial in the redwiki http ://www-10.lotus.com/ldd/ddwiki.nsf/dx/Building_an_XPage_web_application_from_scratch
I found the tutorial to be really good, except that it had many errors. So I figured I'd help out.
The tutorial is in PDF format, so I cannot modify it. While I was completing the tutorial (I had it printed), I annotated all areas with issues. This morning I compiled all the issues i've found and put them in a word document. This turned into a 20 pages document. I've emailed John Bergland my changes and hopefully they will be integrated back shortly.
In the process, I've realized how painful wiki's can be.
Route 1: PDF is attached Pros:
- Easy to print
- For the creator, it is easy to create the content. Use your favorite editor, then export to PDF
Cons:
Route 2: Tutorial is fully Wiki'fied Pros:
- Allows inline edits
- Allows multiple editors
Cons:
- Wiki markup is a PITA
- Adding/updating screenshots is a PITA * 10
- Markup is broken at times
In each above case, would I have contributed my changes back to the source? Case 1: Yes, I managed to write down my comments in a Word document, paste in screenshots of problem areas, and email the creator. Case 2: No. While many errors were textual (I could edit the wiki), many issues involved screenshots. This would require me to
- Take new screenshots
- Save the screenshots 1 by 1 to a file
- Upload all screenshots to the wiki
- Link the screenshots in the wiki markup
The above steps are way more than I'm willing to devote personally as it is not productive. While Case 1 is not productive either, I was able to use tools that do a good job in editing/managing content. Had the content been in a Word document, I could have modified it easily and reupload the file...which would have been the best case scenario
My story leads to the questions:
- Can the wiki's be accessed from a notes client with the full rich text experience?
- Are wiki's really the way we should be collaborating on content?
- Couldn't we manage the content using a real document editor and post the content to the wiki
If you are doing the tutorial and wish to see the suggestions I gave back, see the attachment http://www.bleedyellow.com/blogs/patpicos/resource/Xpagesfromscratch2.zip
|
Ratings
0
|
|
I thought I'd share a gotcha that bit me in the *** this morning.
While doing form validation, I called the uidoc.gotoField("fieldname") and it kept bombing with an error "Cannot locate field"
After further troubleshooting, it seems that the gotoField method does not find fields that are in a collapsed section. odd....
My workaround was to auto-expand all sections affected when in Edit mode
Mood: annoyed!
|
Ratings
0
|
|
From what I can see in the yellowsphere and at lotusphere, Xpages is a pretty cool technology offering notes developers tools not available to Web-ify applications.
However, everytime I look at moving an application to Xpages, some form contains Rich Text. My users are used to pasting screenshots from the clipboard right into notes documents and changing that habit is not an option.
Actually, I have the same issue with wikis. I'd like to contribute to them, but unfortunately, it forces me to save all screenshots to disk, then upload them, then link them in the document. A pretty painful process when used to PRTScreen --> CTRL-V, then resize.
At lotusphere, the Xpage folks mentioned that the Rich Text control will be enhanced significantly....but will it be enough to solve the above problem?
Have other vendors found a solution to allow pasting of images into fields on a web form? (without using applets!)
Maybe IBM should leverage the Symphony code for a web rich-text editor if that is possible (and not huge..)
|
Ratings
0
|
For most of the afternoon, i've been playing with RichTextTable's in lotuscript and its been an awful experience so far. I have a form I would like to display status updated in a table. Basically, the first column will contain the date and username of the person adding a status update and the 2nd column needs to be the user comments.....in Richtext
First Issue I ran into is that you cant manipulate rich text while the document is open. So I moved my code to an action button that is clicked when the document is in read mode. The button makes the changes, saves the document, closes the uidoc, then reopens it through ws.editDocument
Now my main issue is to bring in the user comments in richtext to the table. I tried using a ws.Dialog opening a comments form with a rich text field. For some reason the data typed in that rich text field is never available to me. Even if I call a save on that document, the rich text data is not saved.
Here's what my form looks like after 1 status update (hardcoded user message). Everytime the user clicks the action button "add status update", the code
- gets a handle on the RT field,
- finds the table (if missing, creates it),
- then adds a row,
- navigates to the first new cell and add the date/username
- navigates to the 2nd new cell and add some hardcode message (my hope is to add the user input...)
Action Button Code: Sub Click(Source As Button) Dim session As New NotesSession Dim db As NotesDatabase Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As NotesDocument Dim rtnav As NotesRichTextNavigator Dim user As New NotesName(session.UserName) Set db = session.CurrentDatabase Set uidoc = ws.CurrentDocument Set doc = ws.CurrentDocument.Document Dim rtTable As NotesRichTextTable Dim commentsRTI As NotesRichTextItem Dim commentsItemRTI As NotesRichTextItem Set commentsRTI = doc.GetFirstItem("StatusComments") rowCount% = 1 columnCount% = 2 If (commentsRTI Is Nothing) Then Set commentsRTI = doc.CreateRichTextItem("StatusComments") End If Set rtnav = commentsRTI.CreateNavigator If Not rtnav.FindFirstElement(RTELEM_TYPE_TABLE) Then Call commentsRTI.AppendTable(rowCount%, columnCount%) rtnav.FindFirstElement(RTELEM_TYPE_TABLE) Set rtTable = rtnav.GetElement Else Set rtTable = rtnav.GetElement Call rtTable.AddRow(1) End If 'Get comment from user Dim commentsDoc As NotesDocument Set commentsDoc = db.CreateDocument() commentsDoc.Form = "Comments" 'flag = ws.DialogBox( "SC" , [autoHorzFit] , [autoVertFit] , [noCancel] , [noNewFields] , [noFieldUpdate] , [readOnly] , "Please enter comments" , commentsDoc , [sizeToTable] , [noOkCancel] , [okCancelAtBottom] ) flag = ws.DialogBox("Comments",True,True,False,False,False,False,"Comments",commentsDoc) If flag Then Call commentsDoc.Save(True,False) 'The RT field data is lost .... Set commentsItemRTI = commentsDoc.GetFirstItem("commentsItem") 'Returns nothing :( Else Exit Sub End If rows% = rtTable.RowCount cell% = rows% * 2 - 1 Call rtnav.FindNthElement(RTELEM_TYPE_TABLECELL,cell%) 'Set who made the update Call commentsRTI.BeginInsert(rtnav) Call commentsRTI.AppendText(Str(Now) + " - " + user.Abbreviated) Call commentsRTI.EndInsert Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL) 'Add the actual update Call commentsRTI.BeginInsert(rtnav) Call commentsRTI.AppendRTItem |