You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Hiruni Madola <hi...@gmail.com> on 2015/02/12 08:31:39 UTC

How to add a Password text field in Apache Isis

Hi everyone,

I'm developing a demo User Account Management app. Domain object is a
UserAccount.  I went through the simpleApp, todoApp archetypes and some of
the docs in Isis web page.

I have a service called UserAccountService, where I need to add a Signup
action for new UserAccounts.

So Here I need to add a Password field to add a new account.
In my service class I have method as below;
public void signUp(@Named("Username") String uname,@Named("Password")
String password) {
UserAccount acc =new UserAccount();
acc.setUName(uname);
acc.setPassword(password);
}

I need above password parameter to be a password text field in the UI
(hidden text field)
Can I pls know how to make the above password parameter as a password field
?
In Wicket there is a component called PasswordTextField.

Can anyone help me to make my input param render as a PasswordTextField in
the Isis UI?

Thank you.
Hiruni

Re: How to add a Password text field in Apache Isis

Posted by Hiruni Madola <hi...@gmail.com>.
Thank you very much Dan.

On Thu, Feb 12, 2015 at 4:32 PM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> It's always necessary for the user to be logged in, one way or another.
>
> While you could write a custom Shiro realm that automatically
> authenticates, it'd probably be easier just to hack your (subclass of)
> IsisWicketApplication, as per [1] and/or [2]
>
> HTH
> Dan
>
> [1]
>
> https://github.com/apache/isis/blob/5e39335f67678cff53d9c99c5c347dbed4c259e6/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java#L75
> [2]
>
> https://github.com/apache/isis/blob/5e39335f67678cff53d9c99c5c347dbed4c259e6/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java#L92
>
>
>
> On 12 February 2015 at 10:56, Hiruni Madola <hi...@gmail.com>
> wrote:
>
> > Hi Dan,
> >
> > Thank you for the link.
> > In my demo app, can I remove Shiro security sign-in feature?
> > For demo purpose I don't need the Isis sign-in feature.
> > How can I remove it from my app?
> >
> > Regards,
> > Hiruni
> >
> >
> > On Thu, Feb 12, 2015 at 1:44 PM, Dan Haywood <
> dan@haywood-associates.co.uk
> > >
> > wrote:
> >
> > > Just to add... in 1.8.0-SNAPSHOT Isis does now natively support user
> > > sign-up using email as a verification; see [1].
> > >
> > > Cheers
> > > Dan
> > >
> > > [1]
> > >
> http://isis.apache.org/components/viewers/wicket/user-registration.html
> > >
> > > On 12 February 2015 at 07:42, Hiruni Madola <hi...@gmail.com>
> > > wrote:
> > >
> > > > Thank you Martin for the quick response..
> > > >
> > > > On Thu, Feb 12, 2015 at 1:05 PM, Martin Grigorov <
> mgrigorov@apache.org
> > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > You need to use Password [1] instead of String.
> > > > >
> > > > >
> > > > > 1.
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <
> > hirunimadola@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > > > Hi everyone,
> > > > > >
> > > > > > I'm developing a demo User Account Management app. Domain object
> > is a
> > > > > > UserAccount.  I went through the simpleApp, todoApp archetypes
> and
> > > some
> > > > > of
> > > > > > the docs in Isis web page.
> > > > > >
> > > > > > I have a service called UserAccountService, where I need to add a
> > > > Signup
> > > > > > action for new UserAccounts.
> > > > > >
> > > > > > So Here I need to add a Password field to add a new account.
> > > > > > In my service class I have method as below;
> > > > > > public void signUp(@Named("Username") String
> > uname,@Named("Password")
> > > > > > String password) {
> > > > > > UserAccount acc =new UserAccount();
> > > > > > acc.setUName(uname);
> > > > > > acc.setPassword(password);
> > > > > > }
> > > > > >
> > > > > > I need above password parameter to be a password text field in
> the
> > UI
> > > > > > (hidden text field)
> > > > > > Can I pls know how to make the above password parameter as a
> > password
> > > > > field
> > > > > > ?
> > > > > > In Wicket there is a component called PasswordTextField.
> > > > > >
> > > > > > Can anyone help me to make my input param render as a
> > > PasswordTextField
> > > > > in
> > > > > > the Isis UI?
> > > > > >
> > > > > > Thank you.
> > > > > > Hiruni
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Hiru
> > > >
> > >
> >
> >
> >
> > --
> > Hiru
> >
>



-- 
Hiru

Re: How to add a Password text field in Apache Isis

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
It's always necessary for the user to be logged in, one way or another.

While you could write a custom Shiro realm that automatically
authenticates, it'd probably be easier just to hack your (subclass of)
IsisWicketApplication, as per [1] and/or [2]

HTH
Dan

[1]
https://github.com/apache/isis/blob/5e39335f67678cff53d9c99c5c347dbed4c259e6/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java#L75
[2]
https://github.com/apache/isis/blob/5e39335f67678cff53d9c99c5c347dbed4c259e6/example/application/todoapp/webapp/src/main/java/webapp/ToDoApplication.java#L92



On 12 February 2015 at 10:56, Hiruni Madola <hi...@gmail.com> wrote:

> Hi Dan,
>
> Thank you for the link.
> In my demo app, can I remove Shiro security sign-in feature?
> For demo purpose I don't need the Isis sign-in feature.
> How can I remove it from my app?
>
> Regards,
> Hiruni
>
>
> On Thu, Feb 12, 2015 at 1:44 PM, Dan Haywood <dan@haywood-associates.co.uk
> >
> wrote:
>
> > Just to add... in 1.8.0-SNAPSHOT Isis does now natively support user
> > sign-up using email as a verification; see [1].
> >
> > Cheers
> > Dan
> >
> > [1]
> > http://isis.apache.org/components/viewers/wicket/user-registration.html
> >
> > On 12 February 2015 at 07:42, Hiruni Madola <hi...@gmail.com>
> > wrote:
> >
> > > Thank you Martin for the quick response..
> > >
> > > On Thu, Feb 12, 2015 at 1:05 PM, Martin Grigorov <mgrigorov@apache.org
> >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > You need to use Password [1] instead of String.
> > > >
> > > >
> > > > 1.
> > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <
> hirunimadola@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > Hi everyone,
> > > > >
> > > > > I'm developing a demo User Account Management app. Domain object
> is a
> > > > > UserAccount.  I went through the simpleApp, todoApp archetypes and
> > some
> > > > of
> > > > > the docs in Isis web page.
> > > > >
> > > > > I have a service called UserAccountService, where I need to add a
> > > Signup
> > > > > action for new UserAccounts.
> > > > >
> > > > > So Here I need to add a Password field to add a new account.
> > > > > In my service class I have method as below;
> > > > > public void signUp(@Named("Username") String
> uname,@Named("Password")
> > > > > String password) {
> > > > > UserAccount acc =new UserAccount();
> > > > > acc.setUName(uname);
> > > > > acc.setPassword(password);
> > > > > }
> > > > >
> > > > > I need above password parameter to be a password text field in the
> UI
> > > > > (hidden text field)
> > > > > Can I pls know how to make the above password parameter as a
> password
> > > > field
> > > > > ?
> > > > > In Wicket there is a component called PasswordTextField.
> > > > >
> > > > > Can anyone help me to make my input param render as a
> > PasswordTextField
> > > > in
> > > > > the Isis UI?
> > > > >
> > > > > Thank you.
> > > > > Hiruni
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Hiru
> > >
> >
>
>
>
> --
> Hiru
>

Re: How to add a Password text field in Apache Isis

Posted by Hiruni Madola <hi...@gmail.com>.
Hi Dan,

Thank you for the link.
In my demo app, can I remove Shiro security sign-in feature?
For demo purpose I don't need the Isis sign-in feature.
How can I remove it from my app?

Regards,
Hiruni


On Thu, Feb 12, 2015 at 1:44 PM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Just to add... in 1.8.0-SNAPSHOT Isis does now natively support user
> sign-up using email as a verification; see [1].
>
> Cheers
> Dan
>
> [1]
> http://isis.apache.org/components/viewers/wicket/user-registration.html
>
> On 12 February 2015 at 07:42, Hiruni Madola <hi...@gmail.com>
> wrote:
>
> > Thank you Martin for the quick response..
> >
> > On Thu, Feb 12, 2015 at 1:05 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > You need to use Password [1] instead of String.
> > >
> > >
> > > 1.
> > >
> > >
> >
> https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <hirunimadola@gmail.com
> >
> > > wrote:
> > >
> > > > Hi everyone,
> > > >
> > > > I'm developing a demo User Account Management app. Domain object is a
> > > > UserAccount.  I went through the simpleApp, todoApp archetypes and
> some
> > > of
> > > > the docs in Isis web page.
> > > >
> > > > I have a service called UserAccountService, where I need to add a
> > Signup
> > > > action for new UserAccounts.
> > > >
> > > > So Here I need to add a Password field to add a new account.
> > > > In my service class I have method as below;
> > > > public void signUp(@Named("Username") String uname,@Named("Password")
> > > > String password) {
> > > > UserAccount acc =new UserAccount();
> > > > acc.setUName(uname);
> > > > acc.setPassword(password);
> > > > }
> > > >
> > > > I need above password parameter to be a password text field in the UI
> > > > (hidden text field)
> > > > Can I pls know how to make the above password parameter as a password
> > > field
> > > > ?
> > > > In Wicket there is a component called PasswordTextField.
> > > >
> > > > Can anyone help me to make my input param render as a
> PasswordTextField
> > > in
> > > > the Isis UI?
> > > >
> > > > Thank you.
> > > > Hiruni
> > > >
> > >
> >
> >
> >
> > --
> > Hiru
> >
>



-- 
Hiru

Re: How to add a Password text field in Apache Isis

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Just to add... in 1.8.0-SNAPSHOT Isis does now natively support user
sign-up using email as a verification; see [1].

Cheers
Dan

[1] http://isis.apache.org/components/viewers/wicket/user-registration.html

On 12 February 2015 at 07:42, Hiruni Madola <hi...@gmail.com> wrote:

> Thank you Martin for the quick response..
>
> On Thu, Feb 12, 2015 at 1:05 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi,
> >
> > You need to use Password [1] instead of String.
> >
> >
> > 1.
> >
> >
> https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <hi...@gmail.com>
> > wrote:
> >
> > > Hi everyone,
> > >
> > > I'm developing a demo User Account Management app. Domain object is a
> > > UserAccount.  I went through the simpleApp, todoApp archetypes and some
> > of
> > > the docs in Isis web page.
> > >
> > > I have a service called UserAccountService, where I need to add a
> Signup
> > > action for new UserAccounts.
> > >
> > > So Here I need to add a Password field to add a new account.
> > > In my service class I have method as below;
> > > public void signUp(@Named("Username") String uname,@Named("Password")
> > > String password) {
> > > UserAccount acc =new UserAccount();
> > > acc.setUName(uname);
> > > acc.setPassword(password);
> > > }
> > >
> > > I need above password parameter to be a password text field in the UI
> > > (hidden text field)
> > > Can I pls know how to make the above password parameter as a password
> > field
> > > ?
> > > In Wicket there is a component called PasswordTextField.
> > >
> > > Can anyone help me to make my input param render as a PasswordTextField
> > in
> > > the Isis UI?
> > >
> > > Thank you.
> > > Hiruni
> > >
> >
>
>
>
> --
> Hiru
>

Re: How to add a Password text field in Apache Isis

Posted by Hiruni Madola <hi...@gmail.com>.
Thank you Martin for the quick response..

On Thu, Feb 12, 2015 at 1:05 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
> You need to use Password [1] instead of String.
>
>
> 1.
>
> https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <hi...@gmail.com>
> wrote:
>
> > Hi everyone,
> >
> > I'm developing a demo User Account Management app. Domain object is a
> > UserAccount.  I went through the simpleApp, todoApp archetypes and some
> of
> > the docs in Isis web page.
> >
> > I have a service called UserAccountService, where I need to add a Signup
> > action for new UserAccounts.
> >
> > So Here I need to add a Password field to add a new account.
> > In my service class I have method as below;
> > public void signUp(@Named("Username") String uname,@Named("Password")
> > String password) {
> > UserAccount acc =new UserAccount();
> > acc.setUName(uname);
> > acc.setPassword(password);
> > }
> >
> > I need above password parameter to be a password text field in the UI
> > (hidden text field)
> > Can I pls know how to make the above password parameter as a password
> field
> > ?
> > In Wicket there is a component called PasswordTextField.
> >
> > Can anyone help me to make my input param render as a PasswordTextField
> in
> > the Isis UI?
> >
> > Thank you.
> > Hiruni
> >
>



-- 
Hiru

Re: How to add a Password text field in Apache Isis

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You need to use Password [1] instead of String.


1.
https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/value/Password.java

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Feb 12, 2015 at 9:31 AM, Hiruni Madola <hi...@gmail.com>
wrote:

> Hi everyone,
>
> I'm developing a demo User Account Management app. Domain object is a
> UserAccount.  I went through the simpleApp, todoApp archetypes and some of
> the docs in Isis web page.
>
> I have a service called UserAccountService, where I need to add a Signup
> action for new UserAccounts.
>
> So Here I need to add a Password field to add a new account.
> In my service class I have method as below;
> public void signUp(@Named("Username") String uname,@Named("Password")
> String password) {
> UserAccount acc =new UserAccount();
> acc.setUName(uname);
> acc.setPassword(password);
> }
>
> I need above password parameter to be a password text field in the UI
> (hidden text field)
> Can I pls know how to make the above password parameter as a password field
> ?
> In Wicket there is a component called PasswordTextField.
>
> Can anyone help me to make my input param render as a PasswordTextField in
> the Isis UI?
>
> Thank you.
> Hiruni
>