iDempiere IDEMPIERE-234 Configure Toolbar.
This commit is contained in:
parent
44d6da7dd8
commit
c9c663dfa9
|
@ -1970,4 +1970,9 @@ public class GridField
|
||||||
return m_vo.NumLines;
|
return m_vo.NumLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isToolbarButton()
|
||||||
|
{
|
||||||
|
return m_vo.displayType == DisplayType.Button && m_vo.IsToolbarButton;
|
||||||
|
}
|
||||||
|
|
||||||
} // MField
|
} // MField
|
||||||
|
|
|
@ -204,6 +204,8 @@ public class GridFieldVO implements Serializable
|
||||||
vo.ColumnSpan=rs.getInt(i);
|
vo.ColumnSpan=rs.getInt(i);
|
||||||
else if (columnName.equalsIgnoreCase("NumLines"))
|
else if (columnName.equalsIgnoreCase("NumLines"))
|
||||||
vo.NumLines=rs.getInt(i);
|
vo.NumLines=rs.getInt(i);
|
||||||
|
else if (columnName.equalsIgnoreCase("IsToolbarButton"))
|
||||||
|
vo.IsToolbarButton = "Y".equals(rs.getString(i));
|
||||||
}
|
}
|
||||||
if (vo.Header == null)
|
if (vo.Header == null)
|
||||||
vo.Header = vo.ColumnName;
|
vo.Header = vo.ColumnName;
|
||||||
|
@ -537,6 +539,8 @@ public class GridFieldVO implements Serializable
|
||||||
public boolean IsAutocomplete = false;
|
public boolean IsAutocomplete = false;
|
||||||
/* Allow copy - IDEMPIERE-67 - Carlos Ruiz - globalqss */
|
/* Allow copy - IDEMPIERE-67 - Carlos Ruiz - globalqss */
|
||||||
public boolean IsAllowCopy = false;
|
public boolean IsAllowCopy = false;
|
||||||
|
/** Toolbar Button **/
|
||||||
|
public boolean IsToolbarButton = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Context including contained elements
|
* Set Context including contained elements
|
||||||
|
|
|
@ -480,6 +480,19 @@ public interface I_AD_Column
|
||||||
*/
|
*/
|
||||||
public String getIsSyncDatabase();
|
public String getIsSyncDatabase();
|
||||||
|
|
||||||
|
/** Column name IsToolbarButton */
|
||||||
|
public static final String COLUMNNAME_IsToolbarButton = "IsToolbarButton";
|
||||||
|
|
||||||
|
/** Set Toolbar Button.
|
||||||
|
* Add the column button to the toolbar
|
||||||
|
*/
|
||||||
|
public void setIsToolbarButton (boolean IsToolbarButton);
|
||||||
|
|
||||||
|
/** Get Toolbar Button.
|
||||||
|
* Add the column button to the toolbar
|
||||||
|
*/
|
||||||
|
public boolean isToolbarButton();
|
||||||
|
|
||||||
/** Column name IsTranslated */
|
/** Column name IsTranslated */
|
||||||
public static final String COLUMNNAME_IsTranslated = "IsTranslated";
|
public static final String COLUMNNAME_IsTranslated = "IsTranslated";
|
||||||
|
|
||||||
|
@ -556,6 +569,19 @@ public interface I_AD_Column
|
||||||
*/
|
*/
|
||||||
public int getSeqNo();
|
public int getSeqNo();
|
||||||
|
|
||||||
|
/** Column name SeqNoSelection */
|
||||||
|
public static final String COLUMNNAME_SeqNoSelection = "SeqNoSelection";
|
||||||
|
|
||||||
|
/** Set Selection Column Sequence.
|
||||||
|
* Selection Column Sequence
|
||||||
|
*/
|
||||||
|
public void setSeqNoSelection (int SeqNoSelection);
|
||||||
|
|
||||||
|
/** Get Selection Column Sequence.
|
||||||
|
* Selection Column Sequence
|
||||||
|
*/
|
||||||
|
public int getSeqNoSelection();
|
||||||
|
|
||||||
/** Column name Updated */
|
/** Column name Updated */
|
||||||
public static final String COLUMNNAME_Updated = "Updated";
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
|
|
@ -205,10 +205,18 @@ public class MColumn extends X_AD_Column
|
||||||
else if (DisplayType.isDate (displayType))
|
else if (DisplayType.isDate (displayType))
|
||||||
setFieldLength(7);
|
setFieldLength(7);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.saveError("FillMandatory", Msg.getElement(getCtx(), "FieldLength"));
|
log.saveError("FillMandatory", Msg.getElement(getCtx(), "FieldLength"));
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (displayType != DisplayType.Button)
|
||||||
|
{
|
||||||
|
if (isToolbarButton())
|
||||||
|
{
|
||||||
|
setIsToolbarButton(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Views are not updateable
|
/** Views are not updateable
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20110918L;
|
private static final long serialVersionUID = 20121019L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_AD_Column (Properties ctx, int AD_Column_ID, String trxName)
|
public X_AD_Column (Properties ctx, int AD_Column_ID, String trxName)
|
||||||
|
@ -60,6 +60,8 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
||||||
setIsMandatory (false);
|
setIsMandatory (false);
|
||||||
setIsParent (false);
|
setIsParent (false);
|
||||||
setIsSelectionColumn (false);
|
setIsSelectionColumn (false);
|
||||||
|
setIsToolbarButton (true);
|
||||||
|
// Y
|
||||||
setIsTranslated (false);
|
setIsTranslated (false);
|
||||||
setIsUpdateable (true);
|
setIsUpdateable (true);
|
||||||
// Y
|
// Y
|
||||||
|
@ -742,6 +744,30 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
||||||
return (String)get_Value(COLUMNNAME_IsSyncDatabase);
|
return (String)get_Value(COLUMNNAME_IsSyncDatabase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Toolbar Button.
|
||||||
|
@param IsToolbarButton
|
||||||
|
Add the column button to the toolbar
|
||||||
|
*/
|
||||||
|
public void setIsToolbarButton (boolean IsToolbarButton)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_IsToolbarButton, Boolean.valueOf(IsToolbarButton));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Toolbar Button.
|
||||||
|
@return Add the column button to the toolbar
|
||||||
|
*/
|
||||||
|
public boolean isToolbarButton ()
|
||||||
|
{
|
||||||
|
Object oo = get_Value(COLUMNNAME_IsToolbarButton);
|
||||||
|
if (oo != null)
|
||||||
|
{
|
||||||
|
if (oo instanceof Boolean)
|
||||||
|
return ((Boolean)oo).booleanValue();
|
||||||
|
return "Y".equals(oo);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Translated.
|
/** Set Translated.
|
||||||
@param IsTranslated
|
@param IsTranslated
|
||||||
This column is translated
|
This column is translated
|
||||||
|
@ -858,6 +884,26 @@ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Set Selection Column Sequence.
|
||||||
|
@param SeqNoSelection
|
||||||
|
Selection Column Sequence
|
||||||
|
*/
|
||||||
|
public void setSeqNoSelection (int SeqNoSelection)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_SeqNoSelection, Integer.valueOf(SeqNoSelection));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Selection Column Sequence.
|
||||||
|
@return Selection Column Sequence
|
||||||
|
*/
|
||||||
|
public int getSeqNoSelection ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNoSelection);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Max. Value.
|
/** Set Max. Value.
|
||||||
@param ValueMax
|
@param ValueMax
|
||||||
Maximum Value for a field
|
Maximum Value for a field
|
||||||
|
|
Loading…
Reference in New Issue