on 01-17-2007 10:49 PM
Hi all WD gurus,
I have WD application on Java 6.40 portal. Application saves files from local HD into R/3 IXOS and this works fine. But I have another request:
FileUpload element is in one view (AddAttachment) with button for save file and confirmation button of whole document is in another view (InvoiceButtons).
If user chooses file from HD and don't save it in AddAttachment view, I have to check, if file was chosen. This control I have to do in InvoiceButtons view.
It is possible to check this or I'm not able to do this?
I kwow easier way is to map view context to the component controller context, but I got only "Object not found in cash - key is null" or similar error message...
Thanks for help
Ondrej
Hi Ondrej
Webdynpro Events is another approach to establish communication between two views.
- Declare new event X with parameter 'resource' in custom controller.
- Declare method like fireEventX(resource) in the controller too.
- View1 will call fireEventX(resource)
- View2 will declare event handler onEventX(resource) and do necessary validation there.
BR
Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the properties "resource" and "data" of FileUpload control are bound to context attributes (binary or Resource), you may check the attribute to null:
final IWDResource res = ...;
if ( null == res )
{
...
}
Let the attributes be in context of some Controller and both your views have context nodes mapped to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dzmitri,
thank you for reply.
As I wrote, when I mapped Resource attribute to the some Controller, application don't work and I get error message.
I use for testing purposes NW 2004 Sneak and there all works fine, but on this 6.40 server I have problems. I tried to perform hints fro forums (create Node element for Resource and Description of the file), but it all failed :(.
I have to know, if Resource attibute in AddAttachment view is accesible from InvoiceButtons view without context mapping?
Thank you, Ondrej
Let me guess your situation:
You have Component or Custom Controller. In its context you created attribute named "SomeFileUploadResource".
Add method ifFileUploadAble() which controls if the attribute is not null.
You have view AddAttachment, create in its context here attribute "SomeFileUploadResource", map it to appropriate attribute in the controller.
Bind the Resource property of FileUpload ui element to that attribute.
Now the actual file data will be stored in the controller thru the view AddAttachment.
In order to check if the data is available, from other view InvoiceButtons, you may call the method ifFileUploadAble() of the Controller.
If this does not work, please describe in detail the errors you got.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.