on 06-03-2008 8:21 AM
Hi friends,
I want to display a img in the table,( in the CUIBB)
I have the img on the desktop, how i can bring that into the CUIBB and show that image.
Could you support me in this regard?
Thanks & Best Regards, Prabhu
Hi
Go to navigator view in web dynpro perspective
save the image into
just copy ur image and paste it into following path
Project-Folder>Src>Mimes>Components>YourComponentname, inside that you can save.
Just make sure that ur CUIBB is a image type editor.
Just delete existing CUIBB editor and add tablecelleditor of Image type.
go to properties of image type editor and and in source property type ur full image name.
At runtime u will see image in ur output.
Regards
Surender Dahiya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Surender ,
I have saved image into following path
Project-Folder>Src>Mimes>Components>YourComponentname,
But I am not able to show that img in the table,
How I can read that image into table.
I am not undestanding 'image type editor' as said
(Just make sure that ur CUIBB is a image type editor.
Just delete existing CUIBB editor and add tablecelleditor of Image type.
go to properties of image type editor and and in source property type ur full image name.)
Regards
Prabhu
Hi,
Dont specify CUIBB in the forums its not known out side the SAP. And it will be confusing.
To get the image in your table do the following
1)Place your image in Src->Mimes->Components-><Your Component Name>
2)Create a table column
3)Insert table cell editor->Image
4)set the sourcee property of your image from the component.
Ex:Sunset.jsp
deploy your dc and embed the CUIBB in Vc and test
Regards
Ayyappaaraj
Hi,
U need to bind ur table to a data source so create a value node say ctx_node.
bind it to table manually dont use apply template.
Create an attribute of string type say ctx_image in ctx_node.
bind this attribute to source property of Image editor manually.
and In ur code create an element of this node set ctx_image
with ur image name(with proper case) and add that element to ctx_node.
This will surely work.
Regards
Surender Dahiya
Hi Surender,
Yes i have followed the same procedure ,
I have created a context node with context attribute which will hold the img URL for me.
Then depending on the two conditions i am adding elements and the img URL as:
if(mandatory.equalsIgnoreCase("false")){
selcontextElement.setAttributeValue("ImgUrl", one.gif);
}
else{
selcontextElement.setAttributeValue("ImgUrl",stwo.gif);
}
This will add the img url to the context what i have created.
But in the table i have taken table column followed by the img UI element.
When i depoy it and run, I am getting the one.gif only for all the rows in the column.
but in the context the two.gif is there as attribute.
Could you support me here ??
Thanks & Best Regards, Prabhu
Hi Ayyapparaj,
I made the attribute as calulated, tried to execute it
But struck up with dump showing "attribute ImgUrl is read only. "
Here I am attaching the exception :
The initial exception that caused the request to fail, was:
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(Root.Floorplan.FAU.IIU/EvaluationDimensionComp.Inports.Img.0): attribute ImgUrl is read only.
at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetCalculated(NodeElement.java:610)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo$CalculatedAccessor.set(DataAttributeInfo.java:737)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.setAttributeValue(DataAttributeInfo.java:524)
at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:600)
at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:649)
could you suggest me in this case ??
Thanks & Best Regards, Prabhu
Hi Ayyappaji,
I have made the attribute readoOnly--> as false and then tried to execute and got a dump telling
java.lang.NullPointerException
at com.sap.tc.uip.dt.kpi.plugin.tstx.wd.comp.evaluationdimensioncomp.MainView.wdDoModifyView(MainView.java:211)
Then I tried to chane the attribute Buffered Mode --> as Buffered , Then it worked BUT Not as expected to show the different images on the rows..
Could you gine some info to proceed??
Thanks & best Regards, Prabhu
Hi Ayyappaji,
I have done the assignment of context attribute by using the below code:
if(mandatory.equalsIgnoreCase("false")){
wdThis.wdGetEvaluationDimensionCompController().wdGetAPI().getComponent().getMessageManager().reportSuccess("Not mandatory");
selcontextElement.setAttributeValue("ImgUrl", NosinglevalDesc);
}
else{
wdThis.wdGetEvaluationDimensionCompController().wdGetAPI().getComponent().getMessageManager().reportSuccess("mandatory");
selcontextElement.setAttributeValue("ImgUrl",singlevalDesc);
}
when i tried to check if value is assigned then i get the exception.
i.e
Object fortest = "";
String s = null;
for(int i=wdContext.nodeImg().size()-1;i>=0;i--)
{
IImgElement NodeElement = wdContext.nodeImg().getImgElementAt(i);
fortest = NodeElement.getAttributeValue("ImgUrl");
s = fortest.toString();
wdThis.wdGetEvaluationDimensionCompController().wdGetAPI().getComponent().getMessageManager().reportSuccess(""+s);
}
Could you look into it??
Thanks & Best Regards, Prabhu
delete default table cell editor under table column and use image as table cell editor.
you have to place images under src/mimes/components/com.app.package folder.
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
You can save your image inside your project only and you can set this to the UI context.
plz save the project under following mention ladder:-
Project-Folder>Src-folder>Mimes>Components>YourComponentname, inside that you can save.
Think that may help you.
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.