You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/12/10 03:56:56 UTC

T5: Two logging related questions

Hi,

Got two problems when using logger with T5:

1)
	@Inject
    private Logger logger;

    private void doTest() {
        logger.info("test logging");
    }
    
    I got an exception:
    org.apache.tapestry.internal.services.TransformationException: Error
obtaining injected value for field org.bfe.istudio.t5.pages.Home.logger: No
service implements the interface org.apache.log4j.Logger.
    why?

2)
 	private static Logger logger2 = Logger.getLogger(Home.class);
    private void doTest() {
        logger2.info("test logging");
    }
    
    This works, but I can't see the logging in the IDE's log, but I can see
those coming from System.out.println, why?

Thanks,
A.C.
-- 
View this message in context: http://www.nabble.com/T5%3A-Two-logging-related-questions-tp14246512p14246512.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: Two logging related questions

Posted by Angelo Chen <an...@yahoo.com.hk>.
solved, import org.slf4j.Logger; read that from some where in the list,
thanks.


Angelo Chen wrote:
> 
> Hi,
> 
> Got two problems when using logger with T5:
> 
> 1)
> 	@Inject
>     private Logger logger;
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-Two-logging-related-questions-tp14246512p14247641.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: BeanEditForm and PasswordField

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi Chris,

Try this:

<t:form id="form" t:object="bean" t:model="model">
   <t:parameter t:name="password">
     <t:label t:for="password" />
     <t:passwordfield t:id="password" t:value="bean.password" />
   </t:parameter>
</t:form>

And see the section on Property Editor Overrides:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html

And the component reference for BeanEditForm:
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentsbeaneditform

Hope this helps. :)

-Filip

Chris Campbell skrev:
> I have a BeanEditForm for a UserBean that has a password field.
> 
> I gather that I am supposed to be able to override the BeanEditForm
> input for the password so that it renders with type="password" so
> that the text is not visible on the screen. So I do the following:
> 
> <t:form id="form" object="bean" model="model">
>   <t:passwordfield id="password" value="bean.password"/>
> </t:form>
> 
> but it gets rendered as
> 
> <input id="password" name="password" type="text" value="">
> 
> Can anyone tell me what I am doing wrong? Thanks.
> 
> Chris
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

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


T5: BeanEditForm and PasswordField

Posted by Chris Campbell <cc...@quaris.com>.
I have a BeanEditForm for a UserBean that has a password field.

I gather that I am supposed to be able to override the BeanEditForm
input for the password so that it renders with type="password" so
that the text is not visible on the screen. So I do the following:

<t:form id="form" object="bean" model="model">
  <t:passwordfield id="password" value="bean.password"/>
</t:form>

but it gets rendered as

<input id="password" name="password" type="text" value="">

Can anyone tell me what I am doing wrong? Thanks.

Chris



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