How to Set icon/image programatically in ADF before page loads
This is my UI:
Depends on the condition i want to set icon/image programatically in my java code.Before page load im calling this method.
So i couldnt take binding value also,it throws null pointer exception.Then i tried setting icon/image programatically.
<af:commandImageLink text="settings" icon="#{bean.iconsettings}" binding="#{bean.bind}"> </af:commandImageLink>
My bean:
private RichIcon iconsettings;(its getters and setters)
private void method(){ // method
if(cond){
this.iconsettings="/images/20.jpg"; //trying to set icon in a string.but it throws me error that cannot set RichIcon to string.
else
this.iconsettings="/images/19.jpg";
Could any one tell me how can i set icon/image in java code.Before page loads im performing all above said tasks.Please help.
Well, you set the icon property to a bean method, which you have done. The bean method however need to have the signature
public String getIconsetting()
// your code returning hte path to the icon
if(cond){
return ="/images/20.jpg"; //trying to set icon in a string.but it throws me error that cannot set RichIcon to string.
else {
return ="/images/19.jpg";
The bindproperty is not needed, remove it and remove the RichIcon Iconsettings too´as it's not needed to and is the wrong type anyway.
Timo
Similar Messages
-
How to set an image as a background in pages '09
I'm trying to set an image as a background in pages... PLEASE HELP!!
Hi Jerry,
All the arrange and wrap options are greyed out for me (trying to help my daughter with a Monster background and failing miserably), do you have any suggestions for where I may be going wrong?
Thanks
Derek -
How to set icon image in jstudio for my application
Dear friends,
I developed one application in jstudio.And need to set an special icon for my application.While i download my application in to mobile. The icon should be displayed in the mobile.To show my application as unique from other applications.But i dont know how to set an icon for my application. If any one find answer please reply as soon as possible.
Thank youJava Studio Enterprise per se does not support creating applications for mobile devices. I gues you used NetBeans Mobility Pack for that. Therefore, please refer to http://mobility.netbeans.org/ for more information. Thanks.
Here is a FAQ entry, which, as far as I understand answers your question: http://www.netbeans.org/kb/faqs/j2me-mobility.html#FaqJ2MESpecifyMidletIcon -
How to set icon on MenuItem, but not in JMenuItem?
saleemtol003 wrote:
You are right.It's not possible to set icon on menuItem.
I am talking about SystemTray in which I added PopupMenu with MenuItem.
but I need MenuItem with icon.Is there another way to solve this problem?Nope, just because you're adding a PopupMenu to a TrayIcon does not change the fact that MenuItems cannot have icons. -
How to set a image as a background in a frame
How to set a image as a background in a frame
The following code works well in Notepad command prompt but it is not working on netbeans
I want to set a background image in a frame(awt or swings ny will do) or a panel through netbeans
1. import java.awt.*;
2. import java.awt.event.*;
3.
4. public class ImageFrame extends Frame
5. {
6. private ImageCanvas c;
7. private Image i;
8. ImageFrame( Image i )
9. {
10. this.i = i;
11. c = new ImageCanvas( i );
12. add( c );
13. }
14.
15. public static void main( String[] args )
16. {
17. Toolkit tk = Toolkit.getDefaultToolkit();
18.
20. Image im = tk.getImage( "WashuChan.gif" );
21. ImageFrame f = new ImageFrame( im );
22. f.addWindowListener( new WindowAdapter()
23. {
24. public void windowClosing( WindowEvent e )
25. {
26. System.exit( 0 );
27. }
28. } );
29. f.setSize( 300, 300 );
30. f.show();
31. }
32.
33. private class ImageCanvas extends Canvas
34. {
35. Image i;
36.
37. public ImageCanvas( Image i )
38. {
39. this.i = i;
40. }
41.
42. public void paint( Graphics g )
43. {
44. g.drawImage( i, 0, 0, this );
45. }
46.
47. public Dimension getPreferredSize()
48. {
49. int w = i.getWidth( this );
50. int h = i.getHeight( this );
51. return new Dimension( w, h );
52. }
53. }
54. } -
Flex 4 Mdi canvass, how to set background image..?
Hi.,
Now i try to use mdi canvass background image,how to set background image in mdi canvass in flex 4..
With Regards
LinFlex-In the past flex 3 version, there is an attribute call <flexlib:MDICanvas backgroundImage="@Embed(source='/imgFolder/imgFile.png')/>
to set it. However it has problem in Flex 4 because of 'halo' and 'spark' theme library changed.
The following is my post that still haven't found the answer.
Dear all,
We have a project that doing migration from flex 3 to flex 4. We use flexlib the latest version of
flexlib - 2.5 - flex4.zip.
However we confronted problems that several of attributes that flex 4 doesn't support:
Constraints are listed as follows:
1) <flexlib:MDICanvas backgroundImage="@Embed(source='/imgFolder/imgFile.png')/>
2) <flexlib:MDICanvas backgroundSize="auto"/>
3) <mx:ApplicationControlBar barColor="#000000">
original error message:
====================================================
Description Resource Path Location Type
The style 'backgroundImage' is only supported by type 'flexlib.mdi.containers.MDICanvas' with the theme(s) 'halo'. MainView.mxml /osss/flex_src/hk/gov/labour/osss/view line 242 Flex Problem
Description Resource Path Location Type
The style 'backgroundSize' is only supported by type 'flexlib.mdi.containers.MDICanvas' with the theme(s) 'halo'. MainView.mxml /osss/flex_src/hk/gov/labour/osss/view line 242 Flex Problem
Description Resource Path Location Type
The style 'barColor' is only supported by type 'mx.containers.ApplicationControlBar' with the theme(s) 'halo'. MainView.mxml /osss/flex_src/hk/gov/labour/osss/view line 227 Flex Problem
Regards,
Man Pak Hong, Dave
manpakhong
[email protected] -
6300 How to set ringtones/images/photos
Please tell me how to set ringtones/images/photos to individual contacts/numbers. If you have more than one number for a contact can you set up each one separately. ie home/mobile/office etc.
Thanks
Solved!
Go to Solution.to perform all the mentioned operations(expect assigning different tones to different numbers of the same contact,which isn't possible,as already indicated in the previous post)you need to move the contact to the phone memory. now what you can do is copy all the contacts to the phone memory as well.then after that you can set all the options for the your contacts.
but, after copying the contacts to phone memory,the contact list will have two entries to the same contact(of both the memories).If you don't want them in that manner then you can configure the current memory in Contacts->Settings and set that option as 'Phone'.But this will now be the default memory for your new contact,so be careful!! Still any doubts??
Was this post of some help? Click 'Kudos' star on the right hand side of this post. Your gesture will be highly appreciated! -
i just want to know that how to set an image on JFrame.
thanks in advancedear moazzam
why are you coming here in the forms when you have very brillient java certified teacher
who knows every thing:)
just mail him and ask this questain from him.
im sure you will be given a good replay
take care ! -
How to add javafx image project in my jsp page ?
how to add javafx image project in my jsp page ?
Create your JavaFX application as an Applet... then embed the applet object inside your html. I'm sure if you create a javafx netbeans project and hit build... you get a html file that shows you how to load the built binary output into the page.
-
How to set background image in jlist
Hi all
is there a way for setting an image as jlist 's background?
I need that this image is trasparent.
Any idea or usefull link?
RegardsSwing related questions should be posted in the Swing forum, but there is no need to repost since all the information is available to you in the forum or the API.
First, read the JList API and follow the link to the Swing tutorial on "How to Use Lists". It will show you how to create a custom renderer. You will need by make your renderer non-opaque to see the background image.
Next you can search the Swing forum for examples of how to add an image as a background image. Most of the examples are for a JPanel, but the concept is the same. -
How to set background image in Dynamic Shell Layout
Experts,
Using dynamic shell layout, how can we create a skin like this http://www.2shared.com/photo/OqXfb5jq/layoutissue.html
Issues :
1)Need to set the background to the page - How to set it in dynamic shell layout.
2)Panel box color to be changed
please advice
thnks
jdev 11.1.2.1Color goes UNDER the background image. Just set it.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"StarPilot06" <[email protected]> wrote in
message
news:eqqve6$341$[email protected]..
>I am trying somethign that seems tricky to me...
>
> The image I am using I faded to a solid color on the
bottom half. I set
> the
> background image to to left and NO REPEAT but when the
cell grows with
> content
> and it stretched beyond the image it goes blank
underneath. How do I set
> a
> background color without going over the background
image?
>
> I need them both to be background because I want to use
text over both.
>
> Any ideaS?
> -
How do set up image based navigation bar in DW CC?
How do you set up images as the list members that form a navigation bar?
Spry is gone, true, but CSS most definitely is part of DWCC...
http://tv.adobe.com/watch/learn-dreamweaver-cc/using-the-css-designer-panel/
You should be able to follow a css tutorial after familiarizing yourself with the CSS Designer.
If you don't understand html and css in and of themselves, and you have a budget, you may want to get the Menu Magic DW Extension from Project VII. That would allow you to use the DW Design View interface to make a menu.
If you have a fair understanding of the basics though, any "jquery menu" or "pure css menu" available freely on the web would do the trick. The vast majority of them come with a quick how to that includes mostly copy/paste instructions. -
How to set ASDM image on ASA remain factory-default
Hi, Cisco Support Community
I want to configure an ASA to facotry-default using the following commands.
# configure factory-default
# wr mem
But when I use above commands, ASDM is to be unset !
How can I set ASDM remain factory-default ? I don't want to include " #asdm image disk0:/~~.bin" command in configuration because it is not factory-default configuration.
I don't know why I can do that on ASDM.
First , Upgrade ASA&ASDM on ASDM.
Second Operae factory-default and reboot on ASDM.
Then ASA is to be factory-default and set ASDM image.
I want to do that with CLI.
Thanks in advance.Thank you for reply.
Of course I put ASDM image on ASA.
You know we can launch ASDM on truly factory-default ASA.
I mean how I can reset ASA to that condition using CLI.
a problem is below.
1. put ASDM image on asa flash
2. (configure)#asdm image disk0:~~
3.#show asdm image
>> the image is set
4 (config)#configure factory-default
5.#show asdm image
>> unset
How can I truly reset to factory-default ? -
How to set icon for .lnk on PPC
I'm using the Mysaifu JVM and I would like to know how to set an icon of my choice for the shortcut file to my application (.lnk). Currently, the Mysaifu character shows up as the icon.
On a previous post, I found out how to run my java application using the following text in my .lnk file:
255#"\Program Files\Mysaifu JVM\jre\bin\jvm.exe" -Xhidevmwindow -Xmx5M -jar "\My Documents\DeliveryOrganizer.jar" DeliveryOrganizer
Please help!!!
Your help would be much appreciated!
Thanks!I don't think you're going to have much luck modifying the original link, since the jvm.exe is what the link is pointing to. Windows Mobile is getting its icon from the jvm.exe, and not the DeliveryOrganizer jar file.
However, you might look into creating a separate .lnk file, that then calls your original .lnk file that executes the jvm.exe. See if Windows Mobile allows you to modify the new .lnk file's properties... -
How to set an image in place of Cursor ?
How can I set an image in place of the common arrow in my application ?
Has it sth to do with Toolkit.createCustomCursor ?
Where is the right place to invoke this method ?
Then I suppose parent.setCursor must follow ?
Do you know the procedure ?
thanx.setCursor(new Cursor(Cursor.HAND_CURSOR));
Maybe you are looking for
-
How can I transfer music from my iPod Touch to my computer?
I have a second generation 8gb iTouch. I recently got a new iPod Classic. The iTouch has about 700 songs and has been synched to multiple computers (whose libraries have since been lost). How do I transfer all of those songs in order to make them ac
-
ICloud Photos shows different counts in different devices
Hi, I am using iCloud Photos on the following devices: 1. iPhone 5 2. iPad 3. Apple TV 4. PC The issue is I see 1 and 2 aboveshows a count of 587 while 3 and 4 shows a count of 283 onlly. How are these counts being calculated and is it normal to be
-
Firefox is not rendering/displaying websites correctly.
Started today, never had problems with any site I visited until now. Every webpage I vist will not load/render/display correctly. I have not done anything to firefox in ages and have had no problem like this before.
-
How to forward Leave to his 2nd immediate manager
We are on 11.5.10, we have define Leave rule in AME on the bases of manager approval, Right now it goes to immediate manger for approval and working fine but my client face some issued in case of manger on leave so in that case leave remain pending t
-
Hi Adobe team, Can you tell me how to get this working on Adobe Reader XI? I do not know how to explain this. There is a good spacing between the commented lines which makes is easy to read. I am not able to get that now. What i get when commenting i