Expand my Community achievements bar.

SOLVED

LiveCycle Workbench issues

Avatar

Level 2

Hi,

I created an XDP file in Workbench which has a simple web service call.

I set a data connection to an existing wsdl file in Resources and the form has a simple helloworld web service call; one output textfield and a button to invoke the web service.

In the button's click event I added a message box to display the return value.

Everything works fine until I close and reopen the XDP. Two things happen.

1. The script to display the message box is gone. Can't find it anywhere.

2. It complains about not being able to find the wsdl file.

But everything works just fine.

What is going on?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You are right ...you are not supposed to have code on an execute button. My guess is that when you add the code in the 1st place it is getting inserted into the template (look in the XML source I'll bet it is there). When you reopen the form later then the code shows up because iti sbeing read from the template. I agree that it looks like a bug. I suggest you open an incidient with support to get this fixed.

Paul

View solution in original post

9 Replies

Avatar

Former Community Member

I do this type of thing all of the time and have not had any issues. Are you sure you are saving the file before you leave designer?

Paul

Avatar

Level 2

Paul,

Yes, I'm sure I saved it. Even if I didn't save it, Workbench would ask me to save when I close Workbench.

I was able to reproduce the problem many times yesterday.

Create a simple XDP in Workbench, and put a button on it. Write a script to show message box when clicked. It works fine. So I close Workbench, restart it, open up the XDP and the script is gone. But the message box still shows up when the button is clicked.

So weird...

Jake

Avatar

Former Community Member

I followed your instructions and it worked fine for me. Which version are you using.

Paul

Avatar

Level 2

It's 8.2.1.3158.1.475346 and the server is installed on 64-bit machine.

Thanks,

Jake

Avatar

Former Community Member

I have the same build but on a 32bit machine ...sounds like you may have found a bug ...I would open an incident with support.

Paul

Avatar

Level 2

Thanks Paul,

I hope it's not a bug but a simple config issue or something like that.

Jake

Avatar

Level 2

Hi Paul,

I've found an interesting behavior.

Yes, it works fine if I just create a simple button and write scripts in the click event.

But it happens when I write scripts in the button that invokes a web service.

I created a simple web service called HelloWorld with no input and return value "Hello World".

I create a data connection to an existing WSDL file and drag and drop HelloWorld response and HelloWorldBtn.

And write a script in the HelloWorldBtn button's click event then it disappears when the file is closed and reopened.

Hope this could help you help me. 

Avatar

Level 2

Paul,

I think I've found the issue and it seems to be a bug.

Like I said earlier, it only happens to the button whose control type is set to "execute" which is the default type when created by drag & droping from data view.

This is how I reproduce the issue.

After creating the button, write a script to show a message in the click event and it works fine until it is closed.

When reopened, the script is gone but the message still shows up.

Write another script to show a message and now it shows two messages.

Close and reopen it, then the script is gone again but still shows two messages.

Now change the control type to "regular" then only the last script (not two) shows up in the script window.

Remove it then now it shows only one message.

Close and reopen, then it shows the first script.

When I create regular button and try to change the control type to "execute", it warns that the click event will be removed. But not shown in the other way. In addition, i'm not allowed to write scripts if the control type is "execute".

Anyway, I'd like to point out two things;

First off, if "execute" tpye of button is not supposed to have scripts it should not allow writing scripts in the script window in the first place just like when the type is changed to "execute" from "regular".

Secondly, it should show all the scripts at once when the control type is changed from "execute" to "regular", not one at a time when it's reopened. Because it's not version control, it's just a property change.

Thanks,

Jake

Avatar

Correct answer by
Former Community Member

You are right ...you are not supposed to have code on an execute button. My guess is that when you add the code in the 1st place it is getting inserted into the template (look in the XML source I'll bet it is there). When you reopen the form later then the code shows up because iti sbeing read from the template. I agree that it looks like a bug. I suggest you open an incidient with support to get this fixed.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----