Re: Form Validations

2009-03-30 Thread Ashis

I am using Wicket-1.3.0 Version.
Following are the code Snippet

//Code Snippet for RadioChoice//
RadioGroup  sexField = new RadioGroup("sex", new Model());
sexField.add(new Radio("male", new Model("Male")));
sexField.add(new Radio("female", new Model("Female")));
sexField.setOutputMarkupId(true);
sexField.setRequired(true);
add(sexField);
final FeedbackLabel sexFeedbackLabel = new
FeedbackLabel("sexFeedback", sexField);
sexFeedbackLabel.setOutputMarkupId(true);
add(sexFeedbackLabel);

//Code Snippet for AutoCompleteTextField//
AutoCompleteTextField cityField = new AutoCompleteTextField("city", new
Model()) {
@Override
protected Iterator getChoices(String input) {
if (Strings.isEmpty(input)) {
return Collections.EMPTY_LIST.iterator();
}
List choices = new ArrayList();
List name = reader.loadFile("cities.txt");//cities.txt
contains cities name...
Iterator itr = name.iterator();
while (itr.hasNext()) {
String nameIs = (String) itr.next();
if
(nameIs.toUpperCase().startsWith(input.toUpperCase())) {
choices.add(nameIs);
if (choices.size() == 10) {
break;
}
}
}
return choices.iterator();
}
};
cityField.setOutputMarkupId(true);
cityField.setRequired(true);
cityField.add(new StringValidator.MaximumLengthValidator(25));
final FeedbackLabel cityLabel = new
FeedbackLabel("cityFeedback", cityField);
cityLabel.setOutputMarkupId(true);
add(cityLabel);
cityField.add(new ComponentVisualErrorBehavior("onblur",
cityLabel));
add(cityField);
Label citLabel = new Label("city.label", "City");
add(citLabel);


Thank you
-- 
View this message in context: 
http://www.nabble.com/Form-Validations-tp22777684p22799307.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form Validations

2009-03-30 Thread Ashis

Actually when a submit button is clicked, the feedback error message is
displayed with all form components TextField ,AutoCompleteTextFields and
RadioChoice and when a valid values on form components are entered the
feedback error message dissapears within all TextField but feedback error
message does not dissapears  on AutoCompleteTextFields and RadioChoice.

I am using custom Feedback Level.
see:
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket

Thank you
-- 
View this message in context: 
http://www.nabble.com/Form-Validations-tp22777684p22798366.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Form Validations

2009-03-30 Thread Ashis

Hello all
I have a problem with a form, I want to add a feedBackPanel for each fields
added in my form. 
I used the custom FeedbackLabel i.e.
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket

But it did not worked on AutoCompleteTextFields and RadioChoice.

Any Help

-- 
View this message in context: 
http://www.nabble.com/Form-Validations-tp22777684p22777684.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Tabbed Panel problem

2009-03-03 Thread Ashis

Hello all,
   I am using Ajax Tabbed Panel.I have 4 tabs.First tab contains login form
and javascript to display images. When i run the project all works fine,
javascript displaying images also gets load but if i click the first tab
again the javascript displaying images does not gets load and blank page is
displayed in browser

Please suggest me some help
Thank you
-- 
View this message in context: 
http://www.nabble.com/Tabbed-Panel-problem-tp22324325p22324325.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



mssql connection problem

2009-02-02 Thread Ashis

Hello all,
   i have problem regarding mssql connection

/*Code Snippet for MSSQL connection***/
public static Connection getSqlConnection() throws SQLException {
   try {
   Context c = new InitialContext();
   DataSource dataSource = (DataSource)
c.lookup("java:/comp/env/jdbc/mssql");
   return dataSource.getConnection();
   } catch (NamingException err) {
   throw new SQLException();
   }
   }

I got a SQLEXCEPTION in getSqlConnection() function:
"*javax.naming.NameNotFoundException: cannot create resource instance"


/*Code Snippet of context path for MSSQL connection***/  



How can i remove this sql exception?
Looking forward to your suggestion.
Thank you

-- 
View this message in context: 
http://www.nabble.com/mssql-connection-problem-tp21787078p21787078.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: passing list from java class to javascript

2008-12-11 Thread Ashis

Thanks
Can you give some links,examples or clues how can i perform it.I wiil be
grateful to you


-- 
View this message in context: 
http://www.nabble.com/passing-list-from-java-class-to-javascript-tp20949804p20970838.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: passing list from java class to javascript

2008-12-11 Thread Ashis

Thanks guys,
   But i need to pass dynamic list which is stored in databases.I have a
method appList() which returns list of application users and i need to pass
it in javascript .Not a static list

Looking forward for your suggestions.


-- 
View this message in context: 
http://www.nabble.com/passing-list-from-java-class-to-javascript-tp20949804p20970595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



passing list from java class to javascript

2008-12-10 Thread Ashis

Hello all,
   I have a question i need to pass list from java class to javascript.

  How can i do this stuff?

Thanks
-- 
View this message in context: 
http://www.nabble.com/passing-list-from-java-class-to-javascript-tp20949804p20949804.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing appearance of ModalWindow?

2008-12-08 Thread Ashis

Thank you very much it worked. I am very grateful to you.

As you said w_captionText is for header part. Can you give me other property
like changing modal window borders etc.

Once again thanks Eyal Golan

-- 
View this message in context: 
http://www.nabble.com/Changing-appearance-of-ModalWindow--tp20880252p20894070.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing appearance of ModalWindow?

2008-12-08 Thread Ashis


Actually i mean i have added css class name as:
modal1.setCssClassName("w_caption"); 
and added property in it as:
span .w_caption{
color: red;
.
...
}
But it does not work.No any change in modal window?
-- 
View this message in context: 
http://www.nabble.com/Changing-appearance-of-ModalWindow--tp20880252p20893576.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing appearance of ModalWindow?

2008-12-08 Thread Ashis

Thanks again
Eyal Golan
  Header contribution really worked but i have problem in adding css
property.
  Would you please give me further details on css part


Thanks

-- 
View this message in context: 
http://www.nabble.com/Changing-appearance-of-ModalWindow--tp20880252p20891255.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing appearance of ModalWindow?

2008-12-07 Thread Ashis

Thanks,
Eyal Golan

But adding header contibution does not work. I have following css and code.
CSS
span .interVeil{
background-color:fuchsia;
color:lime;

**CODE***
public void onClick(AjaxRequestTarget target) {
 application = (Application) getParent().getModelObject();
 modal1.setTitle("Edit Application");
 modal1.setInitialHeight(365);
 modal1.setInitialWidth(830);
 modal1.show(target);
 add(HeaderContributor.forCss("common.css"));
 modal1.setCssClassName("interVeil");
}  

Your further suggestion will be greatly appreciated.
-- 
View this message in context: 
http://www.nabble.com/Changing-appearance-of-ModalWindow--tp20880252p20889846.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Changing appearance of ModalWindow?

2008-12-07 Thread Ashis

Dear all,
   How can i change the appearance of ModalWindow.Especially i want
to change the font colour of modalwindow title.


Thank you,
Ashis
-- 
View this message in context: 
http://www.nabble.com/Changing-appearance-of-ModalWindow--tp20880252p20880252.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]