Common Bills only with future and current components
Hi all,
We want to common BOMs which have components with date effecitivity in the past in a new ORG.
Therefore we would like to common only the future and current components. Otherwise we had to enable all the old items (components) in the new org.
Has anybody an idea how to do this respective has experiences with a cusomization concerning this issue (in standard it seems not possible).
Thanks!
Best regards
Oliver
Hi all,
We want to common BOMs which have components with date effecitivity in the past in a new ORG.
Therefore we would like to common only the future and current components. Otherwise we had to enable all the old items (components) in the new org.
Has anybody an idea how to do this respective has experiences with a cusomization concerning this issue (in standard it seems not possible).
Thanks!
Best regards
Oliver
Similar Messages
-
OEOL: Customizing Line Flow - Generic, Bill Only with Inventory Interface
Hi All,
Am presently customizing OEOL : Line Flow - Generic, Bill Only with Inventory Interface process. In the workflow how do I find that for which order and line the workflow was triggered. The workflow attributes where not helpful.
Thanks,
Priya.Hi,
SELECT user_key, begin_date
FROM wf_items
WHERE item_type = 'OEOL'
AND root_activity = 'R_BILL_ONLY_INV_INTERFACE'; -
How to modified automatic batch number with plant and current year details
hi all,
i want tomodify automatic batch number with plant and current year details. if any one understand plz explain.
thanks,
radhakrishna.Hi,
I am not clear what is u r requirement exactly?
I mean you don't want automatic batch no or modify the batch no. with plant means and Current year details means. Can give details more
Regards
Ganesh -
Hi! is it possible that Logic X has upgrades that work only with mavericks and does t work in mountain lion....since in my macbook pro with mavericks i have new views of the equalizer, etc and in my mac pro with mountain lion it still the old view...
Any OS version of 10.8.4 or later has all features that are not OS depended. The plugins are one example. You probably haven't updated all versions of Logic Pro X to the latest one.
-
CSS Rollover Menu with Images and Current Page Indicator
Hello.
I have found a very interesting video here: http://www.youtube.com/watch?v=vv8cRYGCvIY about creating a CSS Rollover Menu with Images and Current Page Indicator (I tested it and it is working fine).
I have a web site with 15 pages based on a template and I want to use that video sample to do the same thing on my web site.
Please tell me if I can use the sample from the link above to do that.
What should I change in the css file (what new class should I make) to make this work on a web site based on a template ?
Thank You !I don't know about that video tutorial but a sitewide persistent menu indicator ('you are here' highlighting) is very simple to do with CSS classes.
Details and code examples below:
http://alt-web.com/Articles/Persistent-Page-Indicator.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
My time capsule connotes only with ethernet and not wireless why?
my time capsule connotes only with ethernet and not wireless why?
Firstly, try a factory reset. This can often iron out problems like this.
Also, what generation is your TC? What version of AirPort Utility are you using? -
[FIXED] Compiz runs only with emerald and crashes with metacity
Hey,
I currently try to use a metacity theme and have compiz enabled but apparently that's something compiz doesn't really like.
One think i noticed in fusion-icon is that the entire metacity option under: "Select Window Devorator" is just not there.. (or was that always the case?)
Oke, things i have done so far:
- Search this forum (obviously) nothing found with a solution
- Searched the wiki (same results)
- in gconf-editor /desktop/gnome/session/required_components/windowmanager set to compiz (like said in the Compiz wiki page on archlinux.org
- disabled metacity as compositing manager (tried with enabled as well but the same results)
- right now i have the compiz bash script from ubuntu (tweaked a little) and that starts up compiz just fine but not with metacity
And incase you want the script:
#!/bin/sh
# Compiz Manager wrapper script
# Copyright (c) 2007 Kristian Lyngstøl <[email protected]>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Contributions by: Treviño (3v1n0) <[email protected]>, Ubuntu Packages
# Much of this code is based on Beryl code, also licensed under the GPL.
# This script will detect what options we need to pass to compiz to get it
# started, and start a default plugin and possibly window decorator.
COMPIZ_BIN_PATH="/usr/bin/" # For window decorators and compiz
PLUGIN_PATH="/usr/lib/compiz/"
GLXINFO="/usr/bin/glxinfo"
KWIN="/usr/bin/kwin"
METACITY="/usr/bin/metacity"
XFWM="/usr/bin/xfwm"
COMPIZ_NAME="compiz" # Final name for compiz (compiz.real)
# For Xgl LD_PRELOAD
LIBGL_NVIDIA="/usr/lib/nvidia/libGL.so.1.2.xlibmesa"
LIBGL_FGLRX="/usr/lib/fglrx/libGL.so.1.2.xlibmesa"
# Minimum amount of memory (in kilo bytes) that nVidia cards need
# to be allowed to start
# Set to 262144 to require 256MB
NVIDIA_MEMORY="65536" # 64MB
NVIDIA_SETTINGS="nvidia-settings" # Assume it's in the path by default
# For detecting what driver is in use, the + is for one or more /'s
XORG_DRIVER_PATH="/usr/lib/xorg/modules/drivers/+"
FALLBACKWM="xterm"
if [ x"$KDE_FULL_SESSION" = x"true" ]; then
FALLBACKWM="${KWIN}";
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then
FALLBACKWM="${METACITY}"
elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then
FALLBACKWM="${XFWM}"
fi
FALLBACKWM_OPTIONS="--replace $@"
# Driver whitelist
WHITELIST="nvidia intel ati radeon i810 fglrx"
# blacklist based on the pci ids
# See http://wiki.compiz-fusion.org/Hardware/Blacklist for details
#T=" 1002:5954 1002:5854 1002:5955" # ati rs480
#T="$T 1002:4153" # ATI Rv350
#T="$T 8086:2982 8086:2992 8086:29a2 8086:2a02 8086:2a12" # intel 965
T="$T 8086:2a02 " # Intel GM965
T="$T 8086:3577 8086:2562 " # Intel 830MG, 845G (LP: #259385)
BLACKLIST_PCIIDS="$T"
unset T
COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
COMPIZ_PLUGINS="core"
ENV=""
# Use emerald by default if it exist
USE_EMERALD="yes"
# No indirect by default
INDIRECT="no"
# Default X.org log if xset q doesn't reveal it
XORG_DEFAULT_LOG="/var/log/Xorg.0.log"
# Set to yes to enable verbose
VERBOSE="yes"
# Echos the arguments if verbose
verbose()
if [ "x$VERBOSE" = "xyes" ]; then
printf "$*"
fi
# abort script and run fallback windowmanager
abort_with_fallback_wm()
if [ "x$SKIP_CHECKS" = "xyes" ]; then
verbose "SKIP_CHECKS is yes, so continuing despite problems.\n"
return 0;
fi
if [ "x$CM_DRY" = "xyes" ]; then
verbose "Dry run failed: Problems detected with 3D support.'n"
exit 1;
fi
verbose "aborting and using fallback: $FALLBACKWM \n"
if [ -x $FALLBACKWM ]; then
exec $FALLBACKWM $FALLBACKWM_OPTIONS
else
printf "no $FALLBACKWM found, exiting\n"
exit 1
fi
# Check if we run with the Software Rasterizer, this happens e.g.
# when a second screen session is opened via f-u-a on intel
check_software_rasterizer()
verbose "Checking for Software Rasterizer: "
if glxinfo 2> /dev/null | egrep -q '^OpenGL renderer string: Software Rasterizer' ; then
verbose "present. \n";
return 0;
else
verbose "Not present. \n"
return 1;
fi
# Check for non power of two texture support
check_npot_texture()
verbose "Checking for non power of two support: "
if glxinfo 2> /dev/null | egrep -q '(GL_ARB_texture_non_power_of_two|GL_NV_texture_rectangle|GL_EXT_texture_rectangle|GL_ARB_texture_rectangle)' ; then
verbose "present. \n";
return 0;
else
verbose "Not present. \n"
return 1;
fi
# Check for presence of FBConfig
check_fbconfig()
verbose "Checking for FBConfig: "
if [ "$INDIRECT" = "yes" ]; then
$GLXINFO -i | grep -q GLX.*fbconfig
FB=$?
else
$GLXINFO | grep -q GLX.*fbconfig
FB=$?
fi
if [ $FB = "0" ]; then
unset FB
verbose "present. \n"
return 0;
else
unset FB
verbose "not present. \n"
return 1;
fi
# Check for TFP
check_tfp()
verbose "Checking for texture_from_pixmap: "
if [ $($GLXINFO 2>/dev/null | grep -c GLX_EXT_texture_from_pixmap) -gt 2 ] ; then
verbose "present. \n"
return 0;
else
verbose "not present. \n"
if [ "$INDIRECT" = "yes" ]; then
unset LIBGL_ALWAYS_INDIRECT
INDIRECT="no"
return 1;
else
verbose "Trying again with indirect rendering:\n";
INDIRECT="yes"
export LIBGL_ALWAYS_INDIRECT=1
check_tfp;
return $?
fi
fi
# Check wether the composite extension is present
check_composite()
verbose "Checking for Composite extension: "
if xdpyinfo -queryExtensions | grep -q Composite ; then
verbose "present. \n";
return 0;
else
verbose "not present. \n";
return 1;
fi
# Detects if Xgl is running
check_xgl()
verbose "Checking for Xgl: "
if xvinfo | grep -q Xgl ; then
verbose "present. \n"
return 0;
else
verbose "not present. \n"
return 1;
fi
# Check if the nVidia card has enough video ram to make sense
check_nvidia_memory()
if [ ! -x "$NVIDIA_SETTINGS" ]; then
return 0
fi
MEM=$(${NVIDIA_SETTINGS} -q VideoRam | egrep Attribute\ \'VideoRam\'\ .*: | cut -d: -f3 | sed 's/[^0-9]//g')
if [ $MEM -lt $NVIDIA_MEMORY ]; then
verbose "Less than ${NVIDIA_MEMORY}kb of memory and nVidia";
return 1;
fi
return 0;
# Check for existence if NV-GLX
check_nvidia()
if [ ! -z $NVIDIA_INTERNAL_TEST ]; then
return $NVIDIA_INTERNAL_TEST;
fi
verbose "Checking for nVidia: "
if xdpyinfo | grep -q NV-GLX ; then
verbose "present. \n"
NVIDIA_INTERNAL_TEST=0
return 0;
else
verbose "not present. \n"
NVIDIA_INTERNAL_TEST=1
return 1;
fi
# Check if the max texture size is large enough compared to the resolution
check_texture_size()
# Check how many screens we've got and iterate over them
N=$(xdpyinfo | grep -i "number of screens" | sed 's/.*[^0-9]//g')
for i in $(seq 1 $N); do
verbose "Checking screen $i"
TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed -n "$i s/^.*=[^0-9]//g p")
RESOLUTION=$(xdpyinfo | grep -i dimensions: | sed -n -e "$i s/^ *dimensions: *\([0-9]*x[0-9]*\) pixels.*/\1/ p")
VRES=$(echo $RESOLUTION | sed 's/.*x//')
HRES=$(echo $RESOLUTION | sed 's/x.*//')
verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): ";
if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
verbose "Failed.\n"
return 1;
fi
verbose "Passed.\n"
done
return 0
# check driver whitelist
running_under_whitelisted_driver()
LOG=$(xset q|grep "Log file"|awk '{print $3}')
if [ "$LOG" = "" ]; then
verbose "xset q doesn't reveal the location of the log file. Using fallback $XORG_DEFAULT_LOG \n"
LOG=$XORG_DEFAULT_LOG;
fi
if [ -z "$LOG" ];then
verbose "AIEEEEH, no Log file found \n"
verbose "$(xset q) \n"
return 0
fi
for DRV in ${WHITELIST}; do
if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG;
then
return 0
fi
done
verbose "No whitelisted driver found\n"
return 1
# check pciid blacklist
have_blacklisted_pciid()
OUTPUT=$(lspci -n)
for ID in ${BLACKLIST_PCIIDS}; do
if echo "$OUTPUT" | egrep -q "$ID"; then
verbose "Blacklisted PCIID '$ID' found \n"
return 0
fi
done
OUTPUT=$(lspci -vn | grep -i VGA)
verbose "Detected PCI ID for VGA: $OUTPUT\n"
return 1
build_env()
if check_nvidia; then
ENV="__GL_YIELD=NOTHING "
fi
if [ "$INDIRECT" = "yes" ]; then
ENV="$ENV LIBGL_ALWAYS_INDIRECT=1 "
fi
if check_xgl; then
if [ -f ${LIBGL_NVIDIA} ]; then
ENV="$ENV LD_PRELOAD=${LIBGL_NVIDIA}"
verbose "Enabling Xgl with nVidia drivers...\n"
fi
if [ -f ${LIBGL_FGLRX} ]; then
ENV="$ENV LD_PRELOAD=${LIBGL_FGLRX}"
verbose "Enabling Xgl with fglrx ATi drivers...\n"
fi
fi
ENV="$ENV FROM_WRAPPER=yes"
if [ -n "$ENV" ]; then
export $ENV
fi
build_args()
if [ "x$INDIRECT" = "xyes" ]; then
COMPIZ_OPTIONS="$COMPIZ_OPTIONS --indirect-rendering "
fi
if [ ! -z "$DESKTOP_AUTOSTART_ID" ]; then
COMPIZ_OPTIONS="$COMPIZ_OPTIONS --sm-client-id $DESKTOP_AUTOSTART_ID"
fi
if check_nvidia; then
if [ "x$INDIRECT" != "xyes" ]; then
COMPIZ_OPTIONS="$COMPIZ_OPTIONS --loose-binding"
fi
fi
# Execution begins here.
# Read configuration from XDG paths
if [ -z "$XDG_CONFIG_DIRS" ]; then
test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager
for f in /etc/xdg/compiz/compiz-manager.d/*; do
test -e $f && . $f
done
else
OLD_IFS=$IFS
IFS=:
for CONFIG_DIR in $XDG_CONFIG_DIRS
do
test -f $CONFIG_DIR/compiz/compiz-manager && . $CONFIG_DIR/compiz/compiz-manager
for f in $CONFIG_DIRS/compiz/compiz-manager.d/*; do
test -e $f && . $f
done
done
IFS=$OLD_IFS
unset OLD_IFS
fi
if [ -z "$XDG_CONFIG_HOME" ]; then
test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager
else
test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager
fi
# Don't use compiz when running the failsafe session
if [ "x$GNOME_DESKTOP_SESSION_ID" = "xFailsafe" ]; then
abort_with_fallback_wm
fi
if [ "x$LIBGL_ALWAYS_INDIRECT" = "x1" ]; then
INDIRECT="yes";
fi
# if we run under Xgl, we can skip some tests here
if ! check_xgl; then
# if vesa or vga are in use, do not even try glxinfo (LP#119341)
if ! running_under_whitelisted_driver || have_blacklisted_pciid; then
abort_with_fallback_wm
fi
# check if we have the required bits to run compiz and if not,
# fallback
if ! check_tfp || ! check_npot_texture || ! check_composite || ! check_texture_size; then
abort_with_fallback_wm
fi
# check if we run with software rasterizer and if so, bail out
if check_software_rasterizer; then
verbose "Software rasterizer detected, aborting"
abort_with_fallback_wm
fi
if check_nvidia && ! check_nvidia_memory; then
abort_with_fallback_wm
fi
if ! check_fbconfig; then
abort_with_fallback_wm
fi
fi
# load the ccp plugin if present and fallback to plain gconf if not
if [ -f ${PLUGIN_PATH}libccp.so ]; then
COMPIZ_PLUGINS="$COMPIZ_PLUGINS ccp"
elif [ -f ${PLUGIN_PATH}libgconf.so ]; then
COMPIZ_PLUGINS="$COMPIZ_PLUGINS glib gconf"
fi
# enable gnomecompat if we run under gnome
if [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ] && [ ! -e ~/.compiz-gnomecompat ]; then
verbose "running under gnome seesion, checking for gnomecompat\n"
if ! gconftool -g /apps/compiz/general/allscreens/options/active_plugins|grep -q gnomecompat; then
verbose "adding missing gnomecompat\n"
V=$(gconftool -g /apps/compiz/general/allscreens/options/active_plugins|sed s/mousepoll,/mousepoll,gnomecompat,/)
if ! echo $V|grep -q gnomecompat; then
verbose "can not add gnomecompat, reseting\n"
gconftool --unset /apps/compiz/general/allscreens/options/active_plugins
else
gconftool -s /apps/compiz/general/allscreens/options/active_plugins --type list --list-type=string $V
fi
touch ~/.compiz-gnomecompat
fi
fi
# get environment
build_env
build_args
if [ "x$CM_DRY" = "xyes" ]; then
verbose "Dry run finished: everything should work with regards to Compiz and 3D.\n"
verbose "Execute: ${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS \n"
exit 0;
fi
${COMPIZ_BIN_PATH}${COMPIZ_NAME} $COMPIZ_OPTIONS "$@" $COMPIZ_PLUGINS || exec $FALLBACKWM $FALLBACKWM_OPTIONS
That's it so far.
So again what i try to do is running compiz with metacity decorations.
I hope someone can help me here,
Mark.
Last edited by markg85 (2009-06-28 00:26:04)whoops wrote:
Wait, what, I thought metacity isn't as window decorator, it is a window manager, right? I don't really get what you're trying to do... maybe install compiz-decorator-gtk and use it instead of emerald?
edit: aaah, yes, I think you're missing compiz-decorator-gtk, try that, look at fusion icon "window decorator" option again.
Strange.. i was under the impression that pacman -S compiz-fusion would install GTK and QT decorators... guess not.
This issue is fixed now. Running metacity decorations now WITH compiz. -
Export Billing Configuration with CIN and Foreign Trade Data
Hi,
I need detail configuration of Export billing with CIN and foreign trade data for my understnading the configuration process for export billing process.
Thanks in advanceDear Tarun
I feel you need detailed configuration of CIN.
Two diffrent CIN configurations supported bySAP
TAXINJ & TAXINN. First is formula based & second is conditions based
Search in SDN you will get many threads.
Regards
Deepu Pilla -
ISight not working with Apple apps but only with Skype and flash....
Hi guys, don't know why but suddenly my isight stopped working with every apple application, like ichat, imovie and photoboot, but it still works with skype and safari (flash).
The camera simply doesn't work, the green led stays off.... I tried resetting PRAM, SMC, deleted .plist files, tried new account and everything...
Maybe the problem is facetime, I uninstalled it by simply dragging it to the trashcan, so I followed a thread here and manually deleted its last files but no luck....
Please guys help me, I really hope I don't have to FORMAT my mac... sounds so windows to me XD...V4N0 wrote:
...Well the camera is seen in system profiler and it works perfectly with skype, I'll try a couple of things then... well reset is inevitable....
Thanks for the "helpful" star, V4N0!
(1) Your initial post shows you using Mac OS X (10.6.6),
but your latest post shows Mac OS X (10.6.5).
Have you "downdated" to 10.6.5?
(2) iSight works with iMovie, Photo Booth, QuickTime, and other apps like Address Book,
etc. You need not try every possible app, but please tell us which you have tested,
and which, if any, work with your iSight.
(3) Have you tested iSight operation in more than one user account?
Are the symptoms EXACTLY the same in any user account you test?
(4) If your only problem is with ALL apps in ALL user accounts, try applying the
Combo Update using the method suggested in this recent post:
http://discussions.apple.com/thread.jspa?messageID=12859723�
If you want the latest Mac OS instead of 10.6.5, download the 10.6.6 Combo Update:
http://support.apple.com/kb/DL1349
instead of the 10.6.5 Combo (http://support.apple.com/kb/DL1324) link in the post.
Message was edited by: EZ Jim
Mac Pro Quad Core (Early 2009) 2.93Ghz Mac OS X (10.6.6)
MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.6)
LED Cinema Display; G4 PowerBook 1.67GHz (10.4.11)
iBookSE 366MHz (10.3.9); External iSight; iPod4touch4.2.1 -
Need help to create file with name and current time stamp.
I need to create .xlsx file exporting data from sql database and file name would be 'FileName' and current yyyymmdd.
I'm trying to use following code but it's keep saying incorrect syntax near "+".
EXEC p_CreateExcel 'sql64', 'NewFile', '\\hrfile1\Shared\Buying Report\NewFile'
+ CAST(YEAR(CURRENT_TIMESTAMP) AS VARCHAR)
+ RIGHT('00'+CAST(MONTH(CURRENT_TIMESTAMP) AS VARCHAR),2)
+ RIGHT('00'+CAST(DAY(CURRENT_TIMESTAMP) AS VARCHAR),2)+'.xlsx'This is what I have on EXEC p_CreateExcel
USE [XePro01]
GO
/****** Object: StoredProcedure [dbo].[p_CreateExcel] Script Date: 02/26/2015 11:27:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[p_CreateExcel]
@db_name varchar(100),
@table_name varchar(100),
@file_name varchar(100)
as
--Generate column names as a recordset
declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)
select
@columns=coalesce(@columns+',','')+column_name+' as '+column_name
from
information_schema.columns
where
table_name=@table_name
select @columns=''''''+replace(replace(@columns,' as ',''''' as '),',',',''''')
--Create a dummy file to have actual data
select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.xls'
--Generate column names in the passed EXCEL file
set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from (select '+@columns+') as t" queryout "'+@file_name+'" -c -t, -T -S'''
exec(@sql)
--Generate data in the dummy file
set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from XeProgst01.dbo.'+@table_name+'" queryout "'+@data_file+'" -c -t, -T -S'''
exec(@sql)
--Copy dummy file to passed EXCEL file
set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> '+@file_name+''''
exec(@sql)
--Delete dummy file
set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
exec(@sql)
GO -
Need help with HTML and Swing Components
Dear All,
I am using HTML text for Jbutton and Jlabel and MenuItem.
But when i am trying to disable any of these, its foreground color is not being grayed out.
For that, I have overrided the setEnable() method as mentioned below:
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
import javax.swing.plaf.FontUIResource;
* HtmlLabelEx.java
public class HtmlLabelEx extends javax.swing.JDialog implements MouseListener{
* Creates new form HtmlLabelEx
public HtmlLabelEx(java.awt.Frame parent, boolean modal) {
super(parent, modal);
UIManager.put("swing.boldMetal", Boolean.FALSE);
initComponents();
setLayout(null);
this.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent event)
System.exit(0);
JLabel jLabel1 = new JLabel()
public void setEnabled(boolean b)
super.setEnabled(b);
setForeground(b ? (Color) UIManager.get("Label.foreground") : (Color) UIManager.get("Label.disabledForeground"));
JButton jButton1 = new JButton()
public void setEnabled(boolean b)
super.setEnabled(b);
setForeground(b ? (Color) UIManager.get("Label.foreground") : (Color) UIManager.get("Label.disabledForeground"));
add(jButton1);
String str = "<html><body><b>Label</b></body></html>";
System.out.println("str = "+str);
jLabel1.setText(str);
add(jLabel1);
jLabel1.setBounds(10,10,100,20);
jLabel1.setEnabled(false);
jButton1.setText("<html><body><b>Button</b></body></html>");
jButton1.setEnabled(true);
jButton1.setBounds(10,50,100,20);
System.out.println("getText = "+jLabel1.getText());
setSize(400,400);
addMouseListener(this);
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
getContentPane().setLayout(null);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
pack();
}// </editor-fold>
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new HtmlLabelEx(new javax.swing.JFrame(), true).setVisible(true);
// Variables declaration - do not modify
// End of variables declaration
public void mouseClicked(MouseEvent e)
if(e.getButton() == e.BUTTON3)
JMenuItem mit = new JMenuItem("<html><body><b>Menu Item</b></body></html>");
JPopupMenu pop = new JPopupMenu();
pop.add(mit);
mit.setEnabled(false);
pop.show(this,e.getX(),e.getY());
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
public void mouseEntered(MouseEvent e) {
public void mouseExited(MouseEvent e) {
But, I think it is difficult to write like this for each component.
I am looking for an optimized solution so that the change will be only in one place.
so that, It wont leads to change so many pages or so many places.
And i have the following assumptions to do this. please let me know the possibility.
1.Implementing custom UI class, extending the JButton/JMenuItem (As the BasicButton/MenuItemUI class does not have setEnabled() method to override) and putting this in UIManager.put("ButtonUI/MenuItemUI","CustomClass).
2.If there is any possibility to achieve this, by just overriting any key in the UIManager
3.By setting any client property globally.
My requirement is to do this only at one place for entire the application.So, that we need not change all the buttoins, sya some 30 buttions are there in a dialog, then we need to override each button class.
Please suggest me the possibilties..
Thank youHi camickr ,
I know that to set the font we have to use component.setfont().
But, as per my requirement,i am not setting any font to any component in my application.
i am just passing HTML text along with FONT tags to all the components in my Application.SO, in this case we will get bold letters and that problem fixed when we set swing.boldMetal = false in UI Manager.
But actual problem irrespective of font settings is when ever we use HTML rendered text, when the button or menuitem is disabled,then that one will not be changed to gray color. i.e., it still looks like normal controls, even it is disabled.(It is also reported as bug)
But, as per my knowledge we can fix by overrding setEnabled or paint() methods for each and every component.
But, if we do like that, for an application that has 200 buttons or MenuItems, it is difficult to follow that approach.
So, We should find a way to achieve that only in one place like using UIManager or other one as i mentioned in previous posts if possible.
I hope you understood what my problem is exactly.
Thank You
Edited by: sindhumourya on Mar 4, 2010 7:26 AM -
Problem with Checkbox and Button components....(Simple one)
Hi all,
As I am new to flash and ActionScript 3.0,I have the following issue regarding Flash.
I have 2 swf files whose contents are as follows: First.swf file contains a check-box (instance name:my_checkbox). Second.swf file contains a button component(say,label name of Submit and with instance name: submit_btn).
Now, my requirement is: Whenever I click the submit_btn button, then the check_box must be get selected/visible. If I click it once again, then it must get deselected/invisible. The process must be continued till I stop the click-event on button component.
Reply me as soon as possible.. Thanks in advance...
Srihari.ChHi Ross Ritchey,
I am attaching the two .fla files(with ActionScript 3.0 code in respective layers) that are resultant to your reply. (viz., CheckDemo.fla &&ButonDemo.fla respectively). Please check them once..
The functionality (i.e., When ButtonDemo.swf file is executed and the Submit button("myBtn") is clicked, the Checkbox component(s) present in "CheckDemo.swf" file is getting appeared in "ButtonDemo.swf" and is ready to access. Also, the selection/enability/visibility also works properly).
Also, check the added code.I had added all the required code to fulfil the requirement.
When I click the "Submit_btn", the checkbox components placed in "CheckboxDemo.swf" file are appearing in "ButtonDemo.swf". Instead, I don't need to get them.
So, here my requirement is: " When i click "submitButton" in ButtonDemo.swf file, then the action must be performed to the checkbox component(s) present in CheckDemo.swf file.
Thanks a lot for your help. I am so happy with your reply, because(As you know, I am new to Flash/AS3), after a long time my is getting forward. And I hope the same form of reply to this mail or issue.
AS3 code in ButtonDemo.fla:
var url:String="CheckDemo.swf";
var urlRequest:URLRequest=new URLRequest(url);
var myLoader:Loader = new Loader();
myLoader.load(urlRequest);
addChild(myLoader);
myBtn.addEventListener(MouseEvent.CLICK,doChangeCheckbox);
function doChangeCheckbox(e:MouseEvent):void {
(myLoader.content as MovieClip).myCheckbox.selected = !(myLoader.content as MovieClip).myCheckbox.selected;
(myLoader.content as MovieClip).myCheckbox2.enabled = !(myLoader.content as MovieClip).myCheckbox2.enabled;
(myLoader.content as MovieClip).myCheckbox3.visible = !(myLoader.content as MovieClip).myCheckbox3.visible;
Srihari.Ch -
Trying to do something very strange with layouts and painting components
I'm trying to do something very strange with changing the layout of a container, then painting it to a bufferedImage and changing it back again so nothing has changed. However, I am unable to get the image i want of this container in a new layout. Consider it a preview function of the different layouts. Anyway. I've tried everything i know about swing and have come up empty. There is probably a better way to do what i am trying to do, i just don't know how.
If someone could have a look perhaps and help me out i would be much appreciative.
Here is a self contained small demo of my conundrum.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
// what is should do is when you click on the button "click me" it should place a image on the panel of the buttons in a
// horizontal fashion. Instead it shows the size that the image should be, but there is no image.
public class ChangeLayoutAndPaint
private static JPanel panel;
private static JLabel label;
public static void main(String[] args)
// the panel spread out vertically
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
// the buttons in the panel
JButton b1, b2, b3;
panel.add(b1 = new JButton("One"));
panel.add(b2 = new JButton("Two"));
panel.add(b3 = new JButton("Three"));
b1.setEnabled(false);
b2.setEnabled(false);
b3.setEnabled(false);
// the label with a border around it to show size in a temp panel with flowlayout to not stuff around
// with the actual size we want.
JPanel thingy = new JPanel();
label = new JLabel();
label.setBorder(new LineBorder(Color.black));
thingy.add(label);
// the button to make things go
JButton button = new JButton("click me");
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
//change layout
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.doLayout();
//get image
BufferedImage image = new BufferedImage(panel.getPreferredSize().width, panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
//set icon of jlabel
label.setIcon(new ImageIcon(image));
//change back
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.doLayout();
// the frame
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,200);
frame.setLocation(100,100);
frame.getContentPane().add(panel, BorderLayout.NORTH);
frame.getContentPane().add(thingy, BorderLayout.CENTER);
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setVisible(true);
}Looks like you didn't read the API for Container#doLayout().
Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.
There's also a concurrency issue here in that the panel's components may be painted to the image before revalidation completes. And your GUI, like any Swing GUI, should be constructed and shown on the EDT.
Try this for size -- it could be better, but I've made the minimum possible changes in your code:import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.border.LineBorder;
public class ChangeLayoutAndPaint {
private static JPanel panel;
private static JLabel label;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// the panel spread out vertically
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
// the buttons in the panel
JButton b1, b2, b3;
panel.add(b1 = new JButton("One"));
panel.add(b2 = new JButton("Two"));
panel.add(b3 = new JButton("Three"));
b1.setEnabled(false);
b2.setEnabled(false);
b3.setEnabled(false);
// the label with a border around it to show size in a temp panel with flowlayout to not stuff around
// with the actual size we want.
JPanel thingy = new JPanel();
label = new JLabel();
// label.setBorder(new LineBorder(Color.black));
thingy.add(label);
// the button to make things go
JButton button = new JButton("click me");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//change layout
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
//panel.doLayout();
panel.revalidate();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
//get image
BufferedImage image = new BufferedImage(panel.getPreferredSize().width,
panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
//set icon of jlabel
label.setIcon(new ImageIcon(image));
//change back
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
//panel.doLayout();
panel.revalidate();
// the frame
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 200);
frame.setLocation(100, 100);
frame.getContentPane().add(panel, BorderLayout.NORTH);
frame.getContentPane().add(thingy, BorderLayout.CENTER);
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setVisible(true);
}db
edit I prefer this:import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.*;
public class LayoutAndPaint {
JPanel panel;
JLabel label;
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new LayoutAndPaint().makeUI();
public void makeUI() {
JButton one = new JButton("One");
JButton two = new JButton("Two");
JButton three = new JButton("Three");
one.setEnabled(false);
two.setEnabled(false);
three.setEnabled(false);
panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.add(one);
panel.add(two);
panel.add(three);
label = new JLabel();
JButton button = new JButton("Click");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layoutAndPaint();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 400);
frame.add(panel, BorderLayout.NORTH);
frame.add(label, BorderLayout.CENTER);
frame.add(button, BorderLayout.SOUTH);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
private void layoutAndPaint() {
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
panel.revalidate();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
BufferedImage image = new BufferedImage(panel.getPreferredSize().width,
panel.getPreferredSize().height, BufferedImage.TYPE_INT_ARGB);
Graphics g = image.createGraphics();
panel.paintComponents(g);
g.dispose();
label.setIcon(new ImageIcon(image));
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.revalidate();
}db
Edited by: DarrylBurke -
Showing a PDF with InteractiveForm and IFrame components
Dear Experts,
For quite some time we were having several issues while showing PDF Files in WebDynpro Java Components because of different versions of Adobe Readers and mainly because of browsers. Finally I have read about the option to show PDFs using IFrame.
byte[] PDFFormContent = bytes;
IWDResource resource = WDResourceFactory.createCachedResource(PDFFormContent, pdffile.getName(),WDWebResourceType.PDF);
Now this is working for me with Google Chrome, Firefox and IE without a problem. But with different pc clients of my colleagues PDF files are forced to download,when the application is called, instead of showing the PDF file in an IFrame.
Which setting is deciding to whether download the PDF or showing it embedded? Is there any way to prevent this grammatically?
Thanks and Regards,
KorayIf you are allowed to, you could check Adobe settings on client side.
Take a look at this:
See also the official Adobe guide Acrobat Help | Display PDF in browser | Acrobat, Reader XI
Hope this helps.
Regards,
Tobias -
Building JSF 1.2 Custom Components with EL and standard components
Hi all,
I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
- Using jsf 1.2
- Must use unified EL, i am using a UIComponentELTag
- iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
What i want help with:
I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
Note:
In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
Many Thanks,
KevHi all,
I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
- Using jsf 1.2
- Must use unified EL, i am using a UIComponentELTag
- iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
What i want help with:
I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
Note:
In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
Many Thanks,
Kev
Maybe you are looking for
-
Using Dreamweaver CS6, get 'Adobe Dreamweaver CS6 has stopped working'
This happened in CS5 as well. We have a large site (57800 files total). When we run Link Checker, we get 47841 Orpahned files. When I right click and attempt to save the file, I get a message box with the error listed above. When I click on debug,
-
Connecting NEW HP Deskjet 2540 to Chromebook
Hi Everyone, Please help. I am trying to connect a NEW printer - HP deskjet 2540 to my google chromebook, but I cannot work out how to do it.. Do I need to attach the cable to the printer? How can I set this up.. I have been trying for the last hou
-
I reset firefox, it lost my bookmarks & passwords. How do I get them back?
I reset firefox to try and fix problems like crashing, slowness, sites not loading at all. Instead of fixing problems, which it did not. ( It is still slow and not loading sites.) It lost all my bookmarks, passwords and everything else it said it wou
-
What is the difference of public-read and public-read protected
I have noticed that the access of some variables in API document is public-read protected. I tried the following code. They seem all the same. class FatherClass{ public-read var a; public-read protected var b; init{ a=1; println(a); b=1;
-
Hi! I'm new in swing... How can i load an image from a file and next click in my internalFrame (already created) and display the image in the point where i click? Thank you for the time.