Re: Error while importing package

2012-03-13 Thread Martin Grigorov
Check 
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-RemovedHeaderContributorandfriends.

On Mon, Mar 12, 2012 at 11:50 AM, Sudeep sudeepshaky...@gmail.com wrote:
 I'm using Netbeans 7.1.1 and i installed Wicket plugin (Wicket 1.5.3) and
 having problem while using the package
 org.apache.wicket.markup.html.resources.StyleSheetReference. This package
 is not recognized.
 I am using this package for StyleSheet. And I am a beginner.

 Thanks in Advance.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Error-while-importing-package-tp4465677p4465677.html
 Sent from the Users forum 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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Initiating File Download through Ajax is not working

2012-03-13 Thread Rain... Is wet!
I'm using the AJAXDownload with success in my current project (Wicket 1.5.4).

Just create an instance of the AJAXDownload, override getResourceStream to
return your IResourceStream and getFileName (would recommend it) to return
your desired filename.

When done, add it to your AJAXSubmit component (AjaxLink, AjaxFallbackLink
or AjaxButton... or similar) and initiate your download in its onSubmit
method via yourAJAXDownload.initiate(yourIResourceStream);.

Basically its 100% like in the example given here:
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html

-
Never forget your umbrella ! In case You did, try to find a shelter ;)
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Initiating-File-Download-through-Ajax-is-not-working-tp2289784p4469023.html
Sent from the Users forum 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



How does urlFor(..) work? (for dynamic resource, src= tag)

2012-03-13 Thread eugenebalt
I'm having a little trouble using /urlFor(..)/

Does every resource automatically get its own URL?

Let's say I have a DynamicWebResource. My DynamicWebResource is defined as a
dynamic PDF document *generated on the fly*.



This resource needs to be dynamically specified as data= for an  tag. I
wrote a wrapper for  that has this line, following the available Wicket
example,



The problem is that occasionally this does not work. My Web Server
(WebSphere) gives me the occasional error Invalid URL when I refresh or go
back to the form.

Is it true that every time I construct a new DynamicWebResource, I get a new
temporary URL? What is the meaning of the line  ?

I got it from this example:
https://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-does-urlFor-work-for-dynamic-resource-src-tag-tp4469212p4469212.html
Sent from the Users forum 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: Dot in DataTable Columnheader - not allowed?

2012-03-13 Thread Rain... Is wet!
@Igor Vaynberg-2: I guess You're right.
The error is outgoing from the PropertyColumns used in the DataTable.
Unfortunately we already extended the Datatable way too far to just switch
to another Column-Type (it's the time factor). But we will (hopefuly)
remember that cicumstance in our next project. For now it's goin fine with
just abandoning dot's as column descriptors^^
Thank You anyway :)

Regards
  Rain... is wet!

-
Never forget your umbrella ! In case You did, try to find a shelter ;)
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dot-in-DataTable-Columnheader-not-allowed-tp4413767p4469213.html
Sent from the Users forum 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: rough estimate of when wicket 1.6 will be released?

2012-03-13 Thread kamiseq
by 1.6 you mean 6, right?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Atmosphere multi-request

2012-03-13 Thread Pierre Goupil
Good afternoon,

I'm currently trying to integrate Atmosphere Comet framework and Wicket. I
used to have them working, but since the introduction of multi-request
functionality, I have been unable to integrate both of them.

So my question is simple: did anyone managed to have a working app with
Atmosphere multi-request and Wicket (any version)?

Regards,

Pierre Goupil


Re: Atmosphere multi-request

2012-03-13 Thread Martin Grigorov
Hi Pierre,

Can you give us a url that describes what multi-request is and what
issues do you face with it ?

On Tue, Mar 13, 2012 at 5:40 PM, Pierre Goupil goupilpie...@gmail.com wrote:
 Good afternoon,

 I'm currently trying to integrate Atmosphere Comet framework and Wicket. I
 used to have them working, but since the introduction of multi-request
 functionality, I have been unable to integrate both of them.

 So my question is simple: did anyone managed to have a working app with
 Atmosphere multi-request and Wicket (any version)?

 Regards,

 Pierre Goupil



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



WicketTester - getTagByWicketId

2012-03-13 Thread northar
Learning more about wickettests, i would need some help with
getTagByWicketId(String wicketid). I can't get it to return anything else
than null. Stuff like:

 tester.clickLink(panel:mycontainer:mylistview:0:link, true);
  tester.assertListView(panel:mycontainer:listview, testArray);
and even 
getTagById(the name of a id for a div in my  panel);
works fine in my tests

but.. when testing stuff like
getTagByWicketId(the name of a wicket:id for a component). i only get
null.
ie tried stuff like
getTagByWicketId(panel);
getTagByWicketId(panel:mycontainer);
getTagByWicketId(mycontainer);
getTagByWicketId(panel:mycontainer:mylistview);

Any hints for me that i missed?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketTester-getTagByWicketId-tp4470042p4470042.html
Sent from the Users forum 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



wicket checkboxe size

2012-03-13 Thread Carter, Isaac
Afternoon,

Does anyone know if it is possible to increase the size of a checkbox in wicket 
??


-Isaac Carter



This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.


Re: wicket checkboxe size

2012-03-13 Thread Jeff Schneller
Sure. Use CSS. 

Sent from my iPad

On Mar 13, 2012, at 4:48 PM, Carter, Isaac isaac.car...@mantech.com wrote:

 Afternoon,
 
 Does anyone know if it is possible to increase the size of a checkbox in 
 wicket ??
 
 
 -Isaac Carter
 
 
 
 This e-mail and any attachments are intended only for the use of the 
 addressee(s) named herein and may contain proprietary information. If you are 
 not the intended recipient of this e-mail or believe that you received this 
 email in error, please take immediate action to notify the sender of the 
 apparent error by reply e-mail; permanently delete the e-mail and any 
 attachments from your computer; and do not disseminate, distribute, use, or 
 copy this message and any attachments.

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



RE: wicket checkboxe size

2012-03-13 Thread Carter, Isaac
Lol.  I'm an idiot. Thanks.

-Isaac 

-Original Message-
From: Jeff Schneller [mailto:j...@mootus.com] 
Sent: Tuesday, March 13, 2012 4:53 PM
To: users@wicket.apache.org
Subject: Re: wicket checkboxe size

Sure. Use CSS. 

Sent from my iPad

On Mar 13, 2012, at 4:48 PM, Carter, Isaac isaac.car...@mantech.com wrote:

 Afternoon,
 
 Does anyone know if it is possible to increase the size of a checkbox in 
 wicket ??
 
 
 -Isaac Carter
 
 
 
 This e-mail and any attachments are intended only for the use of the 
 addressee(s) named herein and may contain proprietary information. If you are 
 not the intended recipient of this e-mail or believe that you received this 
 email in error, please take immediate action to notify the sender of the 
 apparent error by reply e-mail; permanently delete the e-mail and any 
 attachments from your computer; and do not disseminate, distribute, use, or 
 copy this message and any attachments.

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


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



Wicket 1.4.20 Autocomplete error

2012-03-13 Thread magicjean
Hi,

I've upgraded from 1.4.19 to 1.4.20: Now the autocomplete component shows an
error in IE8: target is empty or no object, row 121 wicket-autocomplete.js 

Besides the error message, autocomplete seems to work normally.

It doen's give an error in Firefox 9/10.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-20-Autocomplete-error-tp4470350p4470350.html
Sent from the Users forum 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



StackOverflow while getting browser info

2012-03-13 Thread André Schütz
Hi,

I have the following code in my MyApplication class:

{CODE}

public void init() {
super.init();
getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
getResourceSettings().setThrowExceptionOnMissingResource(false);

...
}

public Session newSession(Request request, Response response) {
MySession session = new MySession(request);

// determine default language from the browser
String defaultLanguage = null;
if (request != null  request.getClientUrl() != null  
!request.getClientUrl().toString().isEmpty()) {
defaultLanguage = 
session.getClientInfo().getProperties().getNavigatorLanguage();
}
Locale locale = session.getLocale();

// no locale available
if (locale == null) {
if (defaultLanguage != null) {
if (defaultLanguage.startsWith(en)) {
locale = new Locale(en, EN);
}
else if (defaultLanguage.startsWith(de)) {
locale = new Locale(de, DE);
}
}
else {
locale = new Locale(en, EN);
}

session.setLocale(locale);
}

return session;
}

{CODE}

I get an error, when I delete the Cookies in my browser and reload the actual 
page. The same error occurs when I delete the line ( if (request != null  
request.getClientUrl() != null  request.getClientUrl().toString().isEmpty()) 
{ ) from the code example at building time from the TestHomePage.java.

The error is:

{ERROR}

java.lang.StackOverflowError

org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)

org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:155)

org.apache.wicket.session.HttpSessionStore.lookup(HttpSessionStore.java:192)

org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1526)
org.apache.wicket.Session.get(Session.java:156)
org.apache.wicket.Application$1.onInstantiation(Application.java:279)

org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:36)

org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)

org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)

org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:32)
org.apache.wicket.Component.init(Component.java:678)
org.apache.wicket.MarkupContainer.init(MarkupContainer.java:118)
org.apache.wicket.Page.init(Page.java:206)
org.apache.wicket.Page.init(Page.java:170)
org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)

org.apache.wicket.markup.html.pages.BrowserInfoPage.init(BrowserInfoPage.java:66)

org.apache.wicket.protocol.http.WebSession.newBrowserInfoPage(WebSession.java:239)

org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:216)

{ERROR}

Any ideas why that happens?

Thank you,
Andre
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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



Re: Seeing sporadic ClassNotFoundExceptions after upgrading from 1.4.9 or 1.4.11

2012-03-13 Thread nhsoft.yhw
I have same problem also, This situation occasionally occurs.



Nitnatsnok wrote
 
 03-13 18:37:30.466[  WicketObjects.java:82 :WARN ] Could not resolve
 class [resources]
 java.lang.ClassNotFoundException: resources
   at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
   at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
   at
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
   at
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
   at
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
   at
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:268)
   at
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:131)
   at
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:184)
   at
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
   at
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
   at
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
   at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at
 org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399)
   at
 org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
   at
 org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
   at
 org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
   at
 org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)
   at
 org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
   at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
   at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
   at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:303)
   at
 org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:183)
   at
 org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:169)
   at
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
 


-
first wicket application: 114生活网 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Seeing-sporadic-ClassNotFoundExceptions-after-upgrading-from-1-4-9-or-1-4-11-tp3018268p4470715.html
Sent from the Users forum 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



[Announce] Wicket Stuff Core 1.5.5 Released

2012-03-13 Thread Michael O'Cleirigh


Hello,

Following the release of wicket 1.5.5 have cut a matching
wicketstuff-core release.

The artifacts have been promoted and are now available in maven central.

They can be retrieved like this:

dependency
groupIdorg.wicketstuff/groupId
artifactIdwicketstuff-tinymce/artifactId
version1.5.5/version
/dependency

The release tag is here:
https://github.com/wicketstuff/core/tree/wicketstuff-core-1.5.5

Development on the next release takes place on the core-1.5.x branch here:
https://github.com/wicketstuff/core/tree/core-1.5.x

Issues can be reported here: https://github.com/wicketstuff/core/issues

The Project Wiki is available here:
https://github.com/wicketstuff/core/wiki

Changelog between wicketstuff-core-1.5.4 and this release:

=Tom B (12):
  Cherry Picked into Core 1.5.x Insertable Changes (Mid cherry pick commit)
  More Cherry-picked commits from for the merge history AbstractPageableView 
clearCache support DataGrid InsertRow()  Igrid
  committing pull/merge from github WicketStuff/Core
  updating .gitignore to ignore IDEA project files
  ended up clarifying parameter order in .gitignore Cherry Pick: 
updating .gitignore to ignore IDEA project files
  [InMethod-Grid] Added Additional columns  LinkColumn - abstract  
PageLinkColumn - example implementation for linking to an
  [InMethod Grid] Updated the new classes for core-1.5.x compatibility 
Added Generics to the new columns Began Simplifying ar
  [InMethod Grid] rollback of Failed 1 html Table simplified if 
statements by removing useless '== true' made sure form exist
  [InMethod Grid] Final Cherry Pick Commit hopefully evertyhing is to 
rights now. Cherry Pick: [InMethod Grid] remove errant
  [InMethod Grid]Final Cherry Pick Commit hopefully everything is to rights 
not. CherryPick [InMethod Grid] remove errant generic
  [InMethod Grid] reset poms to remove local build changes delete 
extraneous/erroneous files from another project org.cometd.java
  [InMethod Grid] compile fixes  + removed unused logger in 
AddRecordsToolbar - testing/debugging artifact  + corrected isFoc

Michael O'Cleirigh (2):
  [wicket-security] Change wicket-util dependency type due to wicket 
upstream change
  commit wicketstuff-core 1.5.5 release pom's

chrisco484 (2):
  Merge pull request #96 from raystorm/raystorm-inmethod-grid
  Merge pull request #98 from raystorm/raystorm-inmethod-grid

Andrei Costescu (1):
  Manually merged changes from 1.4 branch. Options that should evaluate 
to function objects browser side should not escape un


(This listing was generated using: git shortlog -n
wicketstuff-core-1.5.4..wicketstuff-core-1.5.5).

I will plan to do the next release within one month of today but if you
commit code and/or need a release cut sooner please file a ticket.

Regards,

Mike


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



Re: How to submit a result of dropdownchoice and a result of input text simultaneously?

2012-03-13 Thread xiaowang
I am totally new in wicket, can anyone help me?
Now my code is:

 //dropdownbox
add(new FeedbackPanel(dropdownfeedback));
DropDownChoiceString listSites = new DropDownChoiceString(
sites, new PropertyModelString(this, 
selected),
SEARCH_ENGINES);


Form? dropdownform = new FormVoid(dropdownform) {
@Override
protected void onSubmit() {

info(You select :  + selected);
 
}
};   

//add name text
TextFieldString Name = new TextFieldString(Name);
Name.setRequired(true);
dropdownform.add(Name);
ComponentFeedbackPanel fbName = new
ComponentFeedbackPanel(fbName, Name);
dropdownform.add(fbName); 
//add Age text
TextFieldString Age = new TextFieldString(Age);
Age.setRequired(true);
dropdownform.add(Age);
ComponentFeedbackPanel fbAge = new 
ComponentFeedbackPanel(fbAge,
Age);
dropdownform.add(fbAge); 

add(dropdownform);
dropdownform.add(listSites);

It get a Attempt to set model object on null model of component:
dropdownform:Name

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-submit-a-result-of-dropdownchoice-and-a-result-of-input-text-simultaneously-tp4469660p4469677.html
Sent from the Users forum 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



AjaxSelfUpdatingBehavior .. page expired

2012-03-13 Thread mlabs
I am using a tab panel... 
On one tab I added an AjaxSelfUpdatingBehavior because I want the contents
of the panel to refresh periodically.
When I switch away from that tab to another tab, I get 'page expired' ...

what am I doing wrong?

TIA

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingBehavior-page-expired-tp4470925p4470925.html
Sent from the Users forum 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: StackOverflow while getting browser info

2012-03-13 Thread Dan Retzlaff
Andre, check out this javadoc comment on Session#getClientInfo:

 * Note: Do strongnot/strong call this method from your custom {@link
Session} constructor
 * because the temporary page needs a constructed {@link Session} to be
able to work.

Dan

2012/3/13 André Schütz andre-p...@gmx.de

 Hi,

 I have the following code in my MyApplication class:

 {CODE}

 public void init() {
super.init();
getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
getResourceSettings().setThrowExceptionOnMissingResource(false);

...
 }

 public Session newSession(Request request, Response response) {
MySession session = new MySession(request);

// determine default language from the browser
String defaultLanguage = null;
if (request != null  request.getClientUrl() != null 
 !request.getClientUrl().toString().isEmpty()) {
defaultLanguage =
 session.getClientInfo().getProperties().getNavigatorLanguage();
}
Locale locale = session.getLocale();

// no locale available
if (locale == null) {
if (defaultLanguage != null) {
if (defaultLanguage.startsWith(en)) {
locale = new Locale(en, EN);
}
else if (defaultLanguage.startsWith(de)) {
locale = new Locale(de, DE);
}
}
else {
locale = new Locale(en, EN);
}

session.setLocale(locale);
}

return session;
}

 {CODE}

 I get an error, when I delete the Cookies in my browser and reload the
 actual page. The same error occurs when I delete the line ( if (request !=
 null  request.getClientUrl() != null 
 request.getClientUrl().toString().isEmpty()) { ) from the code example at
 building time from the TestHomePage.java.

 The error is:

 {ERROR}

 java.lang.StackOverflowError

  
 org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)

  
 org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:155)

  org.apache.wicket.session.HttpSessionStore.lookup(HttpSessionStore.java:192)

  org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1526)
org.apache.wicket.Session.get(Session.java:156)

  org.apache.wicket.Application$1.onInstantiation(Application.java:279)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:36)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)

  
 org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)

  
 org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:32)
org.apache.wicket.Component.init(Component.java:678)
org.apache.wicket.MarkupContainer.init(MarkupContainer.java:118)
org.apache.wicket.Page.init(Page.java:206)
org.apache.wicket.Page.init(Page.java:170)
org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)

  
 org.apache.wicket.markup.html.pages.BrowserInfoPage.init(BrowserInfoPage.java:66)

  
 org.apache.wicket.protocol.http.WebSession.newBrowserInfoPage(WebSession.java:239)

  org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:216)

 {ERROR}

 Any ideas why that happens?

 Thank you,
 Andre
 --
 Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
 belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

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




Re: How to submit a result of dropdownchoice and a result of input text simultaneously?

2012-03-13 Thread Dan Retzlaff
You need to give form components like DropDownChoice and TextField an
IModel into which the submitted value will be placed. You did this with a
PropertyModel for your DropDownChoice. You need to do similar for the
TextField.

Good luck, I hope you enjoy Wicket!

On Tue, Mar 13, 2012 at 10:26 AM, xiaowang jy00807...@gmail.com wrote:

 I am totally new in wicket, can anyone help me?
 Now my code is:

  //dropdownbox
add(new FeedbackPanel(dropdownfeedback));
DropDownChoiceString listSites = new
 DropDownChoiceString(
sites, new PropertyModelString(this,
 selected),
 SEARCH_ENGINES);


Form? dropdownform = new FormVoid(dropdownform) {
@Override
protected void onSubmit() {

info(You select :  + selected);

}
};

//add name text
TextFieldString Name = new TextFieldString(Name);
Name.setRequired(true);
dropdownform.add(Name);
ComponentFeedbackPanel fbName = new
 ComponentFeedbackPanel(fbName, Name);
dropdownform.add(fbName);
//add Age text
TextFieldString Age = new TextFieldString(Age);
Age.setRequired(true);
dropdownform.add(Age);
ComponentFeedbackPanel fbAge = new
 ComponentFeedbackPanel(fbAge,
 Age);
dropdownform.add(fbAge);

add(dropdownform);
dropdownform.add(listSites);

 It get a Attempt to set model object on null model of component:
 dropdownform:Name

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-submit-a-result-of-dropdownchoice-and-a-result-of-input-text-simultaneously-tp4469660p4469677.html
 Sent from the Users forum 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