First I'll say Tapestry 5 is the best most flexible framework I've ever used
but,
I've voiced my opinion about informal parameters in the past and I promise
this is the last time.
I understand the value of the ad hoc way parameters are passed to
components/mixins but it seems like there should be a way to specify
precisely what parameters go to what components/mixins and I have not been
able to find one. If I'm wrong about this I apologize in advance.
Consider the following mixin example running under 5.3.2
public class FW {
@Parameter(defaultPrefix="literal")
private String type;
@Inject
private Logger logger;
@SetupRender
private void setupRender() {
logger.info("type: {}",type);
}
}
with the following tml
<t:pagelink page="index" t:mixins="fw"
fw.type="btn-primary">link</t:pagelink>
link
<button t:type="any" t:mixins="fw" fw.type="btn-primary">button</button>
I would expect the output to be:
[INFO] mixins.FW type: btn-primary
[INFO] mixins.FW type: btn-primary
[INFO] mixins.FW type: btn-primary
but I get:
[INFO] mixins.FW type: btn-primary
[INFO] mixins.FW type: btn-primary
[INFO] mixins.FW type: submit
It seems like if I go to all the trouble to namespace my parameters and I
don't have @SupportsInformalParameters I should get mine and mine only. I'd
be willing to try and provide a patch if there is interest in one.
Thanks for your patience,
Barry
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Informal-Parameters-considered-harmful-tp5589569p5589569.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]