[JBoss JIRA] (FORGE-1787) When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1787?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov edited comment on FORGE-1787 at 5/13/14 4:48 PM:
-----------------------------------------------------------------
I think I found where to fix both issues. It's actually at one place: EntityWidgetBuilder::getTargetDir method. Unfortunately I don't know how to bring the web root there. The code in FacesScaffoldProfider gets it from ScaffoldGenerationContext. But I didn't see how I can get that in the EntityWidgetBuilder. Any ideas?
was (Author: ivan_stefanov):
I thin I found where to fix both issues. It's actually at one place: EntityWidgetBuilder::getTargetDir method. Unfortunately I don't know how to bring the web root there. The code in FacesScaffoldProfider gets it from ScaffoldGenerationContext. But I didn't see how I can get that in the EntityWidgetBuilder. Any ideas?
> When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
> --------------------------------------------------------------------------------------------
>
> Key: FORGE-1787
> URL: https://issues.jboss.org/browse/FORGE-1787
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Blocker
> Fix For: 2.5.1.Final
>
>
> When scaffolding a JSF application, without using a {{--webRoot}} parameter, the navigation in the {{pageTemplate.xhtml}} works as expected :
> {code}
> scaffold-setup ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template navigation looks like :
> {code}
> <ul>
> <li>
> <h:link outcome="/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> But if I specify the {{--webRoot}} parameter, then the navigation does not work as there is a {{/}} missing :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template :
> {code}
> <ul>
> <li>
> <h:link outcome="admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The correct navigation would be :
> {code}
> <ul>
> <li>
> <h:link outcome="/admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The only way to make it work is to add a {{/}} to the {{webroot}}, which is not very intuitive :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> But this trick doesn't work for the {{search.xhtml}} page. The generated code is :
> {code}
> <h:link outcome="/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
> The {{outcome}} is not right, and should contain a {{/admin}}
> {code}
> <h:link outcome="/admin/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1787) When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1787?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov commented on FORGE-1787:
----------------------------------------
I thin I found where to fix both issues. It's actually at one place: EntityWidgetBuilder::getTargetDir method. Unfortunately I don't know how to bring the web root there. The code in FacesScaffoldProfider gets it from ScaffoldGenerationContext. But I didn't see how I can get that in the EntityWidgetBuilder. Any ideas?
> When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
> --------------------------------------------------------------------------------------------
>
> Key: FORGE-1787
> URL: https://issues.jboss.org/browse/FORGE-1787
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Blocker
> Fix For: 2.5.1.Final
>
>
> When scaffolding a JSF application, without using a {{--webRoot}} parameter, the navigation in the {{pageTemplate.xhtml}} works as expected :
> {code}
> scaffold-setup ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template navigation looks like :
> {code}
> <ul>
> <li>
> <h:link outcome="/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> But if I specify the {{--webRoot}} parameter, then the navigation does not work as there is a {{/}} missing :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template :
> {code}
> <ul>
> <li>
> <h:link outcome="admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The correct navigation would be :
> {code}
> <ul>
> <li>
> <h:link outcome="/admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The only way to make it work is to add a {{/}} to the {{webroot}}, which is not very intuitive :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> But this trick doesn't work for the {{search.xhtml}} page. The generated code is :
> {code}
> <h:link outcome="/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
> The {{outcome}} is not right, and should contain a {{/admin}}
> {code}
> <h:link outcome="/admin/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1787) When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
by Ivan St. Ivanov (JIRA)
[ https://issues.jboss.org/browse/FORGE-1787?page=com.atlassian.jira.plugin... ]
Ivan St. Ivanov reassigned FORGE-1787:
--------------------------------------
Assignee: Ivan St. Ivanov (was: George Gastaldi)
> When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
> --------------------------------------------------------------------------------------------
>
> Key: FORGE-1787
> URL: https://issues.jboss.org/browse/FORGE-1787
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ivan St. Ivanov
> Priority: Blocker
> Fix For: 2.5.1.Final
>
>
> When scaffolding a JSF application, without using a {{--webRoot}} parameter, the navigation in the {{pageTemplate.xhtml}} works as expected :
> {code}
> scaffold-setup ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template navigation looks like :
> {code}
> <ul>
> <li>
> <h:link outcome="/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> But if I specify the {{--webRoot}} parameter, then the navigation does not work as there is a {{/}} missing :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template :
> {code}
> <ul>
> <li>
> <h:link outcome="admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The correct navigation would be :
> {code}
> <ul>
> <li>
> <h:link outcome="/admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The only way to make it work is to add a {{/}} to the {{webroot}}, which is not very intuitive :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> But this trick doesn't work for the {{search.xhtml}} page. The generated code is :
> {code}
> <h:link outcome="/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
> The {{outcome}} is not right, and should contain a {{/admin}}
> {code}
> <h:link outcome="/admin/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1787) When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1787?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1787:
----------------------------------------
Fixed the pageTemplate.xhtml issue. Working on {{search.xhtml}} and {{view.xhtml}} now
> When scaffolding with --webRoot parameter, pageTemplate.xhtml and search.xhtml are not right
> --------------------------------------------------------------------------------------------
>
> Key: FORGE-1787
> URL: https://issues.jboss.org/browse/FORGE-1787
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Priority: Blocker
> Fix For: 2.5.1.Final
>
>
> When scaffolding a JSF application, without using a {{--webRoot}} parameter, the navigation in the {{pageTemplate.xhtml}} works as expected :
> {code}
> scaffold-setup ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template navigation looks like :
> {code}
> <ul>
> <li>
> <h:link outcome="/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> But if I specify the {{--webRoot}} parameter, then the navigation does not work as there is a {{/}} missing :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> The template :
> {code}
> <ul>
> <li>
> <h:link outcome="admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The correct navigation would be :
> {code}
> <ul>
> <li>
> <h:link outcome="/admin/CD/search" value="CD"/>
> </li>
> <li>
> <h:link outcome="/admin/author/search" value="Author"/>
> </li>
> </ul>
> {code}
> The only way to make it work is to add a {{/}} to the {{webroot}}, which is not very intuitive :
> {code}
> scaffold-setup ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.Author ;
> scaffold-generate --webRoot /admin --targets org.agoncal.training.javaee6adv.model.CD ;
> {code}
> But this trick doesn't work for the {{search.xhtml}} page. The generated code is :
> {code}
> <h:link outcome="/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
> The {{outcome}} is not right, and should contain a {{/admin}}
> {code}
> <h:link outcome="/admin/genre/view">
> <f:param name="id" value="#{_item.id}"/>
> <h:outputText id="itemName" value="#{_item.name}"/>
> </h:link>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1814) UISelectOne and UISelectMany's getValueChoices() should never return null
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1814?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1814.
----------------------------------
Resolution: Done
> UISelectOne and UISelectMany's getValueChoices() should never return null
> -------------------------------------------------------------------------
>
> Key: FORGE-1814
> URL: https://issues.jboss.org/browse/FORGE-1814
> Project: Forge
> Issue Type: Enhancement
> Components: UI - API
> Affects Versions: 2.5.0.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Fix For: 2.5.1.Final
>
>
> {code}
> <aslak> gastaldi: speaking of NPE.. Forge doesn't handle null from setValueVoices().. or rather get i guess
> <aslak> Choices :)
> <gastaldi> aslak, let me create a test for that
> <aslak> it basically goes into a for(T choice: input.getValueChoices())
> <gastaldi> hum, getValueChoices() should never be null afaik
> <gastaldi> are you setting it to be null somewhere?
> <aslak> setVlaueChoices(->return null)
> <lincolnthree> gastaldi: yeah I think we need to fix the null situation on UISelectOne and UISelectMany, you shouldn't be able to get null, only an empty list IMO
> <gastaldi> right
> <lincolnthree> sorry, not UISelectOne, that could be null
> <lincolnthree> just UISelectMany
> <lincolnthree> and UIInputMany
> <lincolnthree> shoudl return empty lists
> <lincolnthree> empty iterables
> <lincolnthree> or whatever
> <gastaldi> we're talking about ValueChoices, so I think that applies to UISelectOne as well?
> <lincolnthree> gastaldi: ah, yeah ValueChoices does apply to that
> <lincolnthree> gastaldi: in regard to getValues() i think that should never be null either should it?
> <lincolnthree> for UIInputMany and UISelectMany
> <lincolnthree> just empty
> <gastaldi> hm, yeah, I think it shouldn't
> <gastaldi> to avoid NPEs
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1814) UISelectOne and UISelectMany's getValueChoices() should never return null
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1814?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1814:
-----------------------------------
Summary: UISelectOne and UISelectMany's getValueChoices() should never return null (was: UISelectOne and UISelectMany's getValueChoices() and getValue() should never return null)
> UISelectOne and UISelectMany's getValueChoices() should never return null
> -------------------------------------------------------------------------
>
> Key: FORGE-1814
> URL: https://issues.jboss.org/browse/FORGE-1814
> Project: Forge
> Issue Type: Enhancement
> Components: UI - API
> Affects Versions: 2.5.0.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Fix For: 2.5.1.Final
>
>
> {code}
> <aslak> gastaldi: speaking of NPE.. Forge doesn't handle null from setValueVoices().. or rather get i guess
> <aslak> Choices :)
> <gastaldi> aslak, let me create a test for that
> <aslak> it basically goes into a for(T choice: input.getValueChoices())
> <gastaldi> hum, getValueChoices() should never be null afaik
> <gastaldi> are you setting it to be null somewhere?
> <aslak> setVlaueChoices(->return null)
> <lincolnthree> gastaldi: yeah I think we need to fix the null situation on UISelectOne and UISelectMany, you shouldn't be able to get null, only an empty list IMO
> <gastaldi> right
> <lincolnthree> sorry, not UISelectOne, that could be null
> <lincolnthree> just UISelectMany
> <lincolnthree> and UIInputMany
> <lincolnthree> shoudl return empty lists
> <lincolnthree> empty iterables
> <lincolnthree> or whatever
> <gastaldi> we're talking about ValueChoices, so I think that applies to UISelectOne as well?
> <lincolnthree> gastaldi: ah, yeah ValueChoices does apply to that
> <lincolnthree> gastaldi: in regard to getValues() i think that should never be null either should it?
> <lincolnthree> for UIInputMany and UISelectMany
> <lincolnthree> just empty
> <gastaldi> hm, yeah, I think it shouldn't
> <gastaldi> to avoid NPEs
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (FORGE-1814) UISelectOne and UISelectMany's getValueChoices() and getValue() should never return null
by George Gastaldi (JIRA)
George Gastaldi created FORGE-1814:
--------------------------------------
Summary: UISelectOne and UISelectMany's getValueChoices() and getValue() should never return null
Key: FORGE-1814
URL: https://issues.jboss.org/browse/FORGE-1814
Project: Forge
Issue Type: Enhancement
Components: UI - API
Affects Versions: 2.5.0.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.5.1.Final
{code}
<aslak> gastaldi: speaking of NPE.. Forge doesn't handle null from setValueVoices().. or rather get i guess
<aslak> Choices :)
<gastaldi> aslak, let me create a test for that
<aslak> it basically goes into a for(T choice: input.getValueChoices())
<gastaldi> hum, getValueChoices() should never be null afaik
<gastaldi> are you setting it to be null somewhere?
<aslak> setVlaueChoices(->return null)
<lincolnthree> gastaldi: yeah I think we need to fix the null situation on UISelectOne and UISelectMany, you shouldn't be able to get null, only an empty list IMO
<gastaldi> right
<lincolnthree> sorry, not UISelectOne, that could be null
<lincolnthree> just UISelectMany
<lincolnthree> and UIInputMany
<lincolnthree> shoudl return empty lists
<lincolnthree> empty iterables
<lincolnthree> or whatever
<gastaldi> we're talking about ValueChoices, so I think that applies to UISelectOne as well?
<lincolnthree> gastaldi: ah, yeah ValueChoices does apply to that
<lincolnthree> gastaldi: in regard to getValues() i think that should never be null either should it?
<lincolnthree> for UIInputMany and UISelectMany
<lincolnthree> just empty
<gastaldi> hm, yeah, I think it shouldn't
<gastaldi> to avoid NPEs
{code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months