PDA

View Full Version : Actionbar in form disappears when rendering



dot.Scott
24 Apr 2008, 4:43 AM
I have just updated to Extnd 2 beta from alpha. I am experiencing a problem with a form action bar just after loading. The action bar appears unstylized for a split second and then disappears. It looks like the DXLExporter is throwing an error:

XML Parsing Error: no element found
Location: http://myserver/easthills/legal/ExtB1.nsf/extnd/2.0.1/DXLExporter?OpenAgent&db=EastHills\LEGAL\RoI.nsf&type=form&name=Document&_dc=1209040820296
Line Number 651, Column 1:

Not sure what needs to be done.

dawice
24 Apr 2008, 8:27 AM
Have a look at this post http://extjs.com/forum/showthread.php?t=28676

The action bar you are seeing is the default Notes bar. It should disappear and be replaced with an Ext version using the DXLExporter output.

jratcliff
24 Apr 2008, 1:26 PM
I have just updated to Extnd 2 beta from alpha. I am experiencing a problem with a form action bar just after loading. The action bar appears unstylized for a split second and then disappears. It looks like the DXLExporter is throwing an error:

XML Parsing Error: no element found
Location: http://myserver/easthills/legal/ExtB1.nsf/extnd/2.0.1/DXLExporter?OpenAgent&db=EastHills\LEGAL\RoI.nsf&type=form&name=Document&_dc=1209040820296
Line Number 651, Column 1:

Not sure what needs to be done.

For the call to the DXLExporter agent, can you do a "view source" and let us know what the error is?

As for the domino generated action bar showing for a split second and then going away. One solution you can do is to set a CSS style to make the body non-visible, and then, once all of your javascript has run, you can set the body back to visible.

Higs
14 May 2008, 9:21 AM
I have just updated to Extnd 2 beta from alpha. I am experiencing a problem with a form action bar just after loading. The action bar appears unstylized for a split second and then disappears. It looks like the DXLExporter is throwing an error:

XML Parsing Error: no element found
Location: http://myserver/easthills/legal/ExtB1.nsf/extnd/2.0.1/DXLExporter?OpenAgent&db=EastHills\LEGAL\RoI.nsf&type=form&name=Document&_dc=1209040820296 (http://myserver/easthills/legal/ExtB1.nsf/extnd/2.0.1/DXLExporter?OpenAgent&db=EastHills%5CLEGAL%5CRoI.nsf&type=form&name=Document&_dc=1209040820296)
Line Number 651, Column 1:

Not sure what needs to be done.

Not sure if what I found will apply to your issue, but I was getting the same thing. Posting to this thread because it seemed the most relevant with my search criteria.

Using Firebug, this is the error message displaying in the console:

<xml version='1.0' encoding='utf-8'?><error><line>158</line><number>4601</number><message>DXL exporter operation failed</message></error>

Went through the form bit by bit. Even created a blank form from scratch. I was still not getting my action bar.

My issue was with ACL settings. The Notes ID I signed the EXT database with only had Editor access. The signer ID needs to have Designer or Manager access in order to dump the DXL. Bumped up the signer id access to designer and voila the EXT action bar appeared.

jratcliff
16 May 2008, 3:02 PM
Ahh! Thanks for posting this. We need to create a FAQ and include this. I keep forgetting that the Java and LotusScript DXL classes requires Designer access or higher to access the dxl from design notes.

~Jack

tpistor
26 May 2008, 8:17 AM
Hi there!

at first : great project! Thanks to developers for this cool stuff ;-)

I've got the same problem but there was another reason:

I used two forms, one for web and one for notes client. Both called "BugReport"
(hidden by client type). The DXL exporter ignores this hide condition... doh! :D

RWaters
26 May 2008, 11:17 AM
Hi there!

at first : great project! Thanks to developers for this cool stuff ;-)

I've got the same problem but there was another reason:

I used two forms, one for web and one for notes client. Both called "BugReport"
(hidden by client type). The DXL exporter ignores this hide condition... doh! :D

Yeah, that's definitely an interesting case to look into. I would imagine that it would give you whichever one was the last one to be saved... I'll see if we can access that property in the agent.

tpistor
27 May 2008, 10:20 AM
hi again,

my form grew, and grew and grew... so the dxlexporter agent wasn't able to send the whole dxl document to the client. Here is the reason (part of dxlexporter agent):



Call exporter.SetOutput(stream)
Call exporter.Process

Dim outBuff As String
Print {content-type:text/xml;charset=utf-8}
outBuff = exporter.Export(noteDocument)
Print outBuff

' done with the stream so close it
stream.Close


I think this is too much for it... i tried this... and it works:



Call exporter.SetOutput(stream)
Call exporter.Process

Dim nstream As notesstream
Set nstream = session.CreateStream

Call nstream.WriteText( exporter.Export(noteDocument) )
Print {content-type:text/xml;charset=utf-8}
nstream.Position = 0

Do
Print nstream.ReadText(STMREAD_LINE, EOL_ANY)
Loop Until nstream.IsEOS

' done with the stream so close it
stream.Close
nstream.close


This code sends the DXL line per line. But with my current form it takes over 3 seconds to be generated :( i think i use the way to export only the actionbar LINK (http://extjs.com/forum/showthread.php?p=139363#post139363).

Are there any other ideas? Do i need the complete DXL form anywhere?

RWaters
27 May 2008, 11:09 AM
I think that returning only the actionbar seems like a good solution. We will likely be reworking the actionbar calls in particular to deal with several of the other issues we run into.

tpistor
28 May 2008, 11:37 PM
Yeah, that's definitely an interesting case to look into. I would imagine that it would give you whichever one was the last one to be saved... I'll see if we can access that property in the agent.

I don't find an easy way to get this property (@ibm: why not?).

But there is a workaround:

I added a field called "FormHideWeb" to the form i want to hide from web and added this function to the agent:



Function GetWebForm(srch As String, hidestr As String, d As notesdatabase) As NotesForm
On Error Goto errh
' srch = formname or alias
' hidestr = do not use this form if this field exist

Dim useform As Boolean
srch = Ucase(srch)

Forall form In d.forms
If Isarray(form.aliases) Then
Forall y In form.Aliases
If Ucase(y) = srch Or Ucase(form.name) = srch Then
useform = True
Forall z In form.fields
If Ucase(z) = Ucase(hidestr) Then : useform = False : Exit Forall
End Forall
If useform = True Then Set GetWebForm = form : Exit Function
End If
End Forall
End If
End Forall

errh:
Set GetWebForm = Nothing

End Function

Replace this line

Set noteForm = db.GetForm(sName)with this

Set noteForm = GetWebForm(sName, "FormHideWeb", db)maybe another good solution :
http://www-10.lotus.com/ldd/sandbox.nsf/0/f81067f94a1143f3852567d800660625

------------------------------------------------------------------------

Result : The rules for action bars in forms:

1. Form name and alias must be unique OR (link) (http://extjs.com/forum/showthread.php?p=174777#post174777)

2. Agent must be run 'in behalf of' a person with designer rights.

3. The DXLExporter Agent uses only one 'Print' to return the whole DXL:
-> Use small forms OR send DXL line per line (link) (http://extjs.com/forum/showthread.php?p=173948#post173948) OR send only Action Bar (link) (http://extjs.com/forum/showthread.php?p=139363#post139363)

Idea: cache the DXL to a profile doc and use it on next calls.