Color of HTMLB Button
Hello,
i want to change the color of a disabeld HTMLB Button.
Changing the color of a active buttton is no problem with setting the CSS in an include file:
.urBtnSml { color: #FFFAF0;
background-color: #FFFAF0;
border-color: #FFFAF0 #FFFAF0 #FFFAF0 #FFFAF0; }
But using the same way for a disabled button
.urBtnSmlDsbl { color: #FFFAF0;
border-color: #FFFAF0 #FFFAF0 #FFFAF0 #FFFAF0;
background-color: #FFFAF0;
it doesn't work. What's the problem??
Thanks a lot,
Andi
that means that you are changing the color of a wrong button. i did change the color for both the disabled and active buttons. may be you are changing the wrong values in that element or the eleemnt itself is not the one you are looking for.
Similar Messages
-
Hi
I am developing an Iview that shows buttons corresponding to files in a km directory.
when button pressed it will open the file.
the button text is as the resource name .
I would like to change the button background .
I would also like to change the gridLayout background color.
Can any of u write me how do I do this.
Thanks
NitsanLook at the below code..
<htmlb:button id = "b_excel"
text = "<span style='background-color: #FF6600;font:normal 10pt Arial;'> Download to Excel </span>"
encode = "false"
disabled = "false"
onClick = "onInputProcessing(b_excel)" />
Raja T -
How to apply background color to link button in Flex 2
I need to apply background color to link button as the Rollover color has on its over event.How is this possible in Flex 2 ?I am using the above in Xcelsius as custom component so if I apply graphics and draw rect method it does not have any effect.Please help.
These might help:
http://jdevadf.oracle.com/adf-richclient-demo/components/skinningKeys/column.jspx
http://jdevadf.oracle.com/adf-richclient-demo/components/skinningKeys/table.jspx -
How do I change the color of a button in swing?
I'm using swing to create an interface and it's made up mainly of buttons. Gray isn't exactly the prettiest of colors and I'd love if I could change the color.
Cheers,
elmickoHi!
You can set the color of each button independently using:
JButton1.setBackground(Color.BLUE); // for the background
JButton1.setForeground(Color.CYAN); // for the text displayedOr if you want all the button to have the same color you can overwrite the look and feel of the application using:
javax.swing.UIManager.put("Button.background", new Color(230, 230, 230)); -
Can I launch a new JSP on a popup window, when cliking a HTMLB button ?
Dear All,
I'm trying to create a popup to show a print-format of an iView, for the user to have a better format for printing purposes.
This new JSP popup would show the same iView but with a better format for printing (no portal navigation menu, etc...)
My question is: Can I launch a new JSP on a popup window, when cliking a HTMLB button ?
Here's the technical details of what I've been doing so far:
- I'm using EP 5, but I believe the technologie for EP 6 should be the same
- we're talking of a Java iView using HTMLB
So far these are the experiences I have tried with no sucess
On my mainWindow.jsp I have this piece of code, but it doesn't work:
(etc...)
<%
ResourceBundle res = componentRequest.getResourceBundle();
IResource rs = componentRequest.getResource(IResource.JSP, "printFormat.jsp");
String JSP_URL = rs.getResourceInformation().getURL(componentRequest);
%>
(etc...)
<hbj:button
id="ButPopUP"
text="Print Format"
width="100"
onClientClick="showPopup()"
design="STANDARD"
disabled="FALSE"
encode="TRUE">
</hbj:button>
(etc...)
<script language="Javascript">
function showPopup(){
mywindow = window.open ("<%=JSP_URL %>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1,
resizable=1, width=600,height=400");
htmlbevent.cancelSubmit=true;
</script>
(etc...)
Thank you very kindly for your help.Hi Kiran,
sorry for the late reply.
Thank you so much for your JAR file.
Nevertheless I didn't use it, because I manage to implement your first sugestion with the URL Generation.
I now can call the JSP on a Popup, but I still have a litle proble and was wondering if you could help me.
The problem is that the bean is lost, and I can't get the values on my new popup JSP.
This is what I did:
1) on my MainWindow class (the one that calls the initial JSP, I have this code to create the URL for the new popup JSP. This is the code:
IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
IPortalUrlGenerator portalGen = null;
ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
if (specUrlGen instanceof IPortalUrlGenerator) {
portalGen = (IPortalUrlGenerator) specUrlGen;
try {
String url = null;
url = portalGen.generatePortalComponentUrl(request, "Forum_IS.popvalues");
myBeanDados.setPopupURL(url);
} catch (NullPointerException e) {
log.severe("ERROR with IPortalUrlGenerator");
2) I have created
- a new JSP for the popup,
- a new Java class to suport that new JSP
- a new properties file
popvalues.properties with the following code:
ClassName=MyPop
ServicesReference=htmlb, usermanagement, knowledgemanagement, landscape, urlgenerator
tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
MyPop is the new class that is associated with the new JSP popup.
The problem now is that the bean was lost.
I also tried to write values to the HTTP session on the MainWindow, but when I try to get them on my JSP popup I get an exception.
How can I pass the values (or beans) to my new popup JSP ?
Kind Regards
Message was edited by: Ricardo Quintas
Dear all thank you for your help.
I have managed to solve the problem I had.
Here's the problem + solution sumary.
I have to remind you that we are talking of EP 5, PDK 5 (Eclipse version 2.1.0), with JAVA JDK 1.3.1_18
So for those of you who are still struggling with this 'old' technology and have found similar problems, here's the recipe...
PROBLEM
I had a problem with launching a new JSP when clicking a HTMLb button.
I wanted to create a JSP to present a 'print-format' of an iView.
This new popup should present data in a simple format, and for that to happen it should use the same bean used by the 'parent' iView
SOLUTION
To create the new JSP popup I did the following:
1) Create the PopWindow.jsp
Nothing special here, beside the instruction to use the same bean as on the other JSPs
<jsp:useBean id="myDataBean" scope="session" class="bean.DataBean" />
2) Create the associated JAVA class
MyPop.java. This class will be used to call the PopWindow.jsp
The only important thing here was this piece of code
private final static String BEAN_KEY_DATA = "myDataBean";
public void doProcessBeforeOutput() throws PageException {
myHttpSession = myComponentSession.getHttpSession();
myDataBean = (DataBean) myHttpSession.getAttribute(BEAN_KEY_DATA);
myComponentSession.putValue(BEAN_KEY_DATA, myDataBean);
this.setJspName("PopWindow.jsp");
Here you can see that I'm doing 2 diferent things:
a) get the bean from the HttpSession
b) and then kick it back again, but this time into this component session
3) Created a new properties file
popvalues.properties. This file contains the follwing code:
ClassName=MyPop
tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
Contrary to some opinions on this discussion,
you can't call a component in EP 5 by using ComponentName.JSPname.
Or at least that didn't work for me.
You nee to use an aproach like this one ComponentName.NewProperiesFileName
4) On my main class MainClass.java (for the parent iView) I haded the following code on the event doInitialization:
IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
IPortalUrlGenerator portalGen = null;
ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
if (specUrlGen instanceof IPortalUrlGenerator) {
portalGen = (IPortalUrlGenerator) specUrlGen;
try {
String url = null;
url = portalGen.generatePortalComponentUrl(request, "MyMainApplication.popvalues");
myDataBean.setPopupURL(url);
} catch (NullPointerException e) {
etc...
The idea here was to build dinamicaly a URL to call the popup.
To construct that URL I had to use
ISpecializedUrlGenerator that would point to my main application, but this time with the new properties file discussed already on item 3) This URL is stored inside the bean, and will be used afterwards with the javascript - see item 6 b)
I had this on the import section
import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
5) Then I had to solve the problem of how to pass the bean from the parent iView to the popup.
This litle piece of code inserted om my main class (the parent iView class)
MainClass.java solved the problem:
import javax.servlet.http.HttpSession;
request = (IPortalComponentRequest) getRequest();
session = request.getComponentSession();
session.putValue(BEAN_KEY_DATA, myDataBean);
myHttpSession = session.getHttpSession();
myHttpSession.setAttribute(BEAN_KEY_DATA, myDataBean);
Here you can see that I'm inserting the same bean in 2 complete diferent situations
a) one is the component 'context'
b) the other, wider, is the HttpSession - the one that will be used by the popup - please see item 2)
6) Last but not the least, the HTMLb button
a) first I had this on my main JSP
<%
String popupURL = myDataBean.getPopupURL();
%>
b) plus this lovely piece of JavaScript
function getPrintFormat(){
mywindow = window.open ("<%=popupURL%>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1, resizable=1, width=600,height=400");
htmlbevent.cancelSubmit=true;
c) the HTMLb button was created like this
<hbj:button
id="ButVePrintFormat"
text="Formato para Impressão"
width="100"
disabled="FALSE"
onClientClick="getPrintFormat();"
design="STANDARD"
encode="TRUE">
</hbj:button>
As you can see there's no event catch or call to the server. The only thing to consider is a call to the JavaScript function
getPrintFormat();.
Está todo lá dentro.
That's all there is to it. -
How to change color of a button for specific time interval in jsp
How to change color of a button for specific time interval in jsp.
Please help.
Thanks in advance.This was driving me crazy, too--and the previous answers did not seem to work. I eventually found that if I click one of the data symbols in the graph in exactly the right spot (see below), it selects only the data symbols and not the line. I can tell this because the little selection dots will be around each data symbol, but no selection dots will be on the line between the data symbols - like the graphic in Yvan's answer. Then and only then will the color symbol in the tool bar show the color of the data symbol, instead of the color of the line. I believe that you then have to first click on the color swatch in the toolbar and then select your color (or choose Show Colors and select from the color tool). Just clicking a color in the crayon box, for example, did not seem to work unless I first clicked on the color swatch in the toolbar, then clicked Show Colors on that dropdown, and +only then+ clicked the crayon or whatever.
_The right spot to click_ seems to be just above the exact center of the data symbol, at least for the diamond shape symbol that I prefer. Sometimes it takes several tries to hit the right spot. If I miss it, the whole line is selected, which is indicated by the little selection dots on the line, between the data symbols. When I click the right spot, those selection dots go away, leaving only the data symbols selected. Then I can change the color, as described above.
I hope this works for you too. -
HTMLB- Button Event CASE Dyn Nav problem
Hi,
I am prototyping a solution in BSP which has a page with two buttons at the bottom, a BACK button and a SUBMIT button which both send the User to different pages, and I can't make the re-directs work.
I am trying to stick to HTMLB and not get lazy and use HTML.
I have a page call it page1.htm, at the bottom there is a submit button and back button with htmlb code as follows:
<htmlb:button text = "Back"
onClick = "event_1" />
<htmlb:button text = "Submit Request"
onClick = "event_2" />
in the EVENT HANDLER for the OnInputProcessing Event I have the following CASE statement:
CASE event_id.
WHEN 'event_1':.
navigation->goto_page( 'default.htm' ).
WHEN 'event_2':.
navigation->goto_page( 'submitresult.htm' ).
ENDCASE.
the idea is that when the BACK button is pressed the OnInputProcessing event handler will pick this up and using the value of the EVENT_ID which can be either event_1 or event_2 the CASE statement will re-direct the User to the correct page.
Problem -> it doesn't work.
Does anyone have any ideas where I am going wrong.
Thanks for your time,
Milan.Hallo Milan, (interesting name, English?)
Somehow we are just overlooking something. I quickly built a very small cut-and-paste example.
Create a new BSP application, and add into it three pages called page1.htm, page2.htm and page3.htm. The source is below. (Note all three has the same event handler:).
<b><u>onInputProcessing for all three pages</u></b>
DATA: event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event_ex( request ).
IF event IS NOT INITIAL AND event->event_name = 'button'.
navigation->goto_page( event->event_server_name ).
ENDIF.
<b><u>page1.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page>
<htmlb:form>
<htmlb:button text = "Page 2"
design = "NEXT"
onClick = "page2.htm" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b><u>page2.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page>
<htmlb:form>
<htmlb:button text = "Page 1"
design = "PREVIOUS"
onClick = "page1.htm" />
<htmlb:button text = "Page 3"
design = "NEXT"
onClick = "page3.htm" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b><u>page3.htm</u></b>
<%@page language="abap" otrTrim="true"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page>
<htmlb:form>
<htmlb:button text = "Page 2"
design = "PREVIOUS"
onClick = "page2.htm" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
I highly recommend to run this in design2003. You will love that PREVIOUS/NEXT design on the buttons. If this example is not working for you, there are a few other things to be checked. But first try this.
++bcm -
Change color on a button to show that it has been selected.
Here's what I would like to do:
1) Button with the instance name of "mc" and the color
#666666
2) MOUSE_OVER color is #CC0033
3) MOUSE_OUT color is #666666 —IF the button has NOT
been clicked.
4) CLICK color is #333333
5) New MOUSE_OUT color is #333333—If the button HAS
been clicked.
6) MOUSE_OVER stays the same.
Here's the problem...
1) How do I make a new MOUSE_OUT color of #333333 (the same
as the CLICK color)—If the button HAS been clicked?
2) How do I maintain the MOUSE_OVER color?
I'm starting to pull out my hair! I appreciate any
help!!!!!!!!!! Do I need if's or else's.
Text
newYou need if's and else's and a variable to judge in that
if... in the MOUSE_OUT handler . The variable should indicate if
the button has been clicked or not and should be set in the CLICK
handler.
var clicked:Boolean = false;
function mcClick(event:MouseEvent):void{
etc...
clicked = true;
function mcMouseOut(event:MouseEvent):void{
var newColorTransform:ColorTransform =
mc.transform.colorTransform;
if(clicked){
newColorTransform.color = 0x333333;
} else {
newColorTransform.color = 0x666666;
mc.transform.colorTransform = newColorTransform;
gotoAndPlay("img1");
} -
Change the background color in a button
I want to change the background color in a button that have a text(It not have an icon).
DO you know how to do it?Hi suasna
i have a solution for your ask actually i did when i wanted to change the bgcolor of a button ....but i this case u need to use Icon editor to create the icon with the color u want and add to it the text u want to apply ...then set the inconic ptoperty of the button to YES and set the Icon name that u have created with the software ..
hope this helps u
thanks -
Changing color of arrow button in JComboBox
Hi all,
Can somebody please help me to change the color of arrow button in JComboBoxThe default color uses to draw the arrow is UIManager.getColor("controlShadow"), so if you put a different color there, that would be used for the arrow buttons. Of course, that color is likely used other places as well, and so any other place where it is used would get your changed color too. For example, the scrollbar buttons for the scrollbar in the popup list would likely use that color.
Further, the current look and feel can override this; for example, the Metal L&F creates its own button, which uses its own icon which ends up using a hard-coded color of black when painting the arrow.
: jay -
Htmlb:button onClick event
Hi experts I'm using follwoing code for htmlb :button
<htmlb:button id = "myButton2"
text = "<%= v_save %>"
tooltip = "<%= v_save %>"
onClick = "approveClick"
design = "emphasized"
/>
and in
do_handle_event I'm using followin code
DATA : button_event TYPE REF TO cl_htmlb_event_button,
event1 TYPE REF TO cl_htmlb_event.
event1 = cl_htmlb_manager=>get_event( runtime->server->request ).
CASE event1->server_event.
WHEN 'approveClick'.
button_event ?= event1 .
< some code >
ENDCASE.
when i clicked the button it is not going into do_handle_event
I'm unable to capture onclick event of button .I tried it by keeping some break points .But couldn't be ableto capture it
Here I'm using MVC pattern .When one check box clicked in view of another controller the page which contains this button will be displayed.Do i need to write any additional code for itThere are 2 kind of break-points.
1. Session break-points - This will wok only to debug normal ABAP codes.
2. External break-points - This will help you to debug BSP/Webdynpro application.
Set the external-break point to figure out whether its triggering the events or not.
<b>
To set the external Break-points:</b>
Before settings the external-break-point, you need to Active External break-point for HTTP. YOu can find this option in
SE80, in
Utilites--> Break-point/External break-point or Utilites--> External break-point --> Set External break-point
or if you dont find, then
utilities-->setttings -> ABAP Workbench -> look at the debugger tab
& find the external Debugging check box or External Debugging user ID. Give SAP User ID
Also have a look at this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/17/00ab3b72d5df3be10000000a11402f/frameset.htm
<i>* Reward each useful answer</i>
Raja T
Message was edited by:
Raja Thangamani -
HTMLB + htmlb:button
Hello Friends,
I have a problem in using HTMLB, button in view of BSP page. Actually the problem is that I want to call the main contrller when user click on the button. But as in view there is not Event Handler, so while "onClick="event_1"/>, how I can handle this event!
here is a bit of code segment!
<htmlb:button width="10" onClick="event_1"/>
Does it work ?? like this if I call controller direct ??
<htmlb:button width="10" onClick="main.do"/>
With Regards,
Haider Syed.So, after making a small mistake in my last post (corrected now), I will try to bring some light into this situation:
First, summarize all the options you have:
Each form has a "target" (<b><form action="target_controller.do"></b>) which the browser will submit the form data to.
Note that this is different from the actual target-attribute (<b><form target="_blank"></b>), which is used to specify the location where the server-response will be displayed - you can let it be shown in a new window here.
Then, for form elements, you have the option to set client-side javascripts, using the <b>onClientClick</b> attribute. It's best if you just call a javascript function here, and define this function somewhere else in your code (javascript-file-include for example).
<htmlb:button ...
onClientClick="yourFunction();" />
You can access your HTML elements (also form elements) using javascript, so changing the target or action parameter from within your function is possible!
To finish this post, there is the server-side event, specified by the <b>onClick</b> attribute, which is usually checked for in DO_HANDLE_EVENT (in case of MVC) or in OnInputProcessing (for non-MVC BSP pages, like Craig mentioned). But remember, this is server-side event!
So, with this info, you should be able to specify in more detail what you call "for each button a new event" - whether you mean server-side or client-side event ... maybe thinking about this alone will almost solve your problem.
Regards,
Max -
No property to make htmlb:button invisible or visible??
I am working on a jspdynpage proj where I need to make htmlb:button visible/invisible at runtime.. is there any property?
Hi Kiran,
You can use Java Script to make this happen. To make invisble or to disable use the following
<input style="visibility:hidden;" type="button" value="Hello world!" disabled> . You can get the attributes of the button in varible, then start modifying the attribute at run time.
Thanks
Sathish -
Dynamically call htmlb button event
Hi
Does anybody know how to dynamically call the onClick event of an htmlb button?
for regular html, you use <buttonID>.fireEvent("onClick")
thanks in advance
Anton KruseHi,
Use both onClientClick to call the client event an use onClick to execute the server event.onClientClick is executed with first priority and then the onClink event is fired in the server.
e.g :
<hbj:button
id="Send_Button"
text="Send"
tooltip="Sends my name"
jsObjectNeeded="true" onClientClick="validate();"
onClick="onSendButtonClicked"
width="100"
design="EMPHASIZED">
First the validate javascript method executes then the onClick "onSendButtonClicked()" method in the controller executes.
If helps reward with points.
Regards
Ritu
Thanks -
The red colored "record ready" button has disappeared from my track header area.
The other four buttons are showing fine, (input (i), hide (h), mute (m) and solo (s).
Can anyone help me with this?
Thanks
JohnnyAhrenshof: Thank you for your suggestion:
((preferences>audio>devices (re-select your input source) ))
I already had that done IE. I had duet already chosen as input and output etc etc.
The problem seemed to be the issue that was addressed by Eriksimon:
(( ctrl-click the track Header.))
Following that advice gave me a drop down menu which allowed the various buttons to be
checked and unchecked.
Thanks so much for taking the time out to
help with my problem. It seems to me that
this formum is far better equipped to handle
user's problems than any or the options that
are available on the acual Logic help menu.
It appears that Logic has been put
together by techies who, (though they
may be brilliant at computer software issues), then have
virtually no skill or imagination with regards explaining
how to use it, to the actual users.
I have a PhD in Egyptology. I mention this not
because I think it a particularly brilliant acheivement
but just to indicate that I am not a total dummy.
More to the point I find using Logic needlessly tiresome
and the explanations that are given in the "Help" menu
are nothing short of tragic. Perhaps Apple could start to give
out free ropes or razor blades to everyone who buys the program.
Not to say it is not much better that the other junk out there, it is,
the sorry fact is that that is not saying much at all.
I send sincere thanks to all the users out there who support
each other through this forum. johnnyloonybin
Maybe you are looking for
-
== Issue == Firefox is crashing or closing unexpectedly == Description == At least once, if not more, Firefox version 3.6.6 crashes no matter what web site I am on. == Crash ID(s) == <code> Report ID Date Submitted bp-46f46477-ef0b-48d6-81b4-479f9210
-
How to get attribute value of a node
Hi experts I have a mapped node in my view context from component controller context. This node consists of 2 value attributes inside Example: NODE1 - > Cardinality 1..1, seleciton 1..1 -- x_date - > type DATS -- x_years
-
Can I retrieve photos burned onto DVD (I used iDVD)?
I lost my hard drive last week and am in the process of rebuilding my photo gallery. In Decemeber, I burned a DVD with all of my desired photos from 2012 using iDVD. In addition to the videos and slideshows that I included in the main menu, I made su
-
Hi, I am facing a problem in executing the query of my extended VO. I have extended a VO and modified the query in the extended VO to fetch one more columns from the database. Now I am trying to execute the query of my extended VO. But I do not get a
-
The "Java Virtual Machine Launcher" produces the following message: Error loading: D:\TEMP\sfx8.tmp\jre142_04\bin\jrockit\jvm.dll Any ideas what goes wrong?