How set margin/padding top to combobox selected value
Hi,
Again I am facing new problem with combobox component, i need to set margin/padding top to combobox selected data using external AS file.
I have tried the code --> combo_box.setStyle("marginTop", 5); and also used similar styles but its not working.
Need your suggestions and help.
Thanks.
Hi,
i strongly urge you to read some book about CSS and forget using deprecated HTML tags like FONT.
Why am i saying that?
Well, you don't want to change a page template or a report definition every time the user complains about the size of a font or the space between lines, do you?
CSS is all about presenting the page the way you want, setting margins, spaces, fonts and so on.
You should focus on the content, the data, leaving the task of formatting to one or more CSS stylesheet linked in the HTML header.
I recommend reading some articles first, at least to have a general idea of mainstream techniques:
http://www.alistapart.com/articles/goingtoprint/
http://webdesign.about.com/cs/css/a/aa042103a.htm
Or you can google around searching for "css formatting printer friendly" to get a bunch of pages.
Flavio
http://oraclequirks.blogspot.com
Similar Messages
-
E-studio 282 sets margins on top of the document
Hi there,
For 3 days now I am trying to pring a PDF document no whole a4 page. The problem is that the printer always sets margins on top of the document - moving it down by the value of margin.
That way the document wit a size of A4 starts printing about 0,5cm from tol with couses that it gets on the bottom (outside of a paper sheet).
I tried the same dacument on other printers and it prints out fine.
Another thing i tried was setting (in e-studio) the top and bottom margins while printing.
It just causes 'cutting' top/bottom fragment of document.
Also I tried to mess around with e-studio282 settings and the
"Print Properties>Finishing>Use custom margins..."
Doesnt allow me to set value lower than 0.5cm.
Is there any way to solve my issue?Hi StishMa
I doubt someone here would be able to provide a solution to your printing issue because in this forum you can find Toshiba enthusiasts who share the experience especially about the notebooks, consumer products like HDDs and multimedia (TV devices).
But I recommend you to check the user manual page 236 Setting the print options area:
http://www.eid.toshiba.com.au/customers/c_es281c/Manuals/pdf/Printing%20Guide.pdf -
Set PHTML ComboBox Selected Value in JavaScript?
I've created a combobox as follows:
<phtmlb:comboBox id = "sdm_cnis"
selection = "<%= L_CIP_DETAILS_WA-GBSCIND %>"
table = "<%= l_cnis %>"
readOnly = "<%= l_display_mode %>"
width = "50px"
nameOfKeyColumn = "VALUE"
nameOfValueColumn = "NAME"
onClientSelect = "javascript:sdm_toggle_required();return false;"
behavior = "DROPDOWNSELECT" />
Based on the selected value of another dropdown combobox, I want to use JavaScript to select the value of this comboBox. For example, if the user changes the first comboBox, I want to automatically select the first option in this combobox. I really do not want to use dropdownListBoxes because they are not used anywhere else in our application. I also do not want to make a round trip to the server in order to resolve this issue as our uses will complain too much about that.
Some other things I've learned/tried:
I know I can get the selected value as follows:
sapUrMapi_ComboBox_getSelectedKey('sdm_cnis');
I have also tried to do the following, which sort of sets the value, but when you pull the list it appears as though the old selected value is still selected:
window.document.getElementById('sdm_cnisKEY').value = cnis_key;
window.document.getElementById('sdm_cnis').value = cnis_value;
Any help is appreciated.
RickManaged to come up with a solution:
window.document.getElementById('sdm_cnisKEY').value = cnis_key;
window.document.getElementById('sdm_cnis').value = cnis_value;
var o=sapUrMapi_ComboBox_getObject("sdm_cnis");
o.txt.setAttribute("k",cnis_key);
o.txt.setAttribute("ks",cnis_key);
I'm not sure, but I would imagine that this solution is not supported by SAP and any patches or service pack upgrades could potentially break the code, so if you use it, be cautioned about this.
I have tested it on our server, and it works for my current scenario. That said, if there is a better way to do this in JavaScript, I'd love to hear it. For now, I'll leave the question open and assign full points if someone can come up with something that I feel is better than this (i.e. a JavaScript solution that is supported by SAP).
Rick -
How to create a Top 10 based on values from a database?
I have a database table that stores scores for events, like a rating system.
Users choose an event they want to score, enter their score/rating and insert this into the database table.
This gives me, in my table:
Event - Rating - User
Soccer - 5 - Joe Public
Soccer - 4.5 - Jane Public
Tennis - 3 - Joe Public
...and so on.
I would like to do two things. Firstly, I need to calculate the average for each event, which is easy enough, although I haven't quite got my head around the GROUP BY clause which, as I understand it, only allows me to use one database field?
Secondly, I would like to display, dynamically from the database, a list of top 10 events based on the results of the average ratings.
How easy is this to achieve? I'm using ASP/VBScript and MSSQL database.
Appreciate any advice offered. Thanks.
Regards
Nath.Hi. Here is what I've got, so far, to calculate the average:
SELECT AVG(mgscore) AS mgAVGscore, mgmovieID, mgmovie, mgmovierelease
FROM dbo.MGreviews
GROUP BY mgmovieID, mgmovie, mgmoviecert, mgmovierelease
How would I then run the RANK function? Here's the example you provided:
SELECT RANK() OVER (ORDER BY Age) AS [Rank by Age],
FirstName,
Age
FROM Person
I've tried this:
SELECT RANK () OVER ORDER BY AVG(mgscore) AS mgAVGscore AS [Rank by Score], mgmovieID, mgmovie, mgmovierelease
FROM dbo.MGreviews
GROUP BY mgmovieID, mgmovie, mgmoviecert, mgmovierelease
...but this produces the following error:
Error in list of function arguments: 'AS' not recognized. Can you help? I'm not sure I'm quite understanding how the RANK function works.
Much appreciate.
Regards
Nath. -
How to make validation in Bean and select value from another table
I want to know how to select data from table in backing bean according to primary key i have
the problem is that
i have a table Employee_Salary contains Employee ids and their salary
Empoloyee_Salary table
Employee_ID Number
Employee_salary Number
And Another table Called Employees
Employees table
Employee_ID Number
IsManager Varchar2 its value is [*Yes or NO*]
and other columns that i don't care about this table
i have on a jsff page an <af:table> this table is editable this is the Empoloyee_Salary table
*i want to check before save or after insert if this employee is Manager [from Employees tabke(yes or no)] the salary*
cannot be less that 100
i want to know how to make this how to select the value from employees table according to the id i have in the employee_salary table how to make this and make this validation
i have to select IsManager from Employees Table to see if this manager or no
i want to know how to make this in a bean
i use jdeveloper 11g
and my project is ADF Fusion project
and the page that have the Emplpyee_Salary table is JSFF
thanks in advanceYou might want to write this code in a validator on the entity object if it should apply from every screen.
If you want to access view objects from a backing bean the basics are here: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcservices.htm#sthref918 -
How to change BPS multiplanning area variable selected value
Hi!
I have a variable, Drop down list, filld with an exit. Now the variable is filld with values and the value selected last time is marked as selected when application is started. I need to start with the variable unselected or take control over whitch value to have as selected.
Any sugestions how to do that?
Edited by: Jan Kihlström on May 29, 2008 8:38 AM
Edited by: Jan Kihlström on Jun 10, 2008 9:52 AMHi,
whenever we execute layout second time, it will always show the last saved variable value.
what can you do in this case, clear the output of the variable exit at the start in the exit itself. -
Binding textbox to combobox selected value when the selected value is blank
I have a simple form that binds data to a combobox and when one of the values in the combobox is selected it fills a textbox with the corresponding column in that table. However, if that combobox value is empty(meaning that table cell is empty) then
the textbox will not fill with the correct value. I am finding this hard to explain so I will lay it out.
The table[COA] is as follows:
ID
Fund
Fund Description
Bus Unit
Bus Unit Description
Obj
Obj Description
Sub
PEC
1
2789
Account Refund
10000
General Fund
1500
ASC Voucher
10
2
2789
Account Refund
10000
General Fund
1500
Voucher
The following is my code:
private void subComboBox_SelectedIndexChanged(object sender, EventArgs e)
pECTextBox.Clear();
using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
SqlCommand command = new SqlCommand("SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'");
command.Connection = connection;
connection.Open();
SqlDataReader read = command.ExecuteReader();
while (read.Read())
if (!read.IsDBNull(8))
pECTextBox.Text = (read["PEC"].ToString());
else
pECTextBox.Text = "";
obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
read.Close();
I fill my combobox with Sub values based on the Bus Unit and Obj. Since the Bus Unit and the Obj in both rows are the same the combobox is filled with 10 and "".
Here is where the problem occurs. When I select "10" in the combobox I want a textbox to fill with correct Obj Description field. So selecting "10" would give me 'ASC Voucher' in the textbox and selecting "" should
give me 'Voucher' in the textbox, but this is not the case. I can only get 'ASC Voucher' to fill the textbox. When I select "" it keeps the textbox at 'ASC Voucher'.
My guess us that is has something to do with the value being empty in that table cell because when I am selecting other values it works.
Any guess as to what I should do?Hi objectifyThat,
When Your subComboBox.Text is null, you should use "Sub is null" in your SQL like below.
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
pECTextBox.Clear();
using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
string cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'";
if (string.IsNullOrEmpty(subComboBox.Text))
cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] Is Null";
SqlCommand command = new SqlCommand(cmdstring);
command.Connection = connection;
connection.Open();
SqlDataReader read = command.ExecuteReader();
while (read.Read())
if (!read.IsDBNull(8))
pECTextBox.Text = (read["PEC"].ToString());
else
pECTextBox.Text = "";
obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
read.Close();
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to disable field based on the selected value
Hi everyone,
I have "employee" table,
it contains the following field,
emp_name
emp_designation
Category
YearsHere the "category" is the select list value which has the following values in select list,
Fresher
Experienced,
when the value :Fresher" is selected for "category" then the "Years" field should be disabled.
I tried the following dynamic action ,
Name:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:Fresher
Fire When Event Result Is:TRUE
selection type:P1_YEARBut it doesnt work.
can anyone give alternate solution?
Thank you.
Regards,
gurujothiName:Disable_year
sequence:20
Event:Change
Selection Type:Item
Item(s):Category
Condition:equal to
value:FresherTry return value instead of this display value(Fresher) of select list
Fire When Event Result Is:TRUE
selection type:P1_YEARIn your above dynamic action, where is the disable action? -
Problem while setting the selected value of h:selectOneMenu to bean
Hi all,
I am new to JSF. I am working on application where i have combo boxe on the page. I am setting some values to the combobox from database using <f:selectItems> tag and one value using <f:selectItem> tag. The value combobox value selected by user is set to the bean property which is String. I am able to display all the values in the combobox but when clicked on button (present at the end of form) i am getting following error-
ERROR HtmlRendererUtils:354 - Error finding Converter for
component with id interviewStageOneForm:acceptanceChannelList
I am setting the combobox selected value to the to the bean property which is String and the value selected in also String. Then which converter it is asking for. I am not able to find out what is the problem.
Your suggestions will be really appreciated.
Here is my code snippet:-
JSF:-
<h:selectOneMenu id="acceptanceChannelList"
value="#{interviewStageOneBean.index}">
<f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
<f:selectItems value="#{MasterDataBean.acceptanceChannelList}" /> <!-- The list coming from database-->
</h:selectOneMenu>Bean:-
public class InterviewStageOneBean {
private String index;
public String getIndex() {
return index;
public void setIndex(String index) {
this.index = index;
}Hi!
First I would try next:
Try to leave out
<f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
line. And check if it works after that. If it didn't repeat step but you leave in message selectItem and dump out database selectItem line.
Second:
I would check acceptanceChannelList creation and what type of objects you put while doing setValue and setLabel on UISelectItem
Probably selectItem value has been assigned an object of type the engine doesn't know how to convert from String to it. -
How to read the selected value of a dropdown list box
Hello,
I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
I dont know how to trap the selection made on dropdown list.
PLease guide me on how to trap the dropdown list field selection value.
Thanks in advance.
Thirumala.Hello,
Check what is done in standard for the fielf REGION which is inked to the country.
Otherwise, you can do the following :
- in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
- Put the new value in a global variable (GV).
- in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
Hope this will help you,
Regards,
Frederic -
I have a problem with comobox select. I have build a form with 3 comboboxes. I added to the form a button for clear all the controls values in the form. When I am in the find mode nad i want to clear the combobox selected value it does not clear the value. and this is only when I am in find mode.
I have also added the empty value to the combo datasource.
the code is something like this:
oCombo.Select(string.Empty, SAPbouiCOM.BoSearchKey.psk_ByValue);
string selectedValue = _cmbCausale.Selected.Value;
The problem is that when I am in find mode the selectedValue it is not string.Empty but it is the last selected value from the form.
does any one have any suggestion?HI,
Set the datasource value to clear the combobox, then it will work.
Regards
J. -
Unable to set margins or padding
Margins and Padding do not work for pictures, or Shapes, or anything that I can tell.
Can you help me understand how to configure Padding and margins?
Or do i need to fast create wiht Muse and export to Dreamweaver or Expression?Zak,
Thanks for your reply.
I am trying to create an landing (Home) page that has a single photo below the heading and above the footer and stays vertically centered as the browser size is changed.
My basic problem is really that I can find a place to set margins and padding, but the objects in Muse do not act like divs, and the margin and padding settings are unavailable.
S -
How do I remove top and bottom margins when printing using Adobe Acrobat XI Standard.
How do I remove top and bottom margins when printing using Adobe Acrobat XI Standard. (I selected 'Fit to scale' and there's a huge gap on the top and bottom).
Those margins are usually reported from the printer settings to Acrobat. Meansif you have, for example, an inkjet printer and that printer can not print seamlessly, then there will be a minimum margin.
Check your printer's page settings. -
I have a combobox populated with a two element vector. the first item is an int, the id of the value displayed by toString
while(rs.next()){
vec.addElement(new Item(rs.getInt("ID"), rs.getString("AgencyName")));
}By clicking on a table that displays previous agency transaction I would like to update the combobox i tried using cboAgencyName.setSelectedItem(pastDistRS.getInt("AgencyID"));but that sets the text of the combobox to the id. I would consider using setSelectedIndex but the combobox can be filtered so Index is not static.
Any Ideas?sorry for the lack of information. I will try to be more complete in my questions from now on. I have an editable combobox populated with a vector of items, each item contains two properties. The first is the id and the second is the string.
setSelectedItem does not work because it is trying to find 3 in the vector. 3 is not in the vector it is a property of one of the items in the vector.
How can I use the "id" property of the item to set the currently selected value of the combo box. The "description" property is dynamically set in my implementation of your example so using setSelectedItem( new Item(3, "train") );[\code] does not work for me or I am not using it to its full potential.import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.plaf.basic.*;
public class ComboBoxItem extends JFrame implements ActionListener
public ComboBoxItem()
Vector model = new Vector();
model.addElement( new Item(1, "car" ) );
model.addElement( new Item(2, "plane" ) );
model.addElement( new Item(3, "train" ) );
model.addElement( new Item(4, "boat" ) );
JComboBox comboBox;
// Easiest approach is to just override toString() method
// of the Item class
comboBox = new JComboBox( model );
comboBox.addActionListener( this );
comboBox.setEditable(true);
getContentPane().add(comboBox, BorderLayout.NORTH );
getContentPane().add(comboBox, BorderLayout.SOUTH );
comboBox.setSelectedItem( new Item(3, "train"));
public void actionPerformed(ActionEvent e)
JComboBox comboBox = (JComboBox)e.getSource();
Item item = (Item)comboBox.getSelectedItem();
System.out.println( item.getId() + " : " + item.getDescription() );
class ItemRenderer extends BasicComboBoxRenderer
public Component getListCellRendererComponent(
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus)
super.getListCellRendererComponent(list, value, index,
isSelected, cellHasFocus);
if (value != null)
Item item = (Item)value;
setText( item.getDescription().toUpperCase() );
return this;
class Item
private int id;
private String description;
public Item(int id, String description)
this.id = id;
this.description = description;
public int getId()
return id;
public String getDescription()
return description;
public String toString()
return description;
public static void main(String[] args)
JFrame frame = new ComboBoxItem();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setVisible( true ); -
ComboBox - Setting Selected Values from data
I am running into a problem in Flex 3 that seems to be
different from Flex 2. Maybe someone can help.
I have a function for setting a combobox selected item for a
location for a value when the titlewindow completes loading. The
value is a prior value from a prior save. In other words to set the
combobox a value from a prior session.
The locations xml file is loaded from a remote object
oncreationcomplete of the titlewindow. The setselectedvalue
function worked perfectly in Flex 2 but now only works in Flex 2
after the titlewindow is loaded. We tested this by running the
setselectedvalue function from a button click after loading.
The dataprovider length is showing 0 in our debugging. After
titlewindow up on screen the length is showing correct ( 35 ) - in
this case. Our viewxmlobject function is showing no xml. Shows xml
correctly after up on screen.
I have set the creationpolicy to "all". That did not help
either.
Any suggestions? Anyone. This is killing me. Spent two days
now trying to get back to working state.
private function SetSelectedValue_cbLocation(): void {
var xLocID:String = eLocationID.text;
//viewXmlObject( cbLocation.dataProvider )
for (var i : int = 0; i < cbLocation.dataProvider.length
; i++) {
//Alert.show( cbLocation.dataProvider
.locid, 'Location DataProvider', Alert.OK);
if ( xLocID == cbLocation.dataProvider.locid ){
cbLocation.selectedIndex = i;
break;
The combobox has the dataprovider set at design time.
<components:is2ComboBox id="cbLocation" x="585" y="4"
width="196" dataProvider="{xmlLocations.Record}"
labelField="locname" dataField="locid"
change="changeLocation(event)" disabledColor="#004080" prompt="1.
Please select location"></components:is2ComboBox>Hard to say without seeing the code. Is the application
opening a pop-up window (the title window)? If so, where is the
combo box located? In the main app or the titleWindow? What calls
the SetSelectedValue_cbLocation() function?
Maybe you are looking for
-
Can I delete songs from my computer to free up space, using iTunes match?
Hi, I love iTunes match, because it brings my entire music library to all my mobile devices without being limited by internal storage space. But, now I have the problem that my computer is running out of free HDD space due to my gigantic itunes libra
-
Playing YouTube or iPod music videos no longer outputs audio to car stereo.
My car stereo is a Pioneer DEH2200ub Since the 4.2.1 upgrade on my iPhone4 something has changed from <4.1 Previously, I could play a YouTube favorite, connect to my head unit, and it'd play just fine out my speakers and display the video. Although n
-
How to install VMWare Tools on OEL 5.7
Hi, I am not able to install VMWare tools on OEL 5.7 Oracle Linux Release 5 Update 7 on 32 bit env. How shoould we proceed? thanks! Srinivas
-
Need to change delivery date in purchase order when it is created by ME59
Hi Gurus, Purchase orders are created using Transaction ME59 where we give the Purchase Requistion. The delivery date in the PO will be same as the delivery date of PR. According to my requirement i need to change the date of PO while the time of its
-
hello iam migrating goods movement using direct input method.iam getting isbn number and quantity in to a table from legacy system and i need to retrieve material number for corresponding isbn number from table and at step 5 mapping fields i wrote se