You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Randy Leonard (JIRA)" <ta...@jakarta.apache.org> on 2007/02/16 16:11:05 UTC

[jira] Created: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

IF component should include an optional 'negate' parameter
----------------------------------------------------------

                 Key: TAPESTRY-1276
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
             Project: Tapestry
          Issue Type: New Feature
          Components: Core
    Affects Versions: 5.0
         Environment: MacOS X 10.4.8, Eclipse 3.2.1
            Reporter: Randy Leonard
            Priority: Minor
             Fix For: 5.0


It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474800 ] 

Howard M. Lewis Ship commented on TAPESTRY-1276:
------------------------------------------------

Does the else parameter (a block) suffice, as in:

<t:comp type="If" test="order.lineItems">
   . . . <!-- Display the line items, etc. -->
  <t:parameter name="else">
    There are no llne items in this order.
  </t:parameter>
</t:comp>



> IF component should include an optional 'negate' parameter
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>            Priority: Minor
>             Fix For: 5.0
>
>
> It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Commented: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

Posted by Randy Leonard <oc...@mac.com>.
 > such as extending the property expression syntax to support an  
inversion operator
Agreed... I suspect this would have uses beyond the IF component.


On Feb 22, 2007, at 12:14 PM, Howard M. Lewis Ship (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/TAPESTRY-1276? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment- 
> tabpanel#action_12475122 ]
>
> Howard M. Lewis Ship commented on TAPESTRY-1276:
> ------------------------------------------------
>
> It's more verbose for some things, but I quite often find I need  
> two ifs:  for the normal case, and one for the else case.  This  
> merges both cases together with a minimum of fuss.
>
> I'm not saying the negate parameter is bad (T4 has an equivalent  
> "invert" parameter), but there may be other options that are  
> better, such as extending the property expression syntax to support  
> an inversion operator, i.e.
>
> <t:comp type="if" test="! order.lineItems">
>  . . .
> </t:comp>
>
> Another option would be to create an Unless component:
>
> <t:comp type="unless" test="order.lineItems">
>  .  . .
> </t:comp>
>
> I find both of these preferable to a negate or invert parameter.
>
>> IF component should include an optional 'negate' parameter
>> ----------------------------------------------------------
>>
>>                 Key: TAPESTRY-1276
>>                 URL: https://issues.apache.org/jira/browse/ 
>> TAPESTRY-1276
>>             Project: Tapestry
>>          Issue Type: New Feature
>>          Components: Core
>>    Affects Versions: 5.0
>>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>>            Reporter: Randy Leonard
>>            Priority: Minor
>>             Fix For: 5.0
>>
>>
>> It would be useful for the 'If' component to take an optional  
>> 'negate' parameter, much like the WOCondition component in  
>> WebObjects.  This would allow the component content to be rendered  
>> if the associated condition is FALSE instead of TRUE, therefore  
>> eliminating the need to write an additional Java method to perform  
>> this negate operation.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475122 ] 

Howard M. Lewis Ship commented on TAPESTRY-1276:
------------------------------------------------

It's more verbose for some things, but I quite often find I need two ifs:  for the normal case, and one for the else case.  This merges both cases together with a minimum of fuss.

I'm not saying the negate parameter is bad (T4 has an equivalent "invert" parameter), but there may be other options that are better, such as extending the property expression syntax to support an inversion operator, i.e.

<t:comp type="if" test="! order.lineItems">
 . . .
</t:comp>

Another option would be to create an Unless component:

<t:comp type="unless" test="order.lineItems">
 .  . .
</t:comp>

I find both of these preferable to a negate or invert parameter.

> IF component should include an optional 'negate' parameter
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>            Priority: Minor
>             Fix For: 5.0
>
>
> It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

Posted by "Randy Leonard (JIRA)" <ta...@jakarta.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475038 ] 

Randy Leonard commented on TAPESTRY-1276:
-----------------------------------------

I suppose it does, just a little more verbose than what I am used to.

> IF component should include an optional 'negate' parameter
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>            Priority: Minor
>             Fix For: 5.0
>
>
> It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-1276) If component should include an optional negate parameter

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1276.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.3

> If component should include an optional negate parameter
> --------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: tapestry-core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>         Assigned To: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.0.3
>
>
> It would be useful for the If component to take an optional negate parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-1276) IF component should include an optional 'negate' parameter

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477913 ] 

Jesse Kuhnert commented on TAPESTRY-1276:
-----------------------------------------

"cough". .. You know, there is a certain property expression library floating around that can do these kinds of things and has recently been upgraded to include compilation support via javassist for the "entire" expression. 

I'm not sure how much the paths diverge wrt needs / environment / etc, but "the world is yours" as they say....Drew has officially handed it off to me so we "own it" as far as I'm concerned morality wise if we get pissed off with hosting at opensymphony.com. Of course there'd be no issues with making you a committer / any little changes that might need to be made. In some perverse way I'm enjoying the lower level side of my brain that it exercises so I'm ok with fielding requests....

URL is http://svn.opensymphony.com/svn/ognl/trunk/ . I've deployed it and have to imagine some people are using it in 4.1.2 tapestry now as I've made it a required dependency. 

It's probably more trouble than it's worth for both of us but thought I'd throw this out there as I can imagine you'll be spending the rest of your days adding more and more property expression logic otherwise.

> IF component should include an optional 'negate' parameter
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>            Priority: Minor
>             Fix For: 5.0
>
>
> It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1276) If component should include an optional negate parameter

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1276:
-------------------------------------------

    Fix Version/s:     (was: 5.0)
         Assignee: Howard M. Lewis Ship
      Description: It would be useful for the If component to take an optional negate parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.  (was: It would be useful for the 'If' component to take an optional 'negate' parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.)
          Summary: If component should include an optional negate parameter  (was: IF component should include an optional 'negate' parameter)

> If component should include an optional negate parameter
> --------------------------------------------------------
>
>                 Key: TAPESTRY-1276
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: tapestry-core
>    Affects Versions: 5.0
>         Environment: MacOS X 10.4.8, Eclipse 3.2.1
>            Reporter: Randy Leonard
>         Assigned To: Howard M. Lewis Ship
>            Priority: Minor
>
> It would be useful for the If component to take an optional negate parameter, much like the WOCondition component in WebObjects.  This would allow the component content to be rendered if the associated condition is FALSE instead of TRUE, therefore eliminating the need to write an additional Java method to perform this negate operation.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org