WDJ: binding image field to context attribute
Dear all,
I filed a form with an image field to allow the user to insert a picture on the form from his PC.
The form is shared by several Web Dynpro Java View.
What is the right type of the context attribute for binding the image field of the form?
Thanks for your time.
Regards,
Mirco
Hi Chintan,
I also think it was a binary. but I do not, partly because the image field object is bindable with any data context (I tried so far with integer, string, binary)
To share the image between two Web Dynpro vew I used "usePDF" mode but I would like to bind the image with a context attribute so I can use "updateData" mode instead of "usePDF" mode
Regards,
Mirco
Similar Messages
-
How to bind "Image Field" object on a database
Hi to all
I inserted into a dynamic PDF (Livecycle ES3 trial) an image field, but I don't understand how I can to bind a JPG into a database.
In (F5) preview... I'm able to open a image file on filesystem and visualize it on PDF form... but then? How to bind on database?
In my several tentatives I'm using a MS Access 2010 database table, where I defined a OLE object... but doesn't work.
Thank you at all.
visertHi,
I have not tried to do this, but this document provides some instructions.
http://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdfhttp://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdf
Hope it helps
Bruce -
Hi all
I have input field and it already binded context attribute .I am working on enhancement frame work so I can not modify propety of context attribute.My requirement is to create new attribute and bind it with input field dynamically.
I am able to create context attribute and bind it to input field but it's not working ,can we do it dynamically????
Pls help
Regards ReehaHi,
if you already have a context attribute than you can do this, I just created a test application to create one input field and bind it with a context attribute dynamically.
my context is like this:
SUBS_TYPE_NODE <------node name
-SUBS_TYPE_VALUE <----node attribute type string
under WDDOMODIFYVIEW i did this:
if first_time = abap_true.
DATA:
lr_container TYPE REF TO cl_wd_uielement_container,
lr_input TYPE REF TO cl_wd_input_field.
get a pointer to the RootUIElementContainer
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' )
lr_input = cl_wd_input_field=>new_input_field(
bind_value = 'SUBS_TYPE_NODE.SUBS_TYPE_VALUE' "notice here how I passed the node and its attribute
id = 'INPUT_F1'
view = view ).
cl_wd_matrix_data=>new_matrix_data( element = lr_input ).
lr_container->add_child( lr_input ).
endif.
hope this helps...
AS. -
How to bind UI Element with Context Node Attribute Element
Hi,
I'm building my view dynamically in the wdDoModifyView method.
Is it possible to bind a "TextView" element to a specific element of an attribute node?
Scenario:
Node_Employees
|
+- Attribute_Code
|
+- Attribute_Name
Node Contents:
Employees
|
+- Code: 1, Name: Employee 1
|
+- Code: 2, Name: Employee 2
|
+- Code: 3, Name: Employee 3
I need to do something like binding a TextView UI element to the "Name" attribute of the element #2, what would result to show "Employee 2" on my view.
How can I do this?
Thanks in advance,
Geraldo.Hi Saravanan,
First I populate the context node and it won't change during view's lifecycle. After that, I build my view and bind the TextView UI elements to the node context attributes elements.
If the node has 10 elements, I will build 10 TextView UI elements and bind them to each attribute element.
Regards,
Geraldo Brígido. -
How to map a context attribute to an input field
Hi,
I am new to CRM 2007 UI.I have a table control view on my screen and records are filled in this table when an user enters a value in an input field and presses enter.My bsp page looks something like this.
<%@page language="abap" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="uhtmlb" prefix="uhtmlb" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="crm_bsp_ic" prefix="crmic" %>
<%@extension name="bsp" prefix="bsp" %>
<%
DATA lv_xml TYPE string.
lv_xml = controller->configuration_descr->get_config_data( ).
%>
<thtmlb:grid cellSpacing = "1"
columnSize = "1"
height = "100%"
rowSize = "2"
width = "100%" >
<thtmlb:gridCell colSpan = "1"
columnIndex = "1"
rowIndex = "1"
rowSpan = "1" >
<thtmlb:label id = "NAMELABEL"
for = "NAMEINF"
text = "Enter a name" />
<thtmlb:inputField id = "NAMEINF"
disabled = "FALSE"
tooltip = "Enter a name to see all records"
submitOnEnter = "X"/> </thtmlb:gridCell>
<thtmlb:gridCell colSpan = "1"
columnIndex = "1"
rowIndex = "2"
rowSpan = "1" >
<chtmlb:configTable id = "PaymentTable"
table = "//HeaderData/Table"
xml = "<%= lv_xml %>"
selectedRowIndex = "<%= HeaderData->SELECTED_INDEX %>"
fillUpEmptyRows = "FALSE" />
</thtmlb:gridCell>
</thtmlb:grid>
The problem is that I want to map this input field to my context attribute.I am from Webdynpro background and ther its pretty easy :)....
Any suggestions will be helpful.
Thanks
SouravHi,
you should add the context attribute to the html page itself, or another way of doing it is to implement the set_model method of the view controller.
On the view controller you can find a lot of usefull attributes like the view manager which can help you understand the bsp framework
Best regards,
Erika -
Binding an image to the Image Field
Greetings,
We are in the process of converting Adobe Central documents over to Adobe LiveCycle. Our forms contain the company logo which is currently stored in Adobe Central and our legacy system sends over the name of the logo to use. For LiveCycle, we don't want to "hard-code" the image to the form as our company logo changes and we don't want to change each form when this happens. Can we store the logo in the application and send XML data over telling it which logo to use in the Image Field?
Thanks,
WendyGeet,
Just bind the URL field you have in the WSDl to the Image Field and I belive it should display the image.
Alternatively these links should give you some hints:-
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dynamic%20non-interactive%20pdf%20form.pdf
How to insert a dynamic link in an image
Chintan -
Check Mandatory Fields when state is bound with context attribute
Hello All,
Currently i am facing problem in my SAP SRM 7.0 standard component.
Actually, i have to remove mandatory(State = Required) for one of my inputfileds for this I have written below code, but it has been remove only Red mark * infront of Inputfield, after that, i am trying to save other data, still it is asking me enter the required value.
here my input field bound with Context attribute, it is standard attribute.
data:lo_input1 type ref to cl_wd_input_field.
lo_input1 ?= VIEW->get_element( 'NAME_FIRST' ).
lo_input1->set_state( '00' ).
I am trying to delete state = required property from below component and view
Component Name : /SAPSRM/WDC_MOFC_PERSON
View : V_PERSON
Can you help me on this?
Thanks
Sandeep.Hi Baskaran ,
Thanks for ur reply ..
Eveen in that component they have not used cl_wd_dynamic_tool class for mandatory attributes
I want to share another thing with u that is
I am trying it in another way
with the following code which i have done in post exit is
let me explain u what i did
__first of all i got the child node of rootuielementcontaine
later
i get the childnode of container_left and assigned it to another class of ref cl_wd_uielemnent
now where i have struked is
*CALL METHOD LR_CHILD2->GET_CHILD
EXPORTING
ID = 'FORM_OF_ADDRESS_DROPDOWN'
INDEX =
RECEIVING
THE_CHILD = LR_C1.
what the error i am getting is
OBJECTS_OBJREF_NOT_ASSIGNED
Please correct me if there is any wrong inn the code ...
FORM_OF_ADDRESS_DROPDOWN--->ui element dropdown
r__ DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lt_children TYPE cl_wd_uielement=>tt_uielement.
DATA lr_view TYPE REF TO if_wd_view.
DATA lr_child TYPE REF TO cl_wd_uielement.
DATA lr_child1 TYPE REF TO cl_wd_uielement.
DATA lr_child2 TYPE REF TO cl_wd_uielement.
data : LR_CON1 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
data : LR_CON2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
SANDEEP
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lt_children = lr_container->get_children( ).
CALL METHOD lr_container->get_child
EXPORTING
id = 'DATACONTAINER'
index = 1
RECEIVING
the_child = lr_CHILD.
LR_CON1 ?= LR_CHILD.
CALL METHOD LR_CON1->GET_CHILD
EXPORTING
ID = 'CONTAINER_LEFT'
INDEX = 1
RECEIVING
THE_CHILD = LR_CHILD1 .
DATA : LR_CHILD2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
LR_CHILD2 ?= LR_CHILD1 .
*DATA : LR_C1 TYPE REF TO CL_WD_UIELEMENT.
*CALL METHOD LR_CHILD2->GET_CHILD
EXPORTING
ID = 'FORM_OF_ADDRESS_DROPDOWN'
INDEX =
RECEIVING
THE_CHILD = LR_C1.
*DATA : LR_DD TYPE REF TO CL_WD_DROPDOWN_BY_KEY .
*LR_DD ?= LR_C1 .
*CALL METHOD LR_DD->SET_STATE
EXPORTING
VALUE = '00'
sandeep -
Setting Image field in adobe form
Hello Gurus,
I have a question setting the image field dynamically.
I have created a following context structure for
DataSource(ValueNode Cardinality (1..1))->imagenode(Valuenode Cardinalty(0..n))->image(Value attribute))
I have binded the Datasource node to the Datasource of the interactive form.
I have dynmaically created the imagenode and set the value for the image.
for(int i=1;i<5;i++)
image= wdContext.createIImagenodeElement();
if(i==1)
image.setImage("http://Image1.png");
if(i==2)
image.setImage("http://Image2.png");
if(i==3)
image.setImage("http://Image3.png");
if(i==4)
image.setImage("http://Image4.png");
wdContext.nodeImagenode().addElement(image);
Now I want to set this node to the image field in adobe.
In URL of the image field I have enterted $record.imagenode[*].image and its not working where as the same thing works for text field.
Please let me know if any one has any idea on this.
Thanks,Hi Naresh,
Copy the images to src -> mimes - > Components of your development component / project.
To the value node set the url like the following way ...
http://<hostname>:<port number>/webdynpro/resources/image.gif
Thanks
Madhu -
How-to map multiple explicit search help values to context attributes?
Hi,
I have a custom explicit Search Help with multiple attributes set as export and uses search help exit for data retrieval. I have set this Search Help for one of the context attribute that is binded to one of the input fields on view.
Now, is it possible to dynamically map other export attributes from this Search Help to other Context attributes?
I know this works for Input helps that are directly derived from check tables but not sure how to do it for explicit Search Helps.
Can anyone please confirm and let me if this is possible? If yes, then can you please share an example or describe how to do it?
Thanks and Regards,Hi Srinivas,
Check this ..Search help can be dynamically assigned to a field.
data lo_nd_info type if_wd_context_node_info.
lo_nd_info = lo_nd->get_node_info( ).
CALL METHOD lo_nd_info->set_attribute_value_help
EXPORTING
name = 'ATTR1' " Your attribute Name
value_help_mode = '121' " Valid value help mode
value_help = 'Z187442'. " Search help name
The various possible values that you can pass to value_help_mode are as shown below.
deactivated 101
automatic 111
ddic 121
ovs 131
Also refer this..
Re: How to put dynamic search help in web dynpro ABAP.
Cheers,
Kris. -
Insert a dynamic link form R/3 into image field in PDF.
Hi gurus ,
I am using a wd java application . In that i want to show employee pic in adobe form . I have RFC in place , that gives me URL (ex : http://retep.... ) containing employee pic Context is of type string
Now i have craeted a image field in PDF . but i am not sure about scripting and how to bind that context to image field , so that based on the url it dynamically displayes employee pic.
Any suggestions are most welcome .
Regards
AbhayHi Abhay,
If u are getting the URL from the R/3, then set the type of the context variable to the model type rather than making it as a String.
map the type of the context variable to the type present in the RFC
Hope this helps u
Regards,
Poojith MV -
Values not passing from form to context attributes (value attributes)
Hi Experts,
I have bound the properties of theadobe interactive form (WD-Java) to the context attributes but the values are not passing to the value attributes at runtime.
For your information I have not bound the pdfsource binary attribute of the view to the custom controller pdfsource binary attribute.
Please advise.
Thanks,
ShobhitContext
GetData - ModelNode mapped to controller context (DataSource)
Attribute1 - Value Attribute (Form Field)
Is it allright to have the Data Source as a ModelNode (mapped to the controller context node) and then have Value Attributes under the ModelNode which are then bound to the adobe form input fields.
I know its frustrating to advise on such questions without looking at the code actually. But I would definitely need your support.
If possible could you mail me a project of yours where you have the form being PREFILLED with some values coming from a RFC FM and then the same form gets posted to SAP though another RFC FM.
Thanks,
[email protected]
OK. When I create a Fresh Adobe Interactive Form application, it works fine.
The problem Im facing is in the case, when Im using an existing PDF file created in the ABAP stack (TCode SFP). I am importing this PDF file into the WebDynpro Java Application and then binding the fields. So in this case the context binding does not work.
You guyz are right, I need to check if there is any other script which exists. But still what are views after this update?
Message was edited by:
Shobhit Swarup Mathur -
Applaying Online interactive form tutorial -Image field problem
h1Assalam alikom
hi all
i faceing a problem with creating image field in adobe intercative form
i followed the steps included in the online interactive from for image field but there is an error
after rendering the form
knowing that it worked for the sample given with the tutorialh1
The error is as follows
script failed (language is formcalc; context is xfa[0].form[0].ReportData[0].#subform[5].imageField[0])
script=this .value.image.href=xfa.resolveNode(this.value.image.href).value;
Error:An attempt was made to reference property 'Value' of non-object in SOM expression
xfa.resolveNode("http://amercet:51500/webdynpro/resource/xccre.cic.com/contract_print/Components/com.cic.xccre.enquiry.com_cn_print.com_Cn_print/villasZone.jpg").valueDear Engineer Naguib,
Please refer to the following post:
[Adobe Forms and Dynamic Images]
this.value.image.href = xfa.record.Images.URL;
Replace "xfa.record.Images.URL" by "xfa.record." + path to URL attribute in data hierarchy.
Regards,
Motaz -
Adobe form bulider - Image field
Hi,
I have a requirement where i have to pass URL for image field through interface
and it should dispaly image.
Now the problem is if i assign the URL directly it works but if i do a binding there it doesen't work may be i am not doing it in right way.
Any clue.
Thanks,
AtulDear Engineer Naguib,
Please refer to the following post:
[Adobe Forms and Dynamic Images]
this.value.image.href = xfa.record.Images.URL;
Replace "xfa.record.Images.URL" by "xfa.record." + path to URL attribute in data hierarchy.
Regards,
Motaz -
How can I remove an OVS extension from a context attribute?
In our Web Dynpro application we provide a generic search mask to the user. The information about the search fields like labels, length etc. is retrieved from the backend during runtime. Also, the information if there should be a value help available or not is read from the backend during runtime. In case there should be a value help for a search field we just add an OVS extension, using method WDValueServices.addOVSExtension(...). For this, we pass the AttributeInfo of all relevant context attributes to this method.
The problem is now the following: The user can switch between different kinds of search masks. Because of the generic implementation all use the same Web Dynpro context. So it might be that the search field #1 on the first input mask has a value help whereas search field #2 on the second input mask doesn't. But if we once have added an OVS extension to the context attribute of search field #1 it can apparently never be removed anymore. At least I couldn't find a method to remove it.At least your second proposal would work for sure if I had only static context nodes apart from the dynmic OVS context. But in my case I can not use wdContext.reset(false) since I have dynamic context nodes in my controller that would get lost. And unfortunately, there is no method available to reset a specific context node only instead of the whole context.
I contacted the responsible Web Dynpro developers in the mean time and they offered to implement an API in SP11 to remove the OVS. -
Bind multiple fields to one node in data view
I have a need to have an interactive form where data from a single data source is displayed in multiple fields on the form. In addition these fields are open for input. I have bound the multiple fields on the form to one node in the data view. The data is being displayed in the multiple fields. This form is being routed thru workflow so various agents are updating the form. The problem that I am having is that the form only seems to allow input in the first field on the form but not the other fields that are tied to the same data source. For example, field A and field B are bound to node SUMMARY. I can add/change/delete data in field A but not in field B. After I have done some entry in field A, I can then sometimes make changes in field B. We have a requirement that field A be enabled for agent #1 but field B is invisible. Later in the workflow, agent #2 needs to make final changes on a "summary" page so agent #2 had field B enabled.
Does anyone have any idea how to correct this data entry issue so that data can be entered into either field that is tied to a single node?Having multiple fields in the backend is not an option. I will not go into the business reason in detail but the last page of the form contains a final version of data pulled from various locations on the form where the data on the other pages was input by multiple agents in the process flow. The last agent in the workflow needs to put the "finishing touches" to the data and should not have to search all over in the form to find the appropriate data fields.
I have found 2 possible solutions and would like to know if anyone can recommend one over the other.
First solution - bind multiple fields on the form to one node in the data view. This seems to work correctly on the form and data can be entered into either field, with the data being passed back to the webdynpro context in the one node in the data view (corresponding node in WD context).
Second solution - the node/attribue in the WD context must have the same name as a DDIC element. The node in the data view must have this same name. The field names on the form must also have the same name. Define the binding for the field names as Global. I have not validated that the data is passed back to the WD.
Maybe you are looking for
-
Is there a way of persuading iCloud to sync the smart groups I have in address book on my Mac
I have a small number of smart groups in address book on my iMac. but these do not sync through iCloud to my Macbook or iPod touch. Everythin else syncs even ordinary groups, but not the smart groups. Is there a way of persuading iCloud to do it?
-
How can I iterate over the columns of a REF CURSOR?
I have the following situation: DECLARE text VARCHAR2 (100) := ''; TYPE gen_cursor is ref cursor; c_gen gen_cursor; CURSOR c_tmp IS SELECT * FROM CROSS_TBL ORDER BY sn; BEGIN FOR tmp IN c_tmp LOOP
-
When I updated my IPad my YouTube App disappeared. How can I get it back?
When I updated my IPad my YouTube App disappeared. How can I get it back?
-
HT3209 Renting refund for movie that won't play(white screen on applet )
If I buy the movie I can view it. However my rented movie - after completely downloading would not play. I only get a white screen. I already tried unplugging g the appltv to no avail. Does anyone have another suggestion for a fix? Or know how I can
-
Importing music from ipod to computer?
Hi! My computer recently had a major malfunction, and all my files were deleted, including all music. The music is still on my ipod, however. Is there any way to import the music from my ipod back onto my computer? PLEASE say there is!! thanks!