[ 
https://issues.apache.org/jira/browse/OFBIZ-7184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15318308#comment-15318308
 ] 

Deepak Dixit edited comment on OFBIZ-7184 at 6/7/16 11:23 AM:
--------------------------------------------------------------

Hi [~pandeypranay], 

I think condition is correct, we can pass dataSourceId while create (like 
createProduct) if dataSourceId is passed in create mode then it should be 
display as readonly. 

Actual issue is different, after returning error dataSourceId was not null, its 
an empty string. Due to this empty string null check condition is failing.

Please use following condition its working, but need to dig into framework 
level why its return empty string instead of null

{code}
<field use-when="dataSource!=null" name="dataSourceId" 
title="${uiLabelMap.DataSourceDataSourceId}"><display/></field>
        <field use-when="${groovy: 
dataSource==null&amp;&amp;org.ofbiz.base.util.UtilValidate.isEmpty(dataSourceId)}"
 name="dataSourceId" 
title="${uiLabelMap.DataSourceDataSourceId}"><text/></field>
        <field use-when="${groovy: 
dataSource==null&amp;&amp;!org.ofbiz.base.util.UtilValidate.isEmpty(dataSourceId)}"
 name="dataSourceId" title="${uiLabelMap.DataSourceDataSourceId}" 
tooltip="${uiLabelMap.CommonCannotBeFound}: 
[${dataSourceId}]"><display/></field>
{code}


was (Author: deepak.dixit):
Hi Pranay, 

I think condition is correct, we can pass dataResouceId while create (like 
createProduct) if dataResouceId is passed in create mode then it should be 
display as readonly. 

Actual issue is different, after returning error dataResourceId was not null, 
its an empty string. Due to this empty string null check condition is failing.

Please use following condition its working, but need to dig into framework 
level why its return empty string instead of null

{code}
<field use-when="dataSource!=null" name="dataSourceId" 
title="${uiLabelMap.DataSourceDataSourceId}"><display/></field>
        <field use-when="${groovy: 
dataSource==null&amp;&amp;org.ofbiz.base.util.UtilValidate.isEmpty(dataSourceId)}"
 name="dataSourceId" 
title="${uiLabelMap.DataSourceDataSourceId}"><text/></field>
        <field use-when="${groovy: 
dataSource==null&amp;&amp;!org.ofbiz.base.util.UtilValidate.isEmpty(dataSourceId)}"
 name="dataSourceId" title="${uiLabelMap.DataSourceDataSourceId}" 
tooltip="${uiLabelMap.CommonCannotBeFound}: 
[${dataSourceId}]"><display/></field>
{code}

> 'Data Source Id' should be editable/visible on error view screen of 
> createDataSource
> ------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-7184
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7184
>             Project: OFBiz
>          Issue Type: Bug
>          Components: marketing
>    Affects Versions: Trunk
>            Reporter: Chandan Khandelwal
>            Assignee: Vaibhav Jain
>         Attachments: screenshot-1.png
>
>
> Steps to regenerate the issue-
> # Go to https://localhost:8443/marketing/control/main
> # Click on sub-menu DataSource
> # Click on create data source
> # Click "Save" without filling input fields
> # Instead of input field, label is shown Could not be found: []
> (Please refer screenshot for more details)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to