Skip to content

Commit

Permalink
#93, 94 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuflatland-lf committed Dec 13, 2019
1 parent 5558e6f commit 97b095d
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jar {
manifest {
attributes(
"Bundle-SymbolicName": "com.liferay.damascus.cli",
"Bundle-Version": "1.1.3",
"Bundle-Version": "1.1.4",
"Bundle-Description": "Liferay extension tool for scaffolding service builder portlet",
"Main-Class": "com.liferay.damascus.cli.Damascus",
"JPM-Command": "damascus"
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/liferay/damascus/cli/Damascus.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Slf4j
public class Damascus {

public final static String VERSION = "1.1.3";// + "_" + LocalDateTime.now().toString();
public final static String VERSION = "1.1.4";// + "_" + LocalDateTime.now().toString();

/**
* Main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
/* </dmsc:sync> */

entry.set${application.asset.assetTitleFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}TitleName"));
ParamUtil.getString(request, "${application.asset.assetTitleFieldName}"));
entry.set${application.asset.assetSummaryFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}SummaryName"));
ParamUtil.getString(request, "${application.asset.assetSummaryFieldName}"));

entry.setCompanyId(themeDisplay.getCompanyId());
entry.setGroupId(themeDisplay.getScopeGroupId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280 entry-body">
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/7.2/Portlet_XXXXWEB_view.jsp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ public class ${capFirstModel}LocalServiceImpl extends ${capFirstModel}LocalServi
/* </dmsc:sync> */

entry.set${application.asset.assetTitleFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}TitleName"));
ParamUtil.getString(request, "${application.asset.assetTitleFieldName}"));
entry.set${application.asset.assetSummaryFieldName?cap_first}(
ParamUtil.getString(request, "${lowercaseModel}SummaryName"));
ParamUtil.getString(request, "${application.asset.assetSummaryFieldName}"));

entry.setCompanyId(themeDisplay.getCompanyId());
entry.setGroupId(themeDisplay.getScopeGroupId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280 entry-body">
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/templates/7.2/Portlet_XXXXWEB_view.jsp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SimpleDateFormat dateTimeFormat = new SimpleDateFormat(datetimeFormatVal);
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ String redirect = ParamUtil.getString(request, "redirect");
boolean fromAsset = ParamUtil.getBoolean(request, "fromAsset", false);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

<#list application.fields as field >
<#if field.validation?? && field.validation.className??>
<#assign capFirstValidationModel = "${field.validation.className?cap_first}">
<#assign uncapFirstValidationModel = "${field.validation.className?uncap_first}">
<#assign uppercaseValidationModel = "${field.validation.className?upper_case}">
${capFirstValidationModel}LocalService ${uncapFirstValidationModel}LocalService = (${capFirstValidationModel}LocalService) request
.getAttribute(${capFirstModel}WebKeys.${uppercaseValidationModel}_LOCAL_SERVICE);
</#if>
</#list>
%>

<div class="container-fluid-1280">
Expand Down

0 comments on commit 97b095d

Please sign in to comment.