Re: How to get session from panel ?

2007-12-20 Thread Suad AlShamsi

Did you try to get it from the application. getApplicaion().getSession();

tsuresh wrote:

Hello,
I have Panel called MenuPanel and a page WelcomePage. When the user is
authenticated through Login page  the user is forwarded to WelcomePage. This
WelcomePage consists of MenuPanel. How do I get the user session from the
MenuPanel. I simply added the MenuPanel in WelcomePage as

 add(new MenuPanel("menuBar"));


and in MenuPanel I tried to get Session as
LoginSession sess = (LoginSession) getSession();

But this sess returned null;

I have made the LoginSession class. I have set user session in Login page as 
..

session.setUser(user);

Am i missing something?
thanks
  



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



Re: Where is DatePicker for 1.3 ?

2007-12-24 Thread Suad AlShamsi

You can find it in wicket-datetime.jar

smallufo wrote:

I am upgrading to Wicket 1.3 rc2
But found no DatePicker component.
The only one I can find seems for 1.2.x
http://sourceforge.net/project/showfiles.php?group_id=134391&package_id=210945

Can somebody tell me where to find DatePicker for 1.3 ?

  



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



Re: Bug in MultiFileUploadField

2008-01-05 Thread Suad AlShamsi

I was able to reproduce the same bug as well. I am using IE 6


Igor Vaynberg wrote:

On Jan 5, 2008 1:03 AM, Franklin Antony <[EMAIL PROTECTED]> wrote:
  

1)If I enter some data in the file upload field and just move out(something
like loose focus), then that entry I placed inside the text file just gets
listed below. My suggestion would be somehow to get that field as disabled



cant do that. the field is input type="upload". if we disable it then
the browse button will be disabled also.

  

2)If you enter some data in the field and click just below the text field
so as your click will be placed right on top of the delete, then you can
enter data inside the "Delete button". My suggestion is that if the text
field is disabled then this problem might not come.



that sounds like a browser bug. which one are you using? the delete
button is just input type="button", not sure why you can enter text
into it.

  

3)Not really sure how I can do internationalization.



see .properties files next to the .java/.class file for resource keys available.

-igor


  

I would really appreciate your help.
I have placed an image to show the problems also

Thanks guys for all the help.
Franklin.


Problem Image:  http://www.nabble.com/file/p14631169/wicket_bug.jpg

--
View this message in context: 
http://www.nabble.com/Bug-in-MultiFileUploadField-tp14631169p14631169.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]





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


  




Re: Session managment

2007-10-20 Thread Suad AlShamsi

So there is no improvement on the heavy session drawback?!

Johan Compagner wrote:

nothing changed about that.
you still have to you detacheable models when using db data


On 10/20/07, alshamsi <[EMAIL PROTECTED]> wrote:
  

Hi,
 How does wicket 1.3 handle sessions differently than wicket 1.2?
 Assume that I am using wicket 1.3 and I need to reteive too many records
from the database, will these records be stored in the user session? Will
wicket handle that or do I need to use the detach model?

Regards,
AlShamsi


Eelco Hillenius wrote:


On 9/23/07, tsuresh <[EMAIL PROTECTED]> wrote:
  

Hello, can someone please explain me how Session handling works in wicket


Wicket has it's own abstraction of user sessions:
org.apache.wicket.Session, though you'll typically use a derivative
like WebSession. *Typically* - depending on the session store
(ISessionStore) you use, Wicket sessions are linked to the Servlet
API's HttpSessions. If they are, Wicket sessions are stored in
HttpSessions if the HttpSessions exist yet, or they are temporary
(just for the current request) otherwise.

Wicket provides it's own abstraction to give you more flexibility
independent of the servlet container you use in where sessions are
stored, and it also tries to encourage you to code session variables
in a strongly typed fashion.

Pages are stored in page maps. You can compare page maps with browser
windows. Page maps are created by session stores, but they can
implement persistency of pages independently.

The default session store implementation for Wicket 1.3,
SecondLevelCacheSessionStore (extends HttpSessionStore), stores Wicket
session objects in the HttpSession, but pages in cache. First level of
cache is simply RAM and is used for the current page (since there is a
big chance it will be hit in the next request), second level cache is
implemented through an implementation of IPageStore, which by default
serializes pages to a temp file per session. Pages are typically only
read from second level cache when the user pushes the back button.

  

1.3. It would be better if you explain with an example.


If you really want to understand it, pick up wicket-examples and place
some break points here and there to see what happens.

Eelco

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



  

--
View this message in context:
http://www.nabble.com/Session-managment-tf4503470.html#a13309608
Sent from the Wicket - User mailing list archive at Nabble.com.


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





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


  




Exception Handling

2007-10-22 Thread Suad AlShamsi

Hi All,

   I am working on a project and I am using wicket 1.3 for the view 
layer, spring for service layer, and oracle database. As you know there 
are two types of exception I need to take care of. One is the business 
logic exception thrown from the service layer and the other one is the 
RuntimeException. What is the best practice of handling these two type 
of exception in wicket. Should I override the 
RequestCycle.onRuntimeException() to handle both of the cases?!


Regards,
Suad

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



Re: dummy question, how to set wicket in Deloyment mode?

2007-10-23 Thread Suad AlShamsi

You can either override getConfigurationType() in the Application class


@Override
   public String getConfigurationType() {
   return Application.DEPLOYMENT;
   }

or you can set in in the web.xml

   
   configuration
   deployment
   

Regards,
Suad

raybristol wrote:

dummy question, how to set wicket in Deloyment mode? There is a
Application#getConfigurationType() but I expect something like
Application#setConfigurationType() which does not exist so I thing I must
miss something here...

Many thanks
  



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



Re: Internationalization and Component orientation

2007-10-23 Thread Suad AlShamsi

Its working thank you so much.

Jeremy Thomerson wrote:

I haven't used the mechanism, but I believe that with all of your files
(html / properties / etc), you should just be able to add the locale
abbreviation to the end of the file to override the default content.

For instance, if you can re-arrange the layout of your pages by just
overriding CSS, you might be able to just override your master CSS file

global.css (default css)
global_ar.css (Arabic css)

If you need to override actual HTML, you should be able to do the same:

YourPage.html
YourPage_ar.html

Hope this helps

Jeremy Thomerson

On 10/23/07, alshamsi <[EMAIL PROTECTED]> wrote:
  

Hi All,

   I am developing an application that supports English and Arabic.
Therefore based on the locale I need to shift components from right to
left
and vice versa. Does wicket provide any utility to facilitate that? Does
anybody know any other framework that can be used on top of wicket to do
so?

Regards,
Suad
--
View this message in context:
http://www.nabble.com/Internationalization-and-Component-orientation-tf4679985.html#a13372442
Sent from the Wicket - User mailing list archive at Nabble.com.


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





  




OutOfMemoryError

2007-10-24 Thread Suad AlShamsi

Hi All,

   I am getting this error often since I started using Wicket?! Any 
idea what is the real cause for it?!



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

javax.servlet.ServletException: Error allocating a servlet instance

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

*root cause*

java.lang.OutOfMemoryError: PermGen space



Re: Logging to a File

2007-10-24 Thread Suad AlShamsi

Thanks

Jan Kriesten wrote:

How can I log to a file using log4j?!



documentation is found here: http://slf4j.org/

there's a wrapped implementation for log4j.

regards, --- jan.



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


  




Clearing Session

2007-10-24 Thread Suad AlShamsi

Hi All,
   After submitting a form the input data will be persisted in the 
database and the user  will be directed to another page. How can I clear 
the input data from the session?!


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



Re: Clearing Session

2007-10-26 Thread Suad AlShamsi

Removing the page is throwing the following exception:

Caused by: java.lang.IllegalStateException: Cannot remove [Page class = 
com.individual.registration.RegisterationPage, id = 6, version = 0] from 
null parent!

   at org.apache.wicket.Component.remove(Component.java:1896)

What I have is 3 pages. Page 1 has a form component, Page 2 has another 
form components, and Page 3 is has a label component. After submitting 
the form on page 1 the user will be directed to page 2 and after 
submitting the form the user will  be directed to page 3. What I want to 
prevent the user from using the browser back button after submitting the 
form. The user should get the page has been expired.


I tried getPageMap().clear(); after setResponsePage(page); in onSubmit() 
but nothing happen. Then I tried getPage().remove(); I got the exception 
mentioned earlier. Please help me.


Regards,
Suad


Johan Compagner wrote:

call remove page then the page is gone and can't be reconstructed anymore
Ofcourse people can still use the back button (if the url did change from
the first to the second page)
and when they do that they will get a page expired.
Or maybe on the second page you have some javascript that clears the window
history somehow.

johan



On 10/25/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:
  

Your right, actually what I need is to stop the browser back button, which
means I need to disable the default second cache, writting to the file
system. How can I do so.

Another question, what is a temporary session, how can been created, when
to use it?

Johan Compagner wrote:

you go to another page so the previous page is not in the session anymore
(wicket 1.3)



On 10/24/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:


Hi All,
   After submitting a form the input data will be persisted in the
database and the user  will be directed to another page. How can I clear

the input data from the session?!

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


  



  




Re: Clearing Session

2007-10-27 Thread Suad AlShamsi

You are right. I should not have remove the page from the constructor.

I place *getPageMap().remove(this);*  after the setResponsePage in all 
the pages. What is happening is


From Page 1 to Page 2 when using the back button the page expired
From Page 2 to Page 3 when using the back button the page *NOT* expiring
From Page 3 to Page 4 when using the back button the page expired


I do not know why is it so. From Page 2 to Page 3 I am sending an object 
that holds the input data. So, Could it be the reason for such a behavior.


By the why in Page 2 if I call this.setEnabled(false); after 
*getPageMap().remove(this);* when using the browser back button the page 
is getting expired.


Any idea what is happening?!

Regards,
Suad

Johan Compagner wrote:

You can't call remove from page map from Inside the page constructor!!
it isn't even IN the pagemap yet because the page is not yet constructed
and why do you think you do? why would you remove a page from the pagemap
when you still construct it and want to use it also again as a request page
(i see links on in...)

public class WelcomePage extends BasePage
{
public WelcomePage()
{
add(new Link("RegistrationFormLink"){
public void onClick()
{
setResponsePage(new RegisterationPage());
*getPageMap().remove(this);*
}
});
}
}

above code should work i hope. The only thing i don't know currently if it
works correctly
is that when you call remove maybe the detach phase of the page is then
putting it back in
(Matej? do will support this still with all the new changes??)

johan



On 10/27/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:
  

I am using wicket 1.3 bita4 and all what really need is whenever the user
is navigating using the browser back and forward button is to see page
expired.
Here is snap of my code. Can you please tell me what am doing wrong

*Page 1 (Home Page)
*public class WelcomePage extends BasePage
{
public WelcomePage()
{
add(new Link("RegistrationFormLink"){
public void onClick()
{
setResponsePage(new RegisterationPage());
}
});
*this.getPageMap().remove(this);*
}
}

*Page 2
*public class RegisterationPage extends BasePage
{
private Individual user;
public RegisterationPage()
{
user = new Individual();
add(new RegisterationForm("regForm", new
CompoundPropertyModel(user)));

*this.getPageMap().remove(this);*
}
private class RegisterationForm extends Form
{

public RegisterationForm(String name, CompoundPropertyModel model)
{
super(name, model);

//Form Fields
   *** Adding some fields to the form

public void onSubmit()
{
 ConfirmationPage confPage = new ConfirmationPage(user);
setResponsePage(confPage);
*this.getPage().getPageMap().remove(this.getPage());*
}
}
}

*Page 3*

public class ConfirmationPage extends BasePage
{
private Individual user;

public ConfirmationPage(Individual ind)
{
add(new InputForm("confForm", new CompoundPropertyModel(user));
*this.getPageMap().remove(this);*
}
private class InputForm extends Form
{
public InputForm(String name, CompoundPropertyModel model)
{
super(name, model);

//Form Fields
***adding Some fields
}
public void onSubmit()
{
setResponsePage(new SucessPage());
*this.getPage().getPageMap().remove(this.getPage());*
}
}
}
*Page 4*
public class SucessPage extends BasePage
{
public SucessPage()
{
//Construct form feedback, and link panel and hook them up
final FeedbackPanel feedback = new FeedbackPanel("feedback");
add(feedback);

*this.getPageMap().remove(this);*
}
}


Regards,
Suad
*
*
Johan Compagner wrote:

what do you mean you added the above call to all the pages?
How do you do that?


On 10/26/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:


 --> PageMap.clear should work but it is a bit strange call to do. Why
do you want
to delete all pages? But what do you say nothing happens? What
do you expect to see happening?

   These pages are public pages used for user registration which
takes number of steps to complete. I dont want the user to use the back
button to reset any of the previous forms. I want the page to expired in
case the user is using the back button. But the pages are not getting
expired.


Page.getPageMap().remove(Page)

I added the above call to all the pages but it only expires the first
page.

Suad


Johan Compagner wrote:

PageMap.clear should work but it is a bit strange call to do. Why do you
want
to delete all pages? But what do you say n

Spring Authenticated Web Application

2007-11-04 Thread Suad AlShamsi

Hi All,

   I am currently working on a project which uses Wicket as view layer 
and Spring as service layer, therefore my web application class extends 
Spring Web Application. I want to integrate Acegi in order to handle the 
security issues. I came across this article 
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html that 
explains the integration between wicket and acegi. However it mentions 
that I need to extend AuthenticatedWebApplication.


So, what should I do in this case? is there any other class the I can 
extend that combine both Spring and Acegi? is there any other way to 
integrate Acegi?


Regards,
Suad

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



Re: Spring Authenticated Web Application

2007-11-05 Thread Suad AlShamsi

Thanks alot I will check it out .


Michael Sparer wrote:
Hi, 


all steps required for integrating acegi into your wicket-app are described
on http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html. however
you'll get problems if you want to chain multiple filters, especially the
concurrentsessionfilter since you've got to configure your own
authentication object. i.e. you'll have to call the
authentication.setDetails method on your own, or you'll end up seeking a bug
for hours, just like I did :-)
for me personally, the wicket-security implementation (wasp+swarm) is enough
for authentication and authorization (that being said in the development
phase, I'll post it here if it makes problems in production).
the wicket-security stuff including tutorials etc. can be found here:
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

regards


alshamsi wrote:
  

Hi All,

I am currently working on a project which uses Wicket as view layer 
and Spring as service layer, therefore my web application class extends 
Spring Web Application. I want to integrate Acegi in order to handle the 
security issues. I came across this article 
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html that 
explains the integration between wicket and acegi. However it mentions 
that I need to extend AuthenticatedWebApplication.


So, what should I do in this case? is there any other class the I can 
extend that combine both Spring and Acegi? is there any other way to 
integrate Acegi?


Regards,
Suad

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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  




Re: How can I switch page direction (LTR-RTL)?

2007-11-14 Thread Suad AlShamsi
In your html page you can use the set the dir attribute of the html tag 
to the direction you want


http://www.w3.org/1999/xhtml";  dir="ltr">

I believe you can do so automatically using the new attribute modifier.

Regards
Alshamsi


nlif wrote:

Hi all,

I would like to be able to set the page direction: right-to-left or
left-to-right.
This can be done via the browser's view -> switch page direction
menu-option,
but I need to be able to set this dynamically (i.e. by the application),
based on the locale.
Is this supported in Wicket?


Thanks,
Naaman


  



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



Re: Multi-file upload and ListView together

2007-11-15 Thread Suad AlShamsi

Hi Frank,
   The multiFileUpload uses a collection to store the uploaded files. 
If you want to have N number of MultiFileUpload then u need N number of 
collections. So basiclly u need a collection of collection. The first 
one is to represent each multiFileUpload component and the the second is 
to hold the uploaded files. Have a look at the sample code.


fBeans is a list of fbean, which store the description of the file, the 
number of copies, and the collection where the files will be store.




setModel(new CompoundPropertyModel(fBeans));
  
   ListView view = new ListView("fileViewList", fBeans)

   {

   protected void populateItem(ListItem item) {
  
   Fbean f = (Fbean) item.getModelObject();

   item.add(new Label("desc", f.getDesc()+" : "));
   item.add(new MultiFileUploadField("fileInput", new 
PropertyModel((Fbean) item.getModelObject(), "uploads"), f.getCopies()));

   }
  
   };


Regards,
Al Shamsi

Franklin Antony wrote:

Dear All,
   I am badly in need to implement this. Therefore I am placing the code
here I really didnt want to do this. I have a feeling I am placing the
collections in the wrong place.


import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.Application;
import org.apache.wicket.Component;
import org.apache.wicket.PageParameters;
import
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.form.upload.FileUpload;
import org.apache.wicket.markup.html.form.upload.FileUploadField;
import org.apache.wicket.markup.html.form.upload.MultiFileUploadField;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.link.PopupSettings;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.util.file.Files;
import org.apache.wicket.util.file.Folder;
import org.apache.wicket.util.lang.Bytes;
import org.apache.wicket.util.tester.DummyHomePage;

import com.datelservices.domain.Attachment;
import com.datelservices.util.upload.dao.PassportDocDAO;

public class FileUploadPage extends WebPage{

	 
 public  List fileUpload = new ArrayList();
   
 
	 public  Collection pageUploads = new ArrayList();
	 
 public Collection getPageUploads()

 {
return pageUploads;
 }
	 
	 
	 PropertyModel  pmPage ;



   


private class FileUploadForm extends Form
{


private  Collection formUploads = new ArrayList();
PropertyModel  pmForm =new PropertyModel(this,"formUploads");



public Collection getFormUploads()

{
return formUploads;
}


public FileUploadForm(String name)

{
super(name);

setMultiPart(true);




List ls = Arrays.asList(new String[]{"Passport ","Scan ","Many

More "});
//FileListView pl = new FileListView("plist",ls);


ListView pl = new ListView("plist",ls) 
{ 
	

protected void populateItem(ListItem arg0) {

MultiFileUploadField ff=new 
MultiFileUploadField("file_input",new
PropertyModel(FileUploadPage.this,"pageUploads"),3);
arg0.add(ff);
arg0.add(new 
Label("lbb",arg0.getModelObjectAsString()));

}

};

pl.setReuseItems(true);

add(pl);






// Set maximum size 
double maxLimit =

((UploadApplication)Application.get()).getConfigProperty().getMaxFileUploadSize();
System.out.println("File upload limit is " + maxLimit);
setMaxSize(Bytes.kilobytes(maxLimit));
}

/**
  

Re: Required RadioGroup

2007-11-16 Thread Suad AlShamsi

I added it .. Nothing changed?! I am still getting the same problem.

Martijn Dashorst wrote:

add:

modes.setReuseItems(true);

Martijn

On 11/16/07, alshamsi <[EMAIL PROTECTED]> wrote:
  

Hi All,

I want to add the required validation on a RadioGroup component. I added the
setRequired(true); What happens is that if the user did not select a radio
choice the validation msg will be shown. what should be the case. but if the
user selected a radio after that, the same msg will appear?! instead the
user was suppose to be redirected to another page..



   RadioGroup group = new RadioGroup("type");
   ListView modes = new ListView("numbers", NUMBERS)
   {
protected void populateItem(ListItem item)
{
item.add(new Radio("radio", item.getModel()));
item.add(new Label("number",
item.getModelObjectAsString()));
};
};

group.add(modes);
group.setRequired(true);
add(group);

Regards,
Alshamsi
--
View this message in context: 
http://www.nabble.com/Required-RadioGroup-tf4819483.html#a13788217
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: Required RadioGroup

2007-11-16 Thread Suad AlShamsi
I am using 1.3 beta 4. I copied from wicket examples as well but its not 
working.



Martijn Dashorst wrote:

I just did this in the FormInput example of Wicket examples
(1.3.0-rc1) and it works:

RadioGroup group = new RadioGroup("numbersGroup");
add(group);
ListView persons = new ListView("numbers", NUMBERS)
{
@Override
protected void populateItem(ListItem item)
{
item.add(new Radio("radio", 
item.getModel()));
item.add(new Label("number", 
item.getModelObjectAsString()));
};
}.setReuseItems(true);
group.add(persons);
group.setRequired(true);


Martijn

On 11/16/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
  

what version of Wicket are you working on?

On 11/16/07, Suad AlShamsi <[EMAIL PROTECTED]> wrote:


I added it .. Nothing changed?! I am still getting the same problem.

Martijn Dashorst wrote:
  

add:

modes.setReuseItems(true);

Martijn

On 11/16/07, alshamsi <[EMAIL PROTECTED]> wrote:



Hi All,

I want to add the required validation on a RadioGroup component. I added the
setRequired(true); What happens is that if the user did not select a radio
choice the validation msg will be shown. what should be the case. but if the
user selected a radio after that, the same msg will appear?! instead the
user was suppose to be redirected to another page..



   RadioGroup group = new RadioGroup("type");
   ListView modes = new ListView("numbers", NUMBERS)
   {
protected void populateItem(ListItem item)
{
item.add(new Radio("radio", item.getModel()));
item.add(new Label("number",
item.getModelObjectAsString()));
};
};

group.add(modes);
group.setRequired(true);
add(group);

Regards,
Alshamsi
--
View this message in context: 
http://www.nabble.com/Required-RadioGroup-tf4819483.html#a13788217
Sent from the Wicket - User mailing list archive at Nabble.com.


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



  



  

--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/





  




Re: Issue with Internationalization of Non ascii characters

2007-11-27 Thread Suad AlShamsi
I faced the same problem with Arabic character. I used native2ascii.exe 
to encode the property files and I used encoding="utf-8" in my html 
pages and then it worked.


Regards,
Suad

abaijal wrote:

Hi All

I am new to wicket framework and am trying to implement internationalization
for Russian Characters. 


When displaying Russian characters on screen, Wicket rendering displays
garbage values 


I am using Wicket 1.2.6 and Weblogic 8.1 SP3

Things I have already tried :
1)HTML pages have charset as UTF- 8 as part of the META tag. 
2) The Property files and HTML files have been encoded as UTF-8 files so as
to save any non-ascii characters.
3 ) Checked settings of Browsers. All External internet links with non-ascii
characters work properly in browser. Tried both on IE6 and on Firefox 2.0

My Observations : 
1) While trying to display non ascii characters , garbage value appears on

the screen. Apart from pulling data from property file I have also hard
coded non-ascii characters in HTML file. Even hardcoded characters do not
get displayed properly on web browser.
2) The HTML files are present in WEB-INF/classes/.. folders. If I place the
same HTML file outside the WEB-INF folder and put a direct  link  to the
html file, russian characters appear correctly on the screen.
3 ) Using the method getLocale().getLanguage() I tried to display "Russian"
in non-ascii character. This phrase appeared correctly on browser screen.

It seems that when Wicket tries to render the Web-page the non-ascii
characters are getting distorted. 
  



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