Button field to test url authentication

6 views
Skip to first unread message

venu bachewal

unread,
May 25, 2017, 10:38:21 AM5/25/17
to izpack-dev
Hi,
I need Button field to test/validate url authentication in userinput panel which has several other fields.
Yes, I am validating it on NExt button using panel validators.
But, within the panel, I want to use Test Button to verify url, logins provided correct or not.


I am using below code to prompt error
 emitError("Error", installData.getMessages().get("validate.testUrl"));

Yes, error prompt is coming fine BUT Info Prompt also coming always irrespective of condition matches. (on each clicking Button)

for button action: I didn't found on click condition to be validated
I want to perform action isClicked() 

But I see isSelected()->false always isFocusable() -> true on click

 testButton = (JButton) compo.getComponent();
                  System.out.println("_______________ found testButton"+testButton);
                  testButton.addActionListener(new ActionListener()
                  {
                     @Override
                     public void actionPerformed(ActionEvent e)
                     {

                        if(testButton.isSelected() || testButton.isFocusable() )
                        {
                           installData.setInstallPath("");
                           
                           if( !ValidationsUtil.checkUrl( ValidationsUtil.trimAndBindUrl(installData, Variables.VAR_BDA_BDAURL) )  )
                           {
                              System.out.println("_______________failed selected "+testButton);
                              emitError("Error", installData.getMessages().get("validate.bda.testUrl"));
                           }
                           else
                           System.out.println("_______________success selected "+testButton);
                        }
                        System.out.println("_______________ action performed "+testButton);
                     }
                  });

please advise how to handle it.

Thanks in Advance

venu bachewal

unread,
May 25, 2017, 10:45:58 AM5/25/17
to izpack-dev
please some one help me here
Reply all
Reply to author
Forward
0 new messages