You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kočí (JIRA)" <de...@myfaces.apache.org> on 2011/01/07 16:03:46 UTC

[jira] Created: (MYFACES-3012) Allow ui:param for

Allow ui:param for <h:inputText> <f:ajax>
-----------------------------------------

                 Key: MYFACES-3012
                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-314
    Affects Versions: 2.0.4-SNAPSHOT
         Environment: myfaces trunk, shared svn. rev 1051469
            Reporter: Martin Kočí
            Priority: Minor


I don't know what  spec says but following should work:

<h:inputText>
  <f:param name="paramName" value="paramValue" />   
  <f:ajax />
</h:inputText>

expected result is paramName = paramValue pair in request.

For h:command it works already.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-3012) Allow ui:param for

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Kočí updated MYFACES-3012:
---------------------------------

    Status: Patch Available  (was: Open)

> Allow ui:param for <h:inputText> <f:ajax>
> -----------------------------------------
>
>                 Key: MYFACES-3012
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.4-SNAPSHOT
>         Environment: myfaces trunk, shared svn. rev 1051469
>            Reporter: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3012.patch
>
>
> I don't know what  spec says but following should work:
> <h:inputText>
>   <f:param name="paramName" value="paramValue" />   
>   <f:ajax />
> </h:inputText>
> expected result is paramName = paramValue pair in request.
> For h:command it works already.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-3012) Allow f:param for

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979115#action_12979115 ] 

Jakob Korherr commented on MYFACES-3012:
----------------------------------------

Thread on jsr-314-open: http://lists.jboss.org/pipermail/jsr-314-open-mirror/2011-January/000704.html

> Allow f:param for <h:inputText> <f:ajax>
> ----------------------------------------
>
>                 Key: MYFACES-3012
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.4-SNAPSHOT
>         Environment: myfaces trunk, shared svn. rev 1051469
>            Reporter: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3012.patch
>
>
> I don't know what  spec says but following should work:
> <h:inputText>
>   <f:param name="paramName" value="paramValue" />   
>   <f:ajax />
> </h:inputText>
> expected result is paramName = paramValue pair in request.
> For h:command it works already.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-3012) Allow f:param for

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983626#action_12983626 ] 

Martin Marinschek commented on MYFACES-3012:
--------------------------------------------

I would like this feature, but it is not foreseen by the spec so far.

best regards,

Martin

> Allow f:param for <h:inputText> <f:ajax>
> ----------------------------------------
>
>                 Key: MYFACES-3012
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.4-SNAPSHOT
>         Environment: myfaces trunk, shared svn. rev 1051469
>            Reporter: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3012.patch
>
>
> I don't know what  spec says but following should work:
> <h:inputText>
>   <f:param name="paramName" value="paramValue" />   
>   <f:ajax />
> </h:inputText>
> expected result is paramName = paramValue pair in request.
> For h:command it works already.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-3012) Allow f:param for

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979120#action_12979120 ] 

Martin Kočí commented on MYFACES-3012:
--------------------------------------

Yes, 
<f:ajax>
    <f:param name="param1" value="value1" />
</f:ajax> 

is nicer and it is that what I  wanted originally but spec says: "<f:param>
Add a child UIParameter component to the UIComponent associated with the closest parent UIComponent custom
action." so parametrized is not ajax behaviour but component - my intent was not to wait for JSF 2.2  API and make it working now.

Which other options we have if we want pass a parameter to request? jsf.ajax.request accept params array but I didn't see any elegant java/facelets  API for it. 

Other  (or complementary) solution can be permit attributes wiring for f:ajax like:
<f:ajax param1="value1" />
It will popuplate behaviour instance in simililar way as UIComponent's getAttributes() and ValueExpressions. 

Similar problem with missing "parameter API" I pointed out for converter/validator: http://www.mail-archive.com/dev@myfaces.apache.org/msg47138.html




> Allow f:param for <h:inputText> <f:ajax>
> ----------------------------------------
>
>                 Key: MYFACES-3012
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.4-SNAPSHOT
>         Environment: myfaces trunk, shared svn. rev 1051469
>            Reporter: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3012.patch
>
>
> I don't know what  spec says but following should work:
> <h:inputText>
>   <f:param name="paramName" value="paramValue" />   
>   <f:ajax />
> </h:inputText>
> expected result is paramName = paramValue pair in request.
> For h:command it works already.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-3012) Allow f:param for

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979018#action_12979018 ] 

Jakob Korherr commented on MYFACES-3012:
----------------------------------------

I am not sure if this really »should« work. At least I could not find any documentation about it in the spec.

IMO it is clear that this should work for UICommand components, because f:param is associated with the command that this component triggers. But I don't know if this should be true for input components also, because on a non-ajax JSF request this is also not supported by input components.

However, looking at the javascript spec of jsf.ajax.request(source, event, options) I found the following:

options
    The set of available options that can be sent as request parameters to control client and/or server side request processing. Acceptable name/value pair options are:
    name 	value
    execute 	space seperated list of client identifiers
    render 	space seperated list of client identifiers
    onevent 	function to callback for event
    onerror 	function to callback for error
    params 	object containing parameters to include in the request
    The options argument is optional.

--> you are able to specify custom params here, so why shouldn't it work via the JSF tags f:param + f:ajax?

Thus IMO we should ask the expert group about the expected behavior before committing the patch. However, I think the behavior you're describing is NOT expected in JSF 2.0 and 2.1, but it might be a cool feature for JSF 2.2.

Furthermore it could support something like this:

<f:ajax>
    <f:param name="param1" value="value1" />
</f:ajax>

I'll write a mail to jsr-314-open about this!

> Allow f:param for <h:inputText> <f:ajax>
> ----------------------------------------
>
>                 Key: MYFACES-3012
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3012
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.4-SNAPSHOT
>         Environment: myfaces trunk, shared svn. rev 1051469
>            Reporter: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3012.patch
>
>
> I don't know what  spec says but following should work:
> <h:inputText>
>   <f:param name="paramName" value="paramValue" />   
>   <f:ajax />
> </h:inputText>
> expected result is paramName = paramValue pair in request.
> For h:command it works already.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.