You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/04/15 01:13:06 UTC

[jira] Updated: (TAPESTRY-2340) Documentation about informal parameters should reference the @SupportsInformalParameters annotation specifically

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

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

    Summary: Documentation about informal parameters should reference the @SupportsInformalParameters annotation specifically  (was: Informal Parameters are not rendered in component generating "img" element)

> Documentation about informal parameters should reference the @SupportsInformalParameters annotation specifically
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2340
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2340
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.11
>         Environment: Tomcat server 5.5 on Ubuntu Linux.
>            Reporter: Emanuel Greisen
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> I have created a component that looks like this:
> public class HeraldryShieldIMG
> {
> 	@Parameter(value="64")
> 	@Property
> 	private int _width;
> 	
> 	@Parameter(value="76")
> 	@Property
> 	private int _height;
> 	
> 	@Parameter(value="literal:Heraldry")
> 	@Property
> 	private String _altText;
> 	
> 	@Parameter(required=true)
> 	private BaseHeraldry _heraldry;
> 	
>     @Inject
>     private ComponentResources _resources;
>     
> 	@BeginRender
> 	public void beginRender(MarkupWriter writer)
> 	{
>         Link link = _resources.createPageLink("ShowHeraldryShield", false, new Object[] { "shield", _heraldry.getBottom(), _heraldry.getTop(), _heraldry.getPattern(), _heraldry.getIcon(), _width, _height });
> 		writer.element("img",
> 				"src", link.toAbsoluteURI()+".png",
> 				"width", ""+_width,
> 				"height", ""+_height,
> 				"alt", _altText);
> 		_resources.renderInformalParameters(writer);
> 	}
> 	
> 	@AfterRender
>     void afterRender(MarkupWriter writer)
>     {
>         writer.end();
>     }
> }
> Now if I use it like this:
> <t:HeraldryShieldIMG heraldry="page.webUser.userAccount.heraldry" align="middle" />
> in a template I would think that the informal parameter "align" would be rendered into my current "img"-tag. It is not. Neither is "style"/"class"/etc. What did I not do, all the examples I can find with _resources.renderInformalParameters(writer); do nothing special to indicate that they accept informal parameters (at least not what I can see). In tapestry 4.x there was an option indicating if a component accepted informal parameters - how is this decided now?

-- 
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