Could you raise a jira issue for this, then (and tag it as #newbie coos it sounds like an easy fix)?
Dan Sorry to be brief, sent from my phone On Feb 6, 2012 9:38 AM, "Kevin Meyer - KMZ" <[email protected]> wrote: > Indeed! Well spotted. > > I'm still working through the business domain, so actions (method > names) are still dynamic. > > Renaming "issueInvoice" to "payInvoice" (I had another payInvoice, > which needed to be renamed in turn to makePayment) solved this > problem. > > Once I've got the full Treasurer / Member / 3rd party payment workflow > finalised, I'll know what names are most appropriate, and take care of > the is* issue. > > Thanks, > Kevin > > > Note: To repeat: hideXXX() and disableXXX() methods must take no > parameters. > > > On 5 Feb 2012 at 17:47, Dan Haywood wrote: > > > Here's what I reckon: that method begins with an "is", and so the > metamodel > > is trying to interpret it as a boolean property. > > > > I suggest that the PropertyOrCollectionIdentifyingFacetsFactory could be > > improved; the workaround is to rename the action and use @Named. > > > > Let me know... > > Dan > > > > > > On 5 February 2012 17:44, Kevin Meyer - KMZ <[email protected]> wrote: > > > > > public boolean hideIssueReceipt() { > > > return hideAcknowledgePayment(); > > > } > > > > > > public String disableIssueReceipt() { > > > return disableAcknowledgePayment(); > > > } > > > > > > Compare this to: > > > /** > > > * Invoice life-cycle 3a: Treasurer acknowledges payment / generates > > > receipt (updates balance) > > > */ > > > public Receipt acknowledgePayment(final Payment invoicePayment, > > > @Named("Amount paid") final double payment); > > > > > > with methods: > > > public boolean hideAcknowledgePayment() { > > > return (authentication.hasCouncilRights() != true); > > > } > > > > > > public String disableAcknowledgePayment() { > > > if (authentication.hasTreasurerRights() != true) { > > > return "Only for treasurer"; > > > } > > > return null; > > > } > > > > > > The applib methods "hideAcknowledgePayment" and > > > "disableAcknowledgePayment" are hidden from the user, as expected. > > > > > > The applib methods "hideIssueReceipt" and "disableIssueReceipt" are > > > visible to the user, which is very much unexpected. > > > > > > > > > On 5 Feb 2012 at 17:33, Dan Haywood wrote: > > > > > > > On 5 February 2012 15:31, Kevin Meyer - KMZ <[email protected]> wrote: > > > > > > > > > > > > > > I don't know how long this has been a problem - but I'm getting > some > > > > > weirdness from FacetedMethodsBuilder: > > > > > > > > > > 17:13:37,881 [FacetedMethodsBuilder main INFO ] > introspecting > > > > > dom.finance.Receipt > > > > > 17:13:37,913 [FacetedMethodsBuilder main INFO ] skipping > > > > > possible helper method public abstract dom.finance.Receipt > > > > > > > > > dom.IMember.issueReceipt(dom.finance.Invoice,double,dom.finance.Payment) > > > > > > > > > > The problem is that "issueReceipt" has corresponding > > > > > "hideIssueReceipt" and "disableIssueReceipt" that are not being > > > > > picked up as applib methods and are left behind as visible actions > that > > > > > the user can invoke. > > > > > > > > > > issueReceipt is an action on my Member interface, used by the > > > > > treasurer. > > > > > /** > > > > > * Issue a receipt for an invoice, for an optional payment. > > > > > * > > > > > * @param invoice > > > > > * @param amountPaid > > > > > * @param payment > > > > > * @return > > > > > */ > > > > > public Receipt issueReceipt(final Invoice invoice, > @Named("Amount > > > > > paid") double amountPaid, > > > > > @Optional final Payment payment); > > > > > > > > > > > > > > > Any advice as to what is going on here? > > > > > > > > My guess is it's a mismatch in the set of arguments to the helpers. > > > > > > > > Can you post the hide and disable methods also? > > > > > > > > > > > -- > Kevin Meyer, PhD, Pr.Sci.Nat > KMZ P.O. Box 9822, Sharon Park, South Africa. > Tel: +27 11 363 2001 Cell: +27 83 346 3045 > > >
