mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Split fieldNameToLabel out into a method
This commit is contained in:
@ -332,14 +332,7 @@ public class QInstanceEnricher
|
|||||||
{
|
{
|
||||||
if(!StringUtils.hasContent(field.getLabel()))
|
if(!StringUtils.hasContent(field.getLabel()))
|
||||||
{
|
{
|
||||||
if(configRemoveIdFromNameWhenCreatingPossibleValueFieldLabels && StringUtils.hasContent(field.getPossibleValueSourceName()) && field.getName() != null && field.getName().endsWith("Id"))
|
fieldNameToLabel(field);
|
||||||
{
|
|
||||||
field.setLabel(nameToLabel(field.getName().substring(0, field.getName().length() - 2)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
field.setLabel(nameToLabel(field.getName()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
@ -381,6 +374,23 @@ public class QInstanceEnricher
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void fieldNameToLabel(QFieldMetaData field)
|
||||||
|
{
|
||||||
|
if(configRemoveIdFromNameWhenCreatingPossibleValueFieldLabels && StringUtils.hasContent(field.getPossibleValueSourceName()) && field.getName() != null && field.getName().endsWith("Id"))
|
||||||
|
{
|
||||||
|
field.setLabel(nameToLabel(field.getName().substring(0, field.getName().length() - 2)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
field.setLabel(nameToLabel(field.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
Reference in New Issue
Block a user