Cannot bind a property to the value of an LrView:picture
Per this discussion, I wonder of there is a bug binding specific properties to viewFactory:picture()
I can't seem to bind the value, even with a hacky transform that logs and returns a string. This snippet is from a sectionsForTopOfDialog() callback, with the keys we want in that property table passed in.
f:picture {
value = bind {
key = 'pic',
transform = function ( value, fromModel )
local res = _PLUGIN:resourceId( value )
tracef(" Will return: %s", res)
return res
end,
tooltip = bind 'picTT',
The tooltip works (so far) but I can't get resource to show up. I tried a variety of ways of getting the string into the value. It seems like you can't bind properties to this value.
Sometimes I question how deterministic the SDK is. This just started working for me:
f:picture {
value = bind {
key = 'accountIcon',
transform = function ( value, fromModel )
if not fromModel then return LrBinding.kUnsupportedDirection end
--tracef(" value=%s", value)
return _PLUGIN:resourceId( value or PluginDefs.defaultAccountIcon )
end,
I'm afraid to change anything now. There is a timing issue between the table observers in the callback and the thing that sets the properties I can't quite grok
Similar Messages
-
How to disable or change the value of h:commandlink jsf component
Hi,
I am a student. I am using h:commandlink. I need to change the value of the component once it is clicked by the user. How do i do that?
If i cannot change the displayed value of the commandlink. I am thinking of atleast disabling the link once the user clicked., to avoid the link being clicked more than once by the user.
<h:commandlink id = "follow" action = "usermanager.followdoctor" value = "Follow"/>
Usermanager is my managed bean class for this jsp page. The value "Follow" is the one that i want to be changed to "following" once it is clicked. Please help me. Thanks for your time in advance.Hello qimbal2,
Thanks for getting back to me. you are right , i should disable the link as soon as it is clicked. I went ahead and implemented this logic by using a property in my bean class and binding that property to the value of my link. I wrote the logic in my action method in such a way that when i click on follow for the first time, the value of the link would change to 'Following' and the link would be disabled. It works for me now.
Thanks,
Suha -
Setting DAQ channel by property node does not display the value
I am writing a configuration VI to set channel selection and calibration parameters for an SCXI chassis. I store a default setup in a configuration (ini) file and read that file automatically when the VI is called. The value from the file are set by property nodes using the "Value" property. The values from the file do not display in the DAQ channel selection rings, but the numerical calibration values do display correctly. When I click the down arrow in the channel rings, the correct value displays.
This behavior exists both in LabView and app-builder EXEs. Also, if I change the property nodes for the DAQ channels to local variables, it works. The Value (signaling) property doesn't cause them to display
properly either. Why can't I use the property node?I don't understand exactly what you are trying to do.
Please upload a simple VI to demonstrate the behavior you are describing. Remember also to attach the .ini file.
Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions -
I built a pivottable using Powerpivot.
Initially, I can add or drag any data field I want to columns, Rows or the Values area inside the field list (those 4 squares). However, as times goes by...suddenly... I just no longer can add or drag a "value field" from the pivottable field list into the
"values" section.
Does anybody know how to fix this problem ?Hi Bin Long,
I tried what you suggested.
I believe that there is a glitch in the Powerpivot field list (where you find the 4 squares for columns, rows, values, filter)
When I initially create a pivottable with powerpivot, everything works fine when I am adding field list items to the the columns, rows, values sections, filters.
However.....IF I close the powerpivot field list or if I save and close the excel file...then I cannot add more items to the "values" section.
I can comment about one thing that seems different in my powerpivot field list. When I can no longer add items to the "values" section, I realized that in the TOP section of the field list I see in bold letters a summary of the items that are SUM ∑ in the "values"
section.
Does anybody know how to fix this ?
Thanks. -
Hi All,
I have 2 tables
table1: col1 sequenceid, col2 code
table2:col1 studentID , col2 code, col3 joindate
in table 1 i have values as
1 Q
2 W
3 E
4 R
5 T
6 Y
Table2:
A1 Q
1-04-2015
A1 W
2-04-2015
A3 Q
1-04-2015
A2 Q
1-04-2015
A3 W
2-04-2015
A2 W
2-04-2015
A2 E
2-04-2015
A3 E
2-04-2015
A1 E
2-04-2015
A2 R
2-04-2015
Now i want ouput as
A3 E
A2 R
A1 E
I want to group the values in table2 based on studentid order by the sequence in the table1 and get the latest which is having higher sequence (Note: the date field cannot be used to order the values)from @table2 a inner join @table1 b on a.col2=b.col2 collate database_default)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Context binding of property value cannot be resolved. not contain any eleme
I have a binding of a inputelment to a context element. the context can be empty. when it is empty it throws the error only when i have that binding. I thougt its not interesting for an inputfield to have a value or?
Following error occurs: The following error text was processed in the system DBW : Adapter error in &VIEW_ELEMENT_TYPE& "ZPM_PROJ" of view "ZPM_MD_PMON.STARTVIEW": Context binding of property VALUE cannot be resolved: Node STARTVIEW.1.PROJ does not contain any elementsHi,
The thing is that you're trying to access node which might be from 0 to 1 or n records (cardinality). And at runtime point you have 0 records with 0 elements. That's why you have problem.
There might be something wrong with logic how you trying to display some data in your text fields.
At runtime there is no context element from which system could take values.
Or you have to change parent node cardinality to 1..1 if that meets logic or review your logic. -
NullPointerException - Cannot get the value from variable f_cashGiven
In SubCheckout.java (a POS), what I want is when Payment button (f_cashPayment) is pressed, the action "Cash" is performed, get the value from Cash Given (f_cashGiven), do the subtraction and post the value as Cash Return (f_cashReturn). The code is filled in actionPerformed. But I cannot get the value by using f_cashGiven.getValue() from VNumber class. It returns NULL. This should be quite straight forward, but I do not know what is wrong. Please help!
Enclosed please find the source code of SubCheckout.java and VNumber.java
This is the code of SubCheckout.java :
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
package org.compiere.pos;
import java.awt.*;
import java.awt.event.*;
import java.math.BigDecimal;
import javax.swing.border.*;
import org.compiere.grid.ed.*;
import org.compiere.swing.*;
import org.compiere.util.*;
* POS Checkout Sub Panel
* @author Jorg Janke
* @version $Id: SubCheckout.java,v 1.3 2005/03/11 20:28:22 jjanke Exp $
public class SubCheckout extends PosSubPanel implements ActionListener
* Constructor
* @param posPanel POS Panel
public SubCheckout (PosPanel posPanel)
super (posPanel);
} // PosSubCheckout
private CButton f_register = null;
private CButton f_summary = null;
private CButton f_process = null;
private CButton f_print = null;
private CLabel f_lcreditCardNumber = null;
private CTextField f_creditCardNumber = null;
private CLabel f_lcreditCardExp = null;
private CTextField f_creditCardExp = null;
private CLabel f_lcreditCardVV = null;
private CTextField f_creditCardVV = null;
private CButton f_cashPayment = null;
private CLabel f_lcashGiven = null;
private VNumber f_cashGiven = null;
private CLabel f_lcashReturn = null;
private VNumber f_cashReturn = null;
private CButton f_creditPayment = null;
/** Logger */
private static CLogger log = CLogger.getCLogger(SubCheckout.class);
* Initialize
public void init()
// Title
TitledBorder border = new TitledBorder(Msg.getMsg(Env.getCtx(), "Checkout"));
setBorder(border);
// Content
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = INSETS2;
// -- 0
gbc.gridx = 0;
f_register = createButtonAction("Register", null);
gbc.gridy = 0;
add (f_register, gbc);
f_summary = createButtonAction("Summary", null);
gbc.gridy = 1;
add (f_summary, gbc);
f_process = createButtonAction("Process", null);
gbc.gridy = 2;
add (f_process, gbc);
f_print = createButtonAction("Print", null);
gbc.gridy = 3;
add (f_print, gbc);
// -- 1 -- Cash
gbc.gridx = 1;
gbc.gridheight = 2;
gbc.fill = GridBagConstraints.BOTH;
gbc.weightx = .1;
CPanel cash = new CPanel(new GridBagLayout());
cash.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Cash")));
gbc.gridy = 0;
add (cash, gbc);
GridBagConstraints gbc0 = new GridBagConstraints();
gbc0.insets = INSETS2;
gbc0.anchor = GridBagConstraints.WEST;
f_lcashGiven = new CLabel(Msg.getMsg(Env.getCtx(),"CashGiven"));
cash.add (f_lcashGiven, gbc0);
f_cashGiven = new VNumber("CashGiven", false, false, true, DisplayType.Amount,
Msg.translate(Env.getCtx(), "CashGiven"));
f_cashGiven.addActionListener(this);
f_cashGiven.setColumns(10, 25);
cash.add (f_cashGiven, gbc0);
f_cashGiven.setValue(Env.ZERO);
f_lcashReturn = new CLabel(Msg.getMsg(Env.getCtx(),"CashReturn"));
cash.add (f_lcashReturn, gbc0);
f_cashReturn = new VNumber("CashReturn", false, true, false, DisplayType.Amount,
"CashReturn");
f_cashReturn.setColumns(10, 25);
cash.add (f_cashReturn, gbc0);
f_cashReturn.setValue(Env.ZERO);
f_cashPayment = createButtonAction("Payment", null);
f_cashPayment.setActionCommand("Cash");
gbc0.anchor = GridBagConstraints.EAST;
gbc0.weightx = 0.1;
cash.add (f_cashPayment, gbc0);
// -- 1 -- Creditcard
CPanel creditcard = new CPanel(new GridBagLayout());
creditcard.setBorder(new TitledBorder(Msg.translate(Env.getCtx(), "CreditCardType")));
gbc.gridy = 2;
add (creditcard, gbc);
GridBagConstraints gbc1 = new GridBagConstraints();
gbc1.insets = INSETS2;
gbc1.anchor = GridBagConstraints.WEST;
gbc1.gridx = 0;
gbc1.gridy = 0;
f_lcreditCardNumber = new CLabel(Msg.translate(Env.getCtx(), "CreditCardNumber"));
creditcard.add (f_lcreditCardNumber, gbc1);
gbc1.gridy = 1;
f_creditCardNumber = new CTextField(18);
creditcard.add (f_creditCardNumber, gbc1);
gbc1.gridx = 1;
gbc1.gridy = 0;
f_lcreditCardExp = new CLabel(Msg.translate(Env.getCtx(),"CreditCardExp"));
creditcard.add (f_lcreditCardExp, gbc1);
gbc1.gridy = 1;
f_creditCardExp = new CTextField(5);
creditcard.add (f_creditCardExp, gbc1);
gbc1.gridx = 2;
gbc1.gridy = 0;
f_lcreditCardVV = new CLabel(Msg.translate(Env.getCtx(), "CreditCardVV"));
creditcard.add (f_lcreditCardVV, gbc1);
gbc1.gridy = 1;
f_creditCardVV = new CTextField(5);
creditcard.add (f_creditCardVV, gbc1);
gbc1.gridx = 3;
gbc1.gridy = 0;
gbc1.gridheight = 2;
f_creditPayment = createButtonAction("Payment", null);
f_creditPayment.setActionCommand("CreditCard");
gbc1.anchor = GridBagConstraints.EAST;
gbc1.weightx = 0.1;
creditcard.add (f_creditPayment, gbc1);
} // init
* Get Panel Position
public GridBagConstraints getGridBagConstraints()
GridBagConstraints gbc = super.getGridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 3;
return gbc;
} // getGridBagConstraints
* Dispose - Free Resources
public void dispose()
super.dispose();
} // dispose
* Action Listener
* @param e event
public void actionPerformed (ActionEvent e)
String action = e.getActionCommand();
if (action == null || action.length() == 0)
return;
log.info( "PosSubCheckout - actionPerformed: " + action);
if (e.getSource() == f_cashGiven) {
f_cashGiven.setValue(f_cashGiven.getValue());
System.out.println("f_cashGiven"+f_cashGiven.getDisplay());
// Register
// Summary
// Print
if (action.equals("Cash")) {
BigDecimal CashGiven, GrandTotal, CashReturn;
System.out.println("Cash given is "+f_cashGiven.getDisplay());
CashGiven = (BigDecimal)f_cashGiven.getValue();
GrandTotal = (BigDecimal)p_posPanel.f_curLine.getOrder().getGrandTotal();
CashReturn = CashGiven.subtract(GrandTotal);
f_cashReturn.setValue(CashReturn);
// Cash (Payment)
// CreditCard (Payment)
} // actionPerformed
} // PosSubCheckoutThis is the code of VNumber.java :
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
package org.compiere.grid.ed;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.math.*;
import java.text.*;
import java.util.logging.*;
import javax.swing.*;
import javax.swing.text.*;
import org.compiere.apps.*;
import org.compiere.model.*;
import org.compiere.swing.*;
import org.compiere.util.*;
* Number Control
* @author Jorg Janke
* @version $Id: VNumber.java,v 1.41 2005/09/03 01:57:16 jjanke Exp $
public final class VNumber extends JComponent
implements VEditor, ActionListener, KeyListener, FocusListener
/** Number of Columns (12) */
public final static int SIZE = 12;
* IDE Bean Constructor
public VNumber()
this("Number", false, false, true, DisplayType.Number, "Number");
} // VNumber
* Create right aligned Number field.
* no popup, if WindowNo == 0 (for IDs)
* @param columnName column name
* @param mandatory mandatory
* @param isReadOnly read only
* @param isUpdateable updateable
* @param displayType display type
* @param title title
public VNumber(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable,
int displayType, String title)
super();
super.setName(columnName);
m_columnName = columnName;
m_title = title;
setDisplayType(displayType);
LookAndFeel.installBorder(this, "TextField.border");
this.setLayout(new BorderLayout());
// this.setPreferredSize(m_text.getPreferredSize()); // causes r/o to be the same length
// int height = m_text.getPreferredSize().height;
// setMinimumSize(new Dimension (30,height));
// *** Text ***
m_text.setBorder(null);
m_text.setHorizontalAlignment(JTextField.TRAILING);
m_text.addKeyListener(this);
m_text.addFocusListener(this);
// Background
setMandatory(mandatory);
this.add(m_text, BorderLayout.CENTER);
// *** Button ***
m_button.setIcon(Env.getImageIcon("Calculator10.gif"));
m_button.setMargin(new Insets(0, 0, 0, 0));
m_button.setFocusable(false);
m_button.addActionListener(this);
this.add (m_button, BorderLayout.EAST);
// Prefereed Size
this.setPreferredSize(this.getPreferredSize()); // causes r/o to be the same length
// Size
setColumns(SIZE, CComboBox.FIELD_HIGHT-4);
// ReadWrite
if (isReadOnly || !isUpdateable)
setReadWrite(false);
else
setReadWrite(true);
} // VNumber
* Dispose
public void dispose()
m_text = null;
m_button = null;
m_mField = null;
} // dispose
* Set Document
* @param doc document
protected void setDocument(Document doc)
m_text.setDocument(doc);
} // getDocument
private String m_columnName;
protected int m_displayType; // Currency / UoM via Context
private DecimalFormat m_format;
private String m_title;
private boolean m_setting;
private String m_oldText;
private String m_initialText;
private boolean m_rangeSet = false;
private Double m_minValue;
private Double m_maxValue;
private boolean m_modified = false;
/** The Field */
private CTextField m_text = new CTextField(SIZE); // Standard
/** The Button */
private CButton m_button = new CButton();
private MField m_mField = null;
/** Logger */
private static CLogger log = CLogger.getCLogger(VNumber.class);
* Set no of Columns
* @param columns columns
public void setColumns (int columns, int height)
m_text.setPreferredSize(null);
m_text.setColumns(columns);
Dimension size = m_text.getPreferredSize();
if (height > size.height) // default 16
size.height = height;
if (CComboBox.FIELD_HIGHT-4 > size.height)
size.height = VLookup.FIELD_HIGHT-4;
this.setPreferredSize(size); // causes r/o to be the same length
this.setMinimumSize(new Dimension (columns*10, size.height));
m_button.setPreferredSize(new Dimension(size.height, size.height));
} // setColumns
* Set Range with min & max
* @param minValue min value
* @param maxValue max value
* @return true, if accepted
public boolean setRange(Double minValue, Double maxValue)
m_rangeSet = true;
m_minValue = minValue;
m_maxValue = maxValue;
return m_rangeSet;
} // setRange
* Set Range with min & max = parse US style number w/o Gouping
* @param minValue min value
* @param maxValue max value
* @return true if accepted
public boolean setRange(String minValue, String maxValue)
if (minValue == null || maxValue == null)
return false;
try
m_minValue = Double.valueOf(minValue);
m_maxValue = Double.valueOf(maxValue);
catch (NumberFormatException nfe)
return false;
m_rangeSet = true;
return m_rangeSet;
} // setRange
* Set and check DisplayType
* @param displayType display type
public void setDisplayType (int displayType)
m_displayType = displayType;
if (!DisplayType.isNumeric(displayType))
m_displayType = DisplayType.Number;
m_format = DisplayType.getNumberFormat(displayType);
m_text.setDocument (new MDocNumber(displayType, m_format, m_text, m_title));
} // setDisplayType
* Set ReadWrite
* @param value value
public void setReadWrite (boolean value)
if (m_text.isReadWrite() != value)
m_text.setReadWrite(value);
if (m_button.isReadWrite() != value)
m_button.setReadWrite(value);
// Don't show button if not ReadWrite
if (m_button.isVisible() != value)
m_button.setVisible(value);
} // setReadWrite
* IsReadWrite
* @return true if rw
public boolean isReadWrite()
return m_text.isReadWrite();
} // isReadWrite
* Set Mandatory (and back bolor)
* @param mandatory mandatory
public void setMandatory (boolean mandatory)
m_text.setMandatory(mandatory);
} // setMandatory
* Is it mandatory
* @return true if mandatory
public boolean isMandatory()
return m_text.isMandatory();
} // isMandatory
* Set Background
* @param color color
public void setBackground(Color color)
m_text.setBackground(color);
} // setBackground
* Set Background
* @param error error
public void setBackground (boolean error)
m_text.setBackground(error);
} // setBackground
* Set Foreground
* @param fg foreground
public void setForeground(Color fg)
m_text.setForeground(fg);
} // setForeground
* Set Editor to value
* @param value value
public void setValue(Object value)
log.finest("Value=" + value);
if (value == null)
m_oldText = "";
else
m_oldText = m_format.format(value);
// only set when not updated here
if (m_setting)
return;
m_text.setText (m_oldText);
m_initialText = m_oldText;
m_modified = false;
} // setValue
* Property Change Listener
* @param evt event
public void propertyChange (PropertyChangeEvent evt)
if (evt.getPropertyName().equals(org.compiere.model.MField.PROPERTY))
setValue(evt.getNewValue());
} // propertyChange
* Return Editor value
* @return value value (big decimal or integer)
public Object getValue()
if (m_text == null || m_text.getText() == null || m_text.getText().length() == 0)
return null;
String value = m_text.getText();
// return 0 if text deleted
if (value == null || value.length() == 0)
if (!m_modified)
return null;
if (m_displayType == DisplayType.Integer)
return new Integer(0);
return Env.ZERO;
if (value.equals(".") || value.equals(",") || value.equals("-"))
value = "0";
try
Number number = m_format.parse(value);
value = number.toString(); // converts it to US w/o thousands
BigDecimal bd = new BigDecimal(value);
if (m_displayType == DisplayType.Integer)
return new Integer(bd.intValue());
if (bd.signum() == 0)
return bd;
return bd.setScale(m_format.getMaximumFractionDigits(), BigDecimal.ROUND_HALF_UP);
catch (Exception e)
log.log(Level.SEVERE, "Value=" + value, e);
if (m_displayType == DisplayType.Integer)
return new Integer(0);
return Env.ZERO;
} // getValue
* Return Display Value
* @return value
public String getDisplay()
return m_text.getText();
} // getDisplay
* Get Title
* @return title
public String getTitle()
return m_title;
} // getTitle
* Plus - add one.
* Also sets Value
* @return new value
public Object plus()
Object value = getValue();
if (value == null)
if (m_displayType == DisplayType.Integer)
value = new Integer(0);
else
value = Env.ZERO;
// Add
if (value instanceof BigDecimal)
value = ((BigDecimal)value).add(Env.ONE);
else
value = new Integer(((Integer)value).intValue() + 1);
setValue(value);
return value;
} // plus
* Minus - subtract one, but not below minimum.
* Also sets Value
* @param minimum minimum
* @return new value
public Object minus (int minimum)
Object value = getValue();
if (value == null)
if (m_displayType == DisplayType.Integer)
value = new Integer(minimum);
else
value = new BigDecimal(minimum);
setValue(value);
return value;
// Subtract
if (value instanceof BigDecimal)
BigDecimal bd = ((BigDecimal)value).subtract(Env.ONE);
BigDecimal min = new BigDecimal(minimum);
if (bd.compareTo(min) < 0)
value = min;
else
value = bd;
else
int i = ((Integer)value).intValue();
i--;
if (i < minimum)
i = minimum;
value = new Integer(i);
setValue(value);
return value;
} // minus
* Action Listener
* @param e event
public void actionPerformed (ActionEvent e)
log.config(e.getActionCommand());
if (ValuePreference.NAME.equals(e.getActionCommand()))
if (MRole.getDefault().isShowPreference())
ValuePreference.start (m_mField, getValue());
return;
if (e.getSource() == m_button)
m_button.setEnabled(false);
String str = startCalculator(this, m_text.getText(), m_format, m_displayType, m_title);
m_text.setText(str);
m_button.setEnabled(true);
try
fireVetoableChange (m_columnName, m_oldText, getValue());
catch (PropertyVetoException pve) {}
m_text.requestFocus();
} // actionPerformed
* Key Listener Interface
* @param e event
public void keyTyped(KeyEvent e) {}
public void keyPressed(KeyEvent e) {}
* Key Listener.
* - Escape - Restore old Text
* - firstChange - signal change
* @param e event
public void keyReleased(KeyEvent e)
log.finest("Key=" + e.getKeyCode() + " - " + e.getKeyChar()
+ " -> " + m_text.getText());
// ESC
if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
m_text.setText(m_initialText);
m_modified = true;
m_setting = true;
try
if (e.getKeyCode() == KeyEvent.VK_ENTER) // 10
fireVetoableChange (m_columnName, m_oldText, getValue());
fireActionPerformed();
else // indicate change
fireVetoableChange (m_columnName, m_oldText, null);
catch (PropertyVetoException pve) {}
m_setting = false;
} // keyReleased
* Focus Gained
* @param e event
public void focusGained (FocusEvent e)
if (m_text != null)
m_text.selectAll();
} // focusGained
* Data Binding to MTable (via GridController.vetoableChange).
* @param e event
public void focusLost (FocusEvent e)
// log.finest(e.toString());
// APanel - Escape
if (e.getOppositeComponent() instanceof AGlassPane)
m_text.setText(m_initialText);
return;
try
fireVetoableChange (m_columnName, m_initialText, getValue());
fireActionPerformed();
catch (PropertyVetoException pve) {}
} // focusLost
* Invalid Entry - Start Calculator
* @param jc parent
* @param value value
* @param format format
* @param displayType display type
* @param title title
* @return value
public static String startCalculator(Container jc, String value,
DecimalFormat format, int displayType, String title)
log.config("Value=" + value);
BigDecimal startValue = new BigDecimal(0.0);
try
if (value != null && value.length() > 0)
Number number = format.parse(value);
startValue = new BigDecimal (number.toString());
catch (ParseException pe)
log.info("InvalidEntry - " + pe.getMessage());
// Find frame
Frame frame = Env.getFrame(jc);
// Actual Call
Calculator calc = new Calculator(frame, title,
displayType, format, startValue);
AEnv.showCenterWindow(frame, calc);
BigDecimal result = calc.getNumber();
log.config( "Result=" + result);
calc = null;
if (result != null)
return format.format(result);
else
return value; // original value
} // startCalculator
* Set Field/WindowNo for ValuePreference
* @param mField field
public void setField (MField mField)
m_mField = mField;
if (m_mField != null
&& MRole.getDefault().isShowPreference())
ValuePreference.addMenu (this, popupMenu);
} // setField
* Remove Action Listner
* @param l Action Listener
public void removeActionListener(ActionListener l)
listenerList.remove(ActionListener.class, l);
} // removeActionListener
* Add Action Listner
* @param l Action Listener
public void addActionListener(ActionListener l)
listenerList.add(ActionListener.class, l);
} // addActionListener
* Fire Action Event to listeners
protected void fireActionPerformed()
int modifiers = 0;
AWTEvent currentEvent = EventQueue.getCurrentEvent();
if (currentEvent instanceof InputEvent)
modifiers = ((InputEvent)currentEvent).getModifiers();
else if (currentEvent instanceof ActionEvent)
modifiers = ((ActionEvent)currentEvent).getModifiers();
ActionEvent ae = new ActionEvent (this, ActionEvent.ACTION_PERFORMED,
"VNumber", EventQueue.getMostRecentEventTime(), modifiers);
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
// Process the listeners last to first, notifying those that are interested in this event
for (int i = listeners.length-2; i>=0; i-=2)
if (listeners==ActionListener.class)
((ActionListener)listeners[i+1]).actionPerformed(ae);
} // fireActionPerformed
} // VNumberIf getValue() returns null, you need to trace the execution of the code and figure out which sequence of code is leading to the return of null. This method looks complex - a lot of if statements. If you do not have a debugger, put System.out.println statements inside the method to figure out what's going on.
-
TREE --Context binding of property TEXT cannot be resolved:
I have the following Error
Adapter error in &VIEW_ELEMENT_TYPE& "OBJID" of view "YFIDOA_YEAR_EVAL.MAIN": Context binding of property TEXT cannot be resolved: Node MAIN.1.TREE_NODE.1.MAIN_ORGEH.1.ORGEH.1.PERNR does not contain any elements
Requirement
I have two group ( TREE section , Detailed Section )
Tree Section have a 4 Top Org Units loaded initially when clicking on each Top org, it expands as a Tree and goes deep strucure. No trouble in populating Tree,
when I bind the Text element in the Detailed section with the PERNR, I get the Above Error.
Configuration & Code
All cardinalities are 0..N, initailization Lead selection is set for all the NODES.
TREE_NODE > MAIN_ORGEH > ORGEH > PERNR > OBJEC
Main_ORGEH has ORGEH, the attribute TOP_ORG and the SUpply function GET_MAIN_ORGEH
ORGEH has PERNR, attribute OBJID and the Supply function GET_ORGEH.
PERNR has OBJEC structure , attributes PERNR, CALC_AMT, ENAME and supply Function GET_PERNR
OBJEC has the structure objec strucutre
Question
I dont understand why PERNR > Pernr is not being read ? why is it telling me it is empty?
Any suggestions ?The testing Org unit does not have any pernrs , as a result it was not allowing NULL values at the NODE PERNR level ( though NULL VALUE for the PERNR attribute is set).
On passing some dummy values, the Error is cleared.
I was even populating the Chief of the Org values as default to avoid NULL Values. -
Component Creation - how to work the VALUE property
Hey all,
Have an 80% working component to solve one of my problems (reference http://swforum.sun.com/jive/thread.jspa?threadID=53379&tstart=30, yeah not much there ;-).
*Taglib class
*TLD
*Component class
*faces-config.xml
*Renderer
DT:
*sun-faces-config.xml
*BeanInfoBase classes generated with Rave tools.
Now, my problem is I want to pass the value/data from one object to my object (bind the data). I'm not having much success with this one piece. Can anyone point me to an example or show an example of how to pass **value** property in such a way that the data from, say a textbox, can be shown all the way through to the Renderer?
A full example would be best, I've added the value attribute into the TLD, and is-bindable in the sun-faces-config, and various coding attempts but still missing some pieces.
p.s. yes, I've examined the calendar example, the datedisplayer/datepicker example, and half a dozen other ones...still looking :-)
thanks!
-DIn case I'm not making it clear:
Creating a custom component. I want to bind to a database field, a bean field, or to another JSF component the data. The only way I have found to 'bind' is through the value property located in Java Studio Creator (i.e., you click on the ... or the arrow beside 'value' for the object, and you can select what you want to bind).
How does one take that 'value' bound information and show the real value in the Renderer class?
example:
Bind custom-object 'value property' to an HtmlTextInputBox that has the value "This is a test".
Render "this is a test" or whatever is entered in the text box to the webpage with the custom-object.
Bind custom-object 'value property' to a Sessionbean property called 'myNum'.
Render the value of 'myNum' to the webpage with the custom-object.
Bind custom-object 'value property' to the field 'mydbdata' in a database.
Render the value of mydbdata to the webpage with the custom-object.
USECASE:
Starting with the tld, how does one accomplish this 'complex' feat?
*TLD
*Taglib class
*faces-config.xml
*component class
*renderer class
so the end result is:
RENDERER:
encodeEnd(....
writer.write("my bound value is: " + howtogettheboundvalue);
... -
I can't change the values in Property Palette
I am working with Report Builder 3.0.5.17
I generated a report layout with the wizard ;altough i set the width of the fields to certain dimensions (30 or 15),in the Property Palete it is diffrent(4000! or other and the most important thing : i can't change it! When i run the report, i get no data, it's empty! (i verified the interogation with Toad and everithing's fine)
What could be the problem?
Thanks!Hi,
I'm quoting from Reports Builder Help:
The Width property specifies the maximum number of characters that the values of the column can occupy. This Width refers to the width that Reports Builder uses internally for the column. It affects such things as the calculation of summaries and formulas. The size used to display the column's data, however, is determined by the size of the associated field in the Paper Layout view and its Vertical Elasticity and Horizontal Elasticity properties.
If the Column Type is Database Scalar and the Datatype is Character, Date, Number, or Raw, Width is uneditable. However, this does not mean you cannot control the width of the column's values in the report output. You can change the width of the values in the output by modifying the field's width in the Paper Layout or the Field properties.
About the report not containing any data, there could be several reasons:
Make sure that the physical width of the columns is enough to display the values. Tyry changing the values for Horizontal / Vertical Elasticity in the property inspector.
Also check the vertical / horizontal elasticity of the frame / repeating frame surrounding the field.
Make sure that you are connecting to the DB with the correct username.
Navneet. -
Error in Process u2013 PO cannot be reduced to the value already invoiced.
Hi,
i need some idea abt this.
the requirement is provide an error message when ordered qty and price is lower than invoiced qty and price and PO cannot be changed.
A New RFC is required to fetch the values of Invoiced Quantity and Invoiced Amount taking Purchase Order Number as input. In order to make it simpler, make use of logic available in FMu2019s BBP_PO_GETDETAIL and BBP_PO_GETITEMS else use the same FM inside the RFC.
At first, check whether the PO is a Service or Goods PO. Call the RFC inside the BAdi at PO level and pass the PO Number. The RFC will then return you with Invoiced Quantity and Invoiced Amount.
Validate this Invoiced Qty and Amt with current values user has entered. If ordered qty and amt is lower than invoiced qty and amt, error should be created and PO cannot be changed.
Can anyone suggest how i should approach regarding this issue.
Thanks in Advance.Hi ,
Find out exact user-exit or BADI for the solution.
Thanks,
Archana. -
I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.
===Answer===
Comment on usual method and solution, by a forum Moderator.
As long as there are no confounding factors, such as certain extensions, or a user.jsfile the procedure is as follows
# Open a new tab and type "about:config" in the address bar.
# In the Search bar type: "newtab"
# Locate and double click "browser.newtab.url"
# In the "Enter String Value" box change "'''about:newtab'''" to "'''about:blank'''" and click OK.
# Verify that the value has changed and now all new tabs will be blank.
See post under by ''pirate048'' [/questions/976589?page=2#answer-509482] ~J99Have to say that I rather agree with Mark..all we want is a simple, unadorned clean page that doe not track and show usage!! WHY NOT!! Is it too simple for developers..we aren't all (nor do we want to be!) software experts! Come on Mozilla..tidy up and clean up..it might be a quicker programme too!!
-
I am experiencing issue with my SharePoint site , when I am trying to add new Item in List . Error given below :--> 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 SharePoint Server Logging Correlation Data 9gc5 Verbose Thread change; resetting trace
level override to 0; resetting correlation to e2e9cddc-cf35-4bf8-b4f3-021dc91642da c66c2c17-faaf-4ff9-a414-303aa4b4726b e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 Document Management Server Document Management 52od
Medium MetadataNavigationContext Page_InitComplete: No XsltListViewWebPart was found on this page[/sites/00003/Lists/PM%20Project%20Status/NewForm.aspx?RootFolder=&IsDlg=1]. Hiding key filters and downgrading tree functionality to legacy ListViewWebPart(v3)
level for this list. e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.17 w3wp.exe (0x1B94) 0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Starting correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.17 w3wp.exe (0x1B94)
0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Ending correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.31 w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High System.Data.SqlClient.SqlException: Cannot insert
the value NULL into column 'tp_DocId', table 'Content_SP_00003.dbo.AllUserData'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavi... e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015
08:23:36.31* w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High ...or runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream,
Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand
command, CommandBehavior behavior,Are you trying to setup P2P? Could you explain the process you followed completely? By anychance you create the backup and then created the publication?
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com -
How can I get the value of a custom property from a resource object?
I am trying to get the value(s) of a custom property, called "status" within a method. The method has an object of type IResource available to it.
I have tried the following:
PropertyName propName = new PropertyName("","status");
value = res.getProperty(propName).toString();
However, I am getting a NullPointerException when I try to create the PropertyName instance.
Is there a better way to get the value of a specific property from a resource object?
Thanks,
TomThanks Praveen.
I was missing the default namespace of "http://sapportals.com/xmlns/cm" - I thought I could just pass an empty string for the namespace, but it looks like I must always specifiy, even if it is default.
Tom -
Custom Manage Property does not pick up the value from mapping crawl property
Hi All,
I have created a custom list with the column name that's called "category".
Then I ran full crawl and I saw the "ows_category" crawl property is created.
Then I create the manage property names as "Category" and map with the "ows_category" and run the full crawl again. (Retrivable, Searchable, Refinable options are checked)
After full crawl, I searched Category:keyword but it returned 0 result.
But when I search keyword, that list item is retuned
I tried to debug with the spsearch2013 tool and there is no "Category" manage property in the return XML.
It seems the Manage Property does not pick up value from the crawl property. (Something might be wrong with the index schema)
Do you have any suggestion?
Do I need to reset the index?
Best Regards,
AndyHi Andy,
When you search ‘category’ in crawled properties(Central Administration->Search Service Application->Search Schema), you will see ows_Category is mapped to DiscussionCategory, like the screenshot:
So, I suggest you create a new column using another name, then test again, compare the result.
Best Regards,
Wendy
Wendy Li
TechNet Community Support
Maybe you are looking for
-
Can't get my site online - Help! please?
I initially built my site with Yahoo Sitebuilder but I hate it so I decided I would finally learn how to use Dreamweaver. I'm figuring it out as I go and now I'm finally done and ready to go live...just one big problem...I can't get it online! When I
-
I just downloaded the latest version of iTunes today, and when I try to open it the application freezes. It shows up in my running processes on my computer, but it does not actually open. I have repaired the install as well as uninstalled/reinstalled
-
Cant sign in to use find my iphone on pc?
This is what my computer says "iCloud has stopped responding. An error has prevented this application from working properly. Help Apple improve its products by sending us diagnostic and usage informaiton about iCloud. So I send to apple and try and r
-
Hi. I would like to get some feedback regarding using Test Stand with Labview. Currently I am using Delphi Interface as my Excecutive Engine and Active X server to communicate with labview. The data logging, PLC I/O and Login/logout are part of Delph
-
Email link in a dynamic text field
I have a paragraph of scrollable dynamic text. I need to add an email link to one of the sentences. Is this possible? I can't make the line a button in the dynamic text paragraph. Can anyone help please.