[GitHub] [myfaces] volosied commented on pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on PR #520:
URL: https://github.com/apache/myfaces/pull/520#issuecomment-1430297468

   @tandraschko Let me know what you think of the new changes. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Comment Edited] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Bernd Bohmann (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688597#comment-17688597
 ] 

Bernd Bohmann edited comment on MYFACES-4560 at 2/14/23 7:55 PM:
-

I have a simple test to verify the wrong behavior

 

 
{code:java}
@Test
public void testSelectListAsValue()
{
List values = new ArrayList<>();

values.add(new SelectItem("#1", "D1"));
values.add(new SelectItem("#2", "D2"));
values.add(new SelectItem("#3", "D3"));

UISelectItems selectItems = new UISelectItems();
selectItems.setValue(values);
selectItems.getAttributes().put("var", "item");
ValueExpression itemValue = new MockValueExpression("#{item.label}", 
Object.class);
ValueExpression itemLabel = new MockValueExpression("#{item.value}", 
Object.class);
ValueExpression itemDescription = new MockValueExpression("#{item.value}", 
Object.class);

selectItems.setValueExpression("itemValue", itemValue);
selectItems.setValueExpression("itemLabel", itemLabel);
selectItems.setValueExpression("itemDescription", itemLabel);
UISelectOne selectOne = new UISelectOne();
selectOne.getChildren().add(selectItems);

SelectItemsIterator iter = new SelectItemsIterator(selectOne, facesContext);
List options = new ArrayList<>();
List labels = new ArrayList<>();
List descriptions = new ArrayList<>();
while (iter.hasNext())
{
SelectItem next = iter.next();
options.add((String) next.getValue());
labels.add(next.getLabel());
descriptions.add(next.getDescription());
}
Assertions.assertAll(
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getLabel).collect(Collectors.toList()),
 options),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 labels),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 descriptions));
}{code}
 

 


was (Author: bommel):
I have a simple test to verify the wrong behavior

 

 
{code:java}
@Test
public void testSelectListAsValue()
{
List values = new ArrayList<>();

values.add(new SelectItem("#1", "D1"));
values.add(new SelectItem("#2", "D2"));
values.add(new SelectItem("#3", "D3"));

UISelectItems selectItems = new UISelectItems();
selectItems.setValue(values);
selectItems.getAttributes().put("var", "item");
ValueExpression itemValue = new MockValueExpression("#{item.label}", 
Object.class);
ValueExpression itemLabel = new MockValueExpression("#{item.key}", 
Object.class);
ValueExpression itemDescription = new MockValueExpression("#{item.key}", 
Object.class);

selectItems.setValueExpression("itemValue", itemValue);
selectItems.setValueExpression("itemLabel", itemLabel);
selectItems.setValueExpression("itemDescription", itemLabel);
UISelectOne selectOne = new UISelectOne();
selectOne.getChildren().add(selectItems);

SelectItemsIterator iter = new SelectItemsIterator(selectOne, facesContext);
List options = new ArrayList<>();
List labels = new ArrayList<>();
List descriptions = new ArrayList<>();
while (iter.hasNext())
{
SelectItem next = iter.next();
options.add((String) next.getValue());
labels.add(next.getLabel());
descriptions.add(next.getDescription());
}
Assertions.assertAll(
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getLabel).collect(Collectors.toList()),
 options),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 labels),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 descriptions));
}{code}
 

 

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is 

[GitHub] [myfaces] volosied commented on a diff in pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on code in PR #520:
URL: https://github.com/apache/myfaces/pull/520#discussion_r1106306711


##
impl/src/main/resources/META-INF/WebConfigParamsLogger.vm:
##
@@ -34,88 +34,88 @@ public class WebConfigParamsLogger
 {
 private static final Logger log = 
Logger.getLogger(WebConfigParamsLogger.class.getName());
 
+private static Boolean LOG_WEB_CONTEXT_PARAM = false;
+
 public static void logWebContextParams(FacesContext facesContext)
 {
 MyfacesConfig myfacesConfig = 
MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
 
-if (!myfacesConfig.isLogWebContextParams())
-{
-//No log if is disabled or is in auto mode and project stage is 
UnitTest or SystemTest
-return;
-}
+LOG_WEB_CONTEXT_PARAM = myfacesConfig.isLogWebContextParams();
 
-
-if(myfacesConfig.isRiImplAvailable() && 
myfacesConfig.isMyfacesImplAvailable())
+if(myfacesConfig.isRiImplAvailable() && 
myfacesConfig.isMyfacesImplAvailable() && log.isLoggable(Level.SEVERE))
 {
 log.severe("Both MyFaces and the RI are on your classpath. Please 
make sure to use only one of the two JSF-implementations.");
 }
 
-
 ## - PROPERTY MACROS -
 ##
 ## ---
 ## writePropertyCheck
 ## ---
 ##
 #macro (writePropertyCheck $webConfigParam)
-paramValue = 
facesContext.getExternalContext().getInitParameter("$webConfigParam.name");
-if (paramValue == null)
-{
-log.info("No context init parameter '$webConfigParam.name' 
found#if($webConfigParam.defaultValue), using default value 
'$webConfigParam.defaultValue'#end.");
-}
+paramValue = 
facesContext.getExternalContext().getInitParameter("$webConfigParam.name");
+if (paramValue == null)
+{
+logMessageToAppropriateLevel("No context init parameter 
'$webConfigParam.name' found#if($webConfigParam.defaultValue), using default 
value '$webConfigParam.defaultValue'#end.");
+}
 #if (!$webConfigParam.isDeprecated())
 #if ($webConfigParam.expectedValues)
-else
+else
+{
+boolean found = false;
+String[] expectedValues = 
StringUtils.trim(StringUtils.splitShortString("$webConfigParam.expectedValues",','));
+for (int i = 0; i < expectedValues.length; i++)
 {
-boolean found = false;
-String[] expectedValues = 
StringUtils.trim(StringUtils.splitShortString("$webConfigParam.expectedValues",','));
-for (int i = 0; i < expectedValues.length; i++)
-{
 #if ($webConfigParam.isIgnoreUpperLowerCase())
-if (paramValue.equalsIgnoreCase(expectedValues[i]))
+if (paramValue.equalsIgnoreCase(expectedValues[i]))
 #else
-if (paramValue.equals(expectedValues[i]))
+if (paramValue.equals(expectedValues[i]))
 #end
-{
-found = true;
-break;
-}
-}
-if (!found)
 {
-if (log.isLoggable(Level.WARNING))
-{
-log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 
#if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
-}
+found = true;
+break;
 }
 }
-#elseif ($webConfigParam.classType)
-else
+if (!found)
 {
-try
+if (log.isLoggable(Level.WARNING))
 {
-${webConfigParam.classType}.valueOf(paramValue);
+log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 
#if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
 }
-catch(Exception e)
+}
+else
+{
+logMessageToAppropriateLevel("Init context parameter found 
'$webConfigParam.name' set to '" + paramValue + "'");
+}
+}
+#elseif ($webConfigParam.classType)
+else
+{
+try
+{
+${webConfigParam.classType}.valueOf(paramValue);
+}
+catch(Exception e)
+{
+if (log.isLoggable(Level.WARNING))
 {
-if (log.isLoggable(Level.WARNING))
-{
-log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 

[GitHub] [myfaces] volosied commented on a diff in pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on code in PR #520:
URL: https://github.com/apache/myfaces/pull/520#discussion_r1106298338


##
impl/src/main/resources/META-INF/WebConfigParamsLogger.vm:
##
@@ -34,88 +34,88 @@ public class WebConfigParamsLogger
 {
 private static final Logger log = 
Logger.getLogger(WebConfigParamsLogger.class.getName());
 
+private static Boolean LOG_WEB_CONTEXT_PARAM = false;
+
 public static void logWebContextParams(FacesContext facesContext)
 {
 MyfacesConfig myfacesConfig = 
MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
 
-if (!myfacesConfig.isLogWebContextParams())
-{
-//No log if is disabled or is in auto mode and project stage is 
UnitTest or SystemTest
-return;
-}
+LOG_WEB_CONTEXT_PARAM = myfacesConfig.isLogWebContextParams();
 
-
-if(myfacesConfig.isRiImplAvailable() && 
myfacesConfig.isMyfacesImplAvailable())
+if(myfacesConfig.isRiImplAvailable() && 
myfacesConfig.isMyfacesImplAvailable() && log.isLoggable(Level.SEVERE))
 {
 log.severe("Both MyFaces and the RI are on your classpath. Please 
make sure to use only one of the two JSF-implementations.");
 }
 
-
 ## - PROPERTY MACROS -
 ##
 ## ---
 ## writePropertyCheck
 ## ---
 ##
 #macro (writePropertyCheck $webConfigParam)
-paramValue = 
facesContext.getExternalContext().getInitParameter("$webConfigParam.name");
-if (paramValue == null)
-{
-log.info("No context init parameter '$webConfigParam.name' 
found#if($webConfigParam.defaultValue), using default value 
'$webConfigParam.defaultValue'#end.");
-}
+paramValue = 
facesContext.getExternalContext().getInitParameter("$webConfigParam.name");
+if (paramValue == null)
+{
+logMessageToAppropriateLevel("No context init parameter 
'$webConfigParam.name' found#if($webConfigParam.defaultValue), using default 
value '$webConfigParam.defaultValue'#end.");
+}
 #if (!$webConfigParam.isDeprecated())
 #if ($webConfigParam.expectedValues)
-else
+else
+{
+boolean found = false;
+String[] expectedValues = 
StringUtils.trim(StringUtils.splitShortString("$webConfigParam.expectedValues",','));
+for (int i = 0; i < expectedValues.length; i++)
 {
-boolean found = false;
-String[] expectedValues = 
StringUtils.trim(StringUtils.splitShortString("$webConfigParam.expectedValues",','));
-for (int i = 0; i < expectedValues.length; i++)
-{
 #if ($webConfigParam.isIgnoreUpperLowerCase())
-if (paramValue.equalsIgnoreCase(expectedValues[i]))
+if (paramValue.equalsIgnoreCase(expectedValues[i]))
 #else
-if (paramValue.equals(expectedValues[i]))
+if (paramValue.equals(expectedValues[i]))
 #end
-{
-found = true;
-break;
-}
-}
-if (!found)
 {
-if (log.isLoggable(Level.WARNING))
-{
-log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 
#if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
-}
+found = true;
+break;
 }
 }
-#elseif ($webConfigParam.classType)
-else
+if (!found)
 {
-try
+if (log.isLoggable(Level.WARNING))
 {
-${webConfigParam.classType}.valueOf(paramValue);
+log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 
#if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
 }
-catch(Exception e)
+}
+else
+{
+logMessageToAppropriateLevel("Init context parameter found 
'$webConfigParam.name' set to '" + paramValue + "'");
+}
+}
+#elseif ($webConfigParam.classType)
+else
+{
+try
+{
+${webConfigParam.classType}.valueOf(paramValue);
+}
+catch(Exception e)
+{
+if (log.isLoggable(Level.WARNING))
 {
-if (log.isLoggable(Level.WARNING))
-{
-log.warning("Wrong value in context init parameter 
'$webConfigParam.name' (='" + paramValue + "'), using default value 

[GitHub] [myfaces] volosied commented on a diff in pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on code in PR #520:
URL: https://github.com/apache/myfaces/pull/520#discussion_r1106297878


##
impl/src/main/resources/META-INF/WebConfigParamsLogger.vm:
##
@@ -129,7 +129,18 @@ public class WebConfigParamsLogger
 #end
 #end
 #end
-}
 ##
 }
+
+private static void logMessageToAppropriateLevel(String text)
+{
+if(LOG_WEB_CONTEXT_PARAM && log.isLoggable(Level.INFO))
+{
+log.info(text);
+}
+else if (log.isLoggable(Level.FINEST))
+{
+log.finest(text);
+}

Review Comment:
   Helper function to avoid repetition 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (TOBAGO-2179) New Select Component

2023-02-14 Thread Jira


 [ 
https://issues.apache.org/jira/browse/TOBAGO-2179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henning Nöth resolved TOBAGO-2179.
--
Fix Version/s: 5.6.0
   (was: 5.x)
   Resolution: Fixed

> New Select Component 
> ---
>
> Key: TOBAGO-2179
> URL: https://issues.apache.org/jira/browse/TOBAGO-2179
> Project: MyFaces Tobago
>  Issue Type: New Feature
>  Components: Themes
>Affects Versions: 5.3.0
>Reporter: Udo Schnurpfeil
>Assignee: Henning Nöth
>Priority: Major
> Fix For: 5.6.0
>
>
> It would be great to have a component like 
> [https://www.primefaces.org/showcase/ui/input/oneMenu.xhtml?jfwid=6c170]
> as well as
> [https://www.primefaces.org/showcase/ui/input/manyMenu.xhtml?jfwid=c8baa]
> in both cases the "Advanced" version
> *Brainstorming:*
>  * Names:  and  (without suffix, or with suffix 
> "Table", or "Filter", or "Menu", or "List" ?)
>  * filter as an option
>  * filtering can use "contains", "prefix" or other customizable filters 
> (filtering works with DOM element of the item)
>  * dropdown and line - both mode should be possible with both components
>  * rendered in HTML as a , to have a structured well readable data 
> list, if more than one attribute to show
>  *  will display the selected items like badges in the input 
> field - the items in the list might be highlighted
>  
> *todo:*
>  * (/) filter (prefix, contains)
>  * (/) inline
>  * (/) add/remove badges
>  * (/) disabled component
>  * (/) disabled options
>  * (/) fix focus
>  * (/) styling for selected rows
>  * (x) add dropdown-menu to menuStore
>  * (/) select options with keyboard
>  * (x) filter (custom)
>  * (x) events
>  * (x) hint if filter result is empty
>  * (x)  must work with inline=true



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces-tobago] henningn merged pull request #3767: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn merged PR #3767:
URL: https://github.com/apache/myfaces-tobago/pull/3767


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3766: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn merged PR #3766:
URL: https://github.com/apache/myfaces-tobago/pull/3766


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn opened a new pull request, #3767: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn opened a new pull request, #3767:
URL: https://github.com/apache/myfaces-tobago/pull/3767

   * make some functions private


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn opened a new pull request, #3766: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn opened a new pull request, #3766:
URL: https://github.com/apache/myfaces-tobago/pull/3766

   * make some functions private


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Bernd Bohmann (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688597#comment-17688597
 ] 

Bernd Bohmann commented on MYFACES-4560:


I have a simple test to verify the wrong behavior

 

 
{code:java}
@Test
public void testSelectListAsValue()
{
List values = new ArrayList<>();

values.add(new SelectItem("#1", "D1"));
values.add(new SelectItem("#2", "D2"));
values.add(new SelectItem("#3", "D3"));

UISelectItems selectItems = new UISelectItems();
selectItems.setValue(values);
selectItems.getAttributes().put("var", "item");
ValueExpression itemValue = new MockValueExpression("#{item.label}", 
Object.class);
ValueExpression itemLabel = new MockValueExpression("#{item.key}", 
Object.class);
ValueExpression itemDescription = new MockValueExpression("#{item.key}", 
Object.class);

selectItems.setValueExpression("itemValue", itemValue);
selectItems.setValueExpression("itemLabel", itemLabel);
selectItems.setValueExpression("itemDescription", itemLabel);
UISelectOne selectOne = new UISelectOne();
selectOne.getChildren().add(selectItems);

SelectItemsIterator iter = new SelectItemsIterator(selectOne, facesContext);
List options = new ArrayList<>();
List labels = new ArrayList<>();
List descriptions = new ArrayList<>();
while (iter.hasNext())
{
SelectItem next = iter.next();
options.add((String) next.getValue());
labels.add(next.getLabel());
descriptions.add(next.getDescription());
}
Assertions.assertAll(
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getLabel).collect(Collectors.toList()),
 options),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 labels),
() -> 
Assertions.assertEquals(values.stream().map(SelectItem::getValue).collect(Collectors.toList()),
 descriptions));
}{code}
 

 

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces-tobago] henningn merged pull request #3765: chore: Tobago 5.x next version

2023-02-14 Thread via GitHub


henningn merged PR #3765:
URL: https://github.com/apache/myfaces-tobago/pull/3765


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Melloware (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688589#comment-17688589
 ] 

Melloware commented on MYFACES-4560:


Yes and that gets completely ignored and the underlying SelecItem `itemLabel` 
is used so the XHMTL there is completely ignored.

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Melloware (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688589#comment-17688589
 ] 

Melloware edited comment on MYFACES-4560 at 2/14/23 4:25 PM:
-

Yes and that gets completely ignored and the underlying SelecItem `itemLabel` 
is used so the XHTML EL expression there is completely ignored.


was (Author: melloware):
Yes and that gets completely ignored and the underlying SelecItem `itemLabel` 
is used so the XHMTL there is completely ignored.

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Bernd Bohmann (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688582#comment-17688582
 ] 

Bernd Bohmann commented on MYFACES-4560:


I think the description is not correct itemLabel for id="test1" is 
{code:java}
itemLabel="#{i.value} - #{i.label}"
{code}

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces-tobago] henningn merged pull request #3763: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn merged PR #3763:
URL: https://github.com/apache/myfaces-tobago/pull/3763


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3764: refactor(cleanup): select[One/Many]List

2023-02-14 Thread via GitHub


henningn merged PR #3764:
URL: https://github.com/apache/myfaces-tobago/pull/3764


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces] volosied commented on pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on PR #520:
URL: https://github.com/apache/myfaces/pull/520#issuecomment-1429987506

   I think I'm following you now.
   
   So here's the new behavior for these _info_ message: 
   auto -  logs in dev mode only (not prod) (fine messages still logged in prod 
when trace is specified)
   true - logs in production and dev mode  (fine not needed, due to info 
messages)
   false - no logging in either  (fine messages still logged in prod when trace 
is specified)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces] tandraschko commented on pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


tandraschko commented on PR #520:
URL: https://github.com/apache/myfaces/pull/520#issuecomment-1429976901

   i think we should not remove a "feature" and just default auto to dev stage 
only as default
   so people can decide how to configure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces] volosied commented on pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


volosied commented on PR #520:
URL: https://github.com/apache/myfaces/pull/520#issuecomment-1429970835

   I can keep the new logging code as is, but undo my LOG_WEB_CONTEXT_PARAMS 
changes.
   
   Although, "auto" doesn't seem to make much sense since now it only applies 
to dev mode (true / false is enough IMO, default true), and I still would like 
to have fine logging simply for support.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Melloware (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688555#comment-17688555
 ] 

Melloware commented on MYFACES-4560:


Yep we opened a discussion on the Faces Spec page here: 
[https://github.com/jakartaee/faces/issues/1791]

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Bernd Bohmann (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688554#comment-17688554
 ] 

Bernd Bohmann commented on MYFACES-4560:


Is this a myfaces problem?

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces] tandraschko commented on pull request #520: MYFACES-4561 Change Context Parameter Logging

2023-02-14 Thread via GitHub


tandraschko commented on PR #520:
URL: https://github.com/apache/myfaces/pull/520#issuecomment-1429909788

   why not just redefine 
   LOG_WEB_CONTEXT_PARAMS_DEFAULT = "auto";
   
   to "auto log in development stage"?
   
   false = never
   true = always


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (TOBAGO-2195) SelectOneList / SelectManyList: filtered row may be preselected

2023-02-14 Thread Jira


 [ 
https://issues.apache.org/jira/browse/TOBAGO-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henning Nöth resolved TOBAGO-2195.
--
Fix Version/s: 5.5.1
   Resolution: Fixed

> SelectOneList / SelectManyList: filtered row may be preselected
> ---
>
> Key: TOBAGO-2195
> URL: https://issues.apache.org/jira/browse/TOBAGO-2195
> Project: MyFaces Tobago
>  Issue Type: Bug
>  Components: Core, Themes
>Affects Versions: 5.5.0
>Reporter: Henning Nöth
>Assignee: Henning Nöth
>Priority: Minor
> Fix For: 5.5.1
>
>
> If a row is preselected by keyboard, the entry is still preselected if hidden 
> by a filter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces-tobago] henningn merged pull request #3762: fix(select[One/Many]List): preselected row

2023-02-14 Thread via GitHub


henningn merged PR #3762:
URL: https://github.com/apache/myfaces-tobago/pull/3762


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3761: fix(select[One/Many]List): preselected row

2023-02-14 Thread via GitHub


henningn merged PR #3761:
URL: https://github.com/apache/myfaces-tobago/pull/3761


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (TOBAGO-2195) SelectOneList / SelectManyList: filtered row may be preselected

2023-02-14 Thread Jira
Henning Nöth created TOBAGO-2195:


 Summary: SelectOneList / SelectManyList: filtered row may be 
preselected
 Key: TOBAGO-2195
 URL: https://issues.apache.org/jira/browse/TOBAGO-2195
 Project: MyFaces Tobago
  Issue Type: Bug
  Components: Core, Themes
Affects Versions: 5.5.0
Reporter: Henning Nöth


If a row is preselected by keyboard, the entry is still preselected if hidden 
by a filter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [myfaces-tobago] henningn merged pull request #3757: build(deps): bump dependency-check-maven from 8.0.2 to 8.1.0

2023-02-14 Thread via GitHub


henningn merged PR #3757:
URL: https://github.com/apache/myfaces-tobago/pull/3757


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3758: build(deps): bump dependency-check-maven from 8.0.2 to 8.1.0

2023-02-14 Thread via GitHub


henningn merged PR #3758:
URL: https://github.com/apache/myfaces-tobago/pull/3758


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3759: build(deps): bump dependency-check-maven from 8.0.2 to 8.1.0

2023-02-14 Thread via GitHub


henningn merged PR #3759:
URL: https://github.com/apache/myfaces-tobago/pull/3759


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [myfaces-tobago] henningn merged pull request #3760: build(deps): bump dependency-check-maven from 8.0.2 to 8.1.0

2023-02-14 Thread via GitHub


henningn merged PR #3760:
URL: https://github.com/apache/myfaces-tobago/pull/3760


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Comment Edited] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688360#comment-17688360
 ] 

Thomas Andraschko edited comment on MYFACES-4560 at 2/14/23 8:24 AM:
-

In PF we added it directly when creating the SelectItems list (like MF 
SelectItemsUtil)
but maybe the better place is when rendering, would need to check it in detail

maybe its also just a timing problem like you mentioned in 
_componentAttributesMap, that "i" is not available yet
but how did it work with non-SelectItem-POJO then?


was (Author: tandraschko):
In PF we added it directly when creating the SelectItems list (like MF 
SelectItemsUtil)
but maybe the better place is when rendering, would need to check it in detail

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4560) Faces Issue #1791 SelectItems rendering

2023-02-14 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688360#comment-17688360
 ] 

Thomas Andraschko commented on MYFACES-4560:


In PF we added it directly when creating the SelectItems list (like MF 
SelectItemsUtil)
but maybe the better place is when rendering, would need to check it in detail

> Faces Issue #1791 SelectItems rendering
> ---
>
> Key: MYFACES-4560
> URL: https://issues.apache.org/jira/browse/MYFACES-4560
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC4
>Reporter: Melloware
>Priority: Major
>
> See; [https://github.com/jakartaee/faces/issues/1791]
>  
> The component should render the itemLabel as instructed by the provided EL, 
> even if the backed data type is SelectItem. The default rendering should only 
> be done when the attribute is missing.
> Example:
> {code:java}
>         
>             
>                  itemValue="#{i.value}" itemLabel="#{i.value} - #{i.label}" />
>             
>             
>                  itemValue="#{i.key}" itemLabel="#{i.key} - #{i.value}" />
>             
>             
>                 
>             
>             
>                 
>             
>         {code}
> The issue is `id="test1"` the user is expecting it to render 
> `itemLabel="#\{i.key} - #\{i.value}"` but it is ignored and just the 
> underlying Java SelectItem value is rendered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (MYFACES-4562) ClientWindowScoped Not Destroyed / Lifecycle Clarification

2023-02-14 Thread Thomas Andraschko (Jira)


 [ 
https://issues.apache.org/jira/browse/MYFACES-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Andraschko resolved MYFACES-4562.

Resolution: Not A Problem

> ClientWindowScoped Not Destroyed / Lifecycle Clarification
> --
>
> Key: MYFACES-4562
> URL: https://issues.apache.org/jira/browse/MYFACES-4562
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC4
>Reporter: Volodymyr Siedlecki
>Priority: Major
>
> My understanding of ClientWindowScoped comes from BalusC's explanation here:
> [https://balusc.omnifaces.org/2021/11/whats-new-in-faces-40.html#ClientWindowScoped]
> In summary, the ClientWindowScoped bean is created when the jfwid is created 
> and "lives as long as this parameter is reused while navigating across the 
> pages via Faces link components."
> My question is: under what conditions should these scoped beans be destroyed 
> then? My testing shows the URL is always appended with jfwid.  The only time  
> I see the beans destroyed is once the 10 clientWindow max limit is reached.
> Should they also be destroyed once a redirect occurs?  What about when 
> disableClientWindow is used?
> {code:java}
>   disableClientWindow="true"/> 
> {code}
> My testing used the @PostConstruct / @PreDestroy annotation to verify the 
> creation / destruction of the beans. Any help is appreciated.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4562) ClientWindowScoped Not Destroyed / Lifecycle Clarification

2023-02-14 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17688358#comment-17688358
 ] 

Thomas Andraschko commented on MYFACES-4562:


currently its only destroyed when the max size is reached, yes (same like DS 
WindowScoped)
in future we could enhance it to add a option like ViewAccessScoped

> ClientWindowScoped Not Destroyed / Lifecycle Clarification
> --
>
> Key: MYFACES-4562
> URL: https://issues.apache.org/jira/browse/MYFACES-4562
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC4
>Reporter: Volodymyr Siedlecki
>Priority: Major
>
> My understanding of ClientWindowScoped comes from BalusC's explanation here:
> [https://balusc.omnifaces.org/2021/11/whats-new-in-faces-40.html#ClientWindowScoped]
> In summary, the ClientWindowScoped bean is created when the jfwid is created 
> and "lives as long as this parameter is reused while navigating across the 
> pages via Faces link components."
> My question is: under what conditions should these scoped beans be destroyed 
> then? My testing shows the URL is always appended with jfwid.  The only time  
> I see the beans destroyed is once the 10 clientWindow max limit is reached.
> Should they also be destroyed once a redirect occurs?  What about when 
> disableClientWindow is used?
> {code:java}
>   disableClientWindow="true"/> 
> {code}
> My testing used the @PostConstruct / @PreDestroy annotation to verify the 
> creation / destruction of the beans. Any help is appreciated.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)