Re: CssBehaviour can't find css files

2014-01-16 Thread Anna Simbirtsev
Thank you for your help, I found a solution to the problem.

response.render(CssHeaderItem.forUrl("info/css/styles.css"));

this looks into root directory

and
response.render(
CssReferenceHeaderItem.forReference(new CssResourceReference(getClass(),
"info/css/tooltip.css")));
the package of this class

Somehow with wicket its much easier to find a solution by just looking at
the source code.



On Thu, Jan 16, 2014 at 2:42 AM, Martin Grigorov wrote:

> Yes.
> It doesn't (build):
>
> mvn clean
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project sampleApp:sampleApp:1.1
> (/home/martin/tmp/debug/sampleApp/pom.xml) has 11 errors
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-core:jar must be a valid version but is
> '${wicket.version}'. @ line 15, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-extensions:jar must be a valid version but is
> '${wicket.version}'. @ line 19, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-datetime:jar must be a valid version but is
> '${wicket.version}'. @ line 23, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-devutils:jar must be a valid version but is
> '${wicket.version}'. @ line 27, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-jmx:jar must be a valid version but is
> '${wicket.version}'. @ line 31, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.springframework:spring-core:jar must be a valid version but is
> '${spring.version}'. @ line 36, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.springframework:spring-context:jar must be a valid version but is
> '${spring.version}'. @ line 41, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.springframework:spring-web:jar must be a valid version but is
> '${spring.version}'. @ line 46, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.apache.wicket:wicket-spring:jar must be a valid version but is
> '${wicket.version}'. @ line 64, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.mortbay.jetty:jetty:jar must be a valid version but is
> '${jetty.version}'. @ line 130, column 16
> [ERROR] 'dependencies.dependency.version' for
> org.mortbay.jetty:jetty-util:jar must be a valid version but is
> '${jetty.version}'. @ line 136, column 16
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
>
>
> You should respect more our time.
> We want to help but you must make an effort yourself!
>
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Wed, Jan 15, 2014 at 8:24 PM, Anna Simbirtsev  >wrote:
>
> > http://www.freeuploadsite.com/do.php?id=31499
> >
> > Here is a link to sample application. I t may not run.
> >
> >
> > On Wed, Jan 15, 2014 at 10:23 AM, Martin Grigorov  > >wrote:
> >
> > > Please create a quickstart application showing the problem.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Wed, Jan 15, 2014 at 5:13 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > Error 404
> > > > NOT_FOUNDHTTP ERROR 404Problem
> > > > accessing
> > > >
> > >
> >
> /wat-application/wicket/resource/CSSLinksInjector/info/css/styles-ver-1389797413000.css.
> > > > Reason:NOT_FOUNDPowered by
> > > > Jetty://
> > > >   
> > > >  
> > > >    
> > > >  
> > > > 
> > > >   
> > > > 
> > > >
> > > >  
> > > &

Re: CssBehaviour can't find css files

2014-01-15 Thread Anna Simbirtsev
http://www.freeuploadsite.com/do.php?id=31499

Here is a link to sample application. I t may not run.


On Wed, Jan 15, 2014 at 10:23 AM, Martin Grigorov wrote:

> Please create a quickstart application showing the problem.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Wed, Jan 15, 2014 at 5:13 PM, Anna Simbirtsev  >wrote:
>
> > Error 404
> > NOT_FOUNDHTTP ERROR 404Problem
> > accessing
> >
> /wat-application/wicket/resource/CSSLinksInjector/info/css/styles-ver-1389797413000.css.
> > Reason:NOT_FOUNDPowered by
> > Jetty://
> >   
> >  
> >
> >  
> > 
> >   
> > 
> >
> >  
> > 
> >
> >  
> > 
> >
> >  
> >
> > This error is shown inside the css file. I moved file in src/main/java/.
> >
> >
> >
> > On Tue, Jan 14, 2014 at 2:05 PM, Anna Simbirtsev  > >wrote:
> >
> > > Once I moved the file in src/main/java/ without any package, it does
> not
> > > show errors that it cant find it, so it is found, it just does not show
> > any
> > > css.
> > >
> > >
> > > On Tue, Jan 14, 2014 at 10:31 AM, Martin Grigorov <
> mgrigo...@apache.org
> > >wrote:
> > >
> > >> The reason is that you use info.afilias.WAT.UI.CSSLinksInjector as a
> > scope
> > >> and the resources are looked up relative to it in the package
> structure.
> > >> In 1.4 it worked because you use '/info/...' - the leading slash
> > resolved
> > >> to the root package.
> > >> This has been changed because of security problems and the leading
> slash
> > >> is
> > >> removed.
> > >> I think latest 1.4.x also have this fix but I'm not 100% certain.
> > >>
> > >> If you want to keep the resources there you have to use a class in the
> > >> root
> > >> package as a scope.
> > >> I.e. create a new class in src/main/java/ folder and use it at:
> > >> CssReferenceHeaderItem.forReference(new CssResourceReference(HERE, ..
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >>
> > >>
> > >> On Tue, Jan 14, 2014 at 5:22 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > >> >wrote:
> > >>
> > >> > The file structure is
> > >> >
> > >> > myApplication/src/main/java
> > >> > myApplication/src/main/resources/info/css/ that has all css files
> > >> > myApplication/src/main/resources/info/images has all the images
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > On Tue, Jan 14, 2014 at 10:04 AM, Martin Grigorov <
> > mgrigo...@apache.org
> > >> > >wrote:
> > >> >
> > >> > > What is the file structure ?
> > >> > > What packages and files you have in UI package ?
> > >> > >
> > >> > > Martin Grigorov
> > >> > > Wicket Training and Consulting
> > >> > >
> > >> > >
> > >> > > On Tue, Jan 14, 2014 at 4:56 PM, Anna Simbirtsev <
> > >> asimbirt...@gmail.com
> > >> > > >wrote:
> > >> > >
> > >> > > > Do you have any other suggestions why it may not be able to find
> > the
> > >> > css
> > >> > > > file?
> > >> > > >
> > >> > > >
> > >> > > > On Tue, Jan 14, 2014 at 9:49 AM, Anna Simbirtsev <
> > >> > asimbirt...@gmail.com
> > >> > > > >wrote:
> > >> > > >
> > >> > > > > this is a dynamic parameter, is changes based on settings, it
> > >> should
> > >> > > work
> > >> > > >

Re: CssBehaviour can't find css files

2014-01-15 Thread Anna Simbirtsev
Error 404
NOT_FOUNDHTTP ERROR 404Problem
accessing 
/wat-application/wicket/resource/CSSLinksInjector/info/css/styles-ver-1389797413000.css.
Reason:NOT_FOUNDPowered by
Jetty://
  
 
   
 

  

   
 

   
 

   
 

This error is shown inside the css file. I moved file in src/main/java/.



On Tue, Jan 14, 2014 at 2:05 PM, Anna Simbirtsev wrote:

> Once I moved the file in src/main/java/ without any package, it does not
> show errors that it cant find it, so it is found, it just does not show any
> css.
>
>
> On Tue, Jan 14, 2014 at 10:31 AM, Martin Grigorov wrote:
>
>> The reason is that you use info.afilias.WAT.UI.CSSLinksInjector as a scope
>> and the resources are looked up relative to it in the package structure.
>> In 1.4 it worked because you use '/info/...' - the leading slash resolved
>> to the root package.
>> This has been changed because of security problems and the leading slash
>> is
>> removed.
>> I think latest 1.4.x also have this fix but I'm not 100% certain.
>>
>> If you want to keep the resources there you have to use a class in the
>> root
>> package as a scope.
>> I.e. create a new class in src/main/java/ folder and use it at:
>> CssReferenceHeaderItem.forReference(new CssResourceReference(HERE, ..
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>> On Tue, Jan 14, 2014 at 5:22 PM, Anna Simbirtsev > >wrote:
>>
>> > The file structure is
>> >
>> > myApplication/src/main/java
>> > myApplication/src/main/resources/info/css/ that has all css files
>> > myApplication/src/main/resources/info/images has all the images
>> >
>> >
>> >
>> >
>> > On Tue, Jan 14, 2014 at 10:04 AM, Martin Grigorov > > >wrote:
>> >
>> > > What is the file structure ?
>> > > What packages and files you have in UI package ?
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > >
>> > >
>> > > On Tue, Jan 14, 2014 at 4:56 PM, Anna Simbirtsev <
>> asimbirt...@gmail.com
>> > > >wrote:
>> > >
>> > > > Do you have any other suggestions why it may not be able to find the
>> > css
>> > > > file?
>> > > >
>> > > >
>> > > > On Tue, Jan 14, 2014 at 9:49 AM, Anna Simbirtsev <
>> > asimbirt...@gmail.com
>> > > > >wrote:
>> > > >
>> > > > > this is a dynamic parameter, is changes based on settings, it
>> should
>> > > work
>> > > > > either way
>> > > > >
>> > > > >
>> > > > > On Tue, Jan 14, 2014 at 9:45 AM, Martin Grigorov <
>> > mgrigo...@apache.org
>> > > > >wrote:
>> > > > >
>> > > > >> The only difference is that the resolved theme is 'info' instead
>> of
>> > > > 'root'
>> > > > >>
>> > > > >> Martin Grigorov
>> > > > >> Wicket Training and Consulting
>> > > > >>
>> > > > >>
>> > > > >> On Tue, Jan 14, 2014 at 4:43 PM, Anna Simbirtsev <
>> > > asimbirt...@gmail.com
>> > > > >> >wrote:
>> > > > >>
>> > > > >> > The name of the file is different and it cant find it
>> > > > >> >
>> > > > >> >
>> > > > >> > On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov <
>> > > > mgrigo...@apache.org
>> > > > >> > >wrote:
>> > > > >> >
>> > > > >> > > It looks perfect!
>> > > > >> > >
>> > > > >> > > Martin Grigorov
>> > > > >> > > Wicket Training and Consulting
>> > > > >> > >
>> > > > >> > >
>> > > > >> > > On Tue, Jan 14, 2014 at 4:39 PM, Anna Sim

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
Once I moved the file in src/main/java/ without any package, it does not
show errors that it cant find it, so it is found, it just does not show any
css.


On Tue, Jan 14, 2014 at 10:31 AM, Martin Grigorov wrote:

> The reason is that you use info.afilias.WAT.UI.CSSLinksInjector as a scope
> and the resources are looked up relative to it in the package structure.
> In 1.4 it worked because you use '/info/...' - the leading slash resolved
> to the root package.
> This has been changed because of security problems and the leading slash is
> removed.
> I think latest 1.4.x also have this fix but I'm not 100% certain.
>
> If you want to keep the resources there you have to use a class in the root
> package as a scope.
> I.e. create a new class in src/main/java/ folder and use it at:
> CssReferenceHeaderItem.forReference(new CssResourceReference(HERE, ..
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 5:22 PM, Anna Simbirtsev  >wrote:
>
> > The file structure is
> >
> > myApplication/src/main/java
> > myApplication/src/main/resources/info/css/ that has all css files
> > myApplication/src/main/resources/info/images has all the images
> >
> >
> >
> >
> > On Tue, Jan 14, 2014 at 10:04 AM, Martin Grigorov  > >wrote:
> >
> > > What is the file structure ?
> > > What packages and files you have in UI package ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Tue, Jan 14, 2014 at 4:56 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > Do you have any other suggestions why it may not be able to find the
> > css
> > > > file?
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:49 AM, Anna Simbirtsev <
> > asimbirt...@gmail.com
> > > > >wrote:
> > > >
> > > > > this is a dynamic parameter, is changes based on settings, it
> should
> > > work
> > > > > either way
> > > > >
> > > > >
> > > > > On Tue, Jan 14, 2014 at 9:45 AM, Martin Grigorov <
> > mgrigo...@apache.org
> > > > >wrote:
> > > > >
> > > > >> The only difference is that the resolved theme is 'info' instead
> of
> > > > 'root'
> > > > >>
> > > > >> Martin Grigorov
> > > > >> Wicket Training and Consulting
> > > > >>
> > > > >>
> > > > >> On Tue, Jan 14, 2014 at 4:43 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > >> >wrote:
> > > > >>
> > > > >> > The name of the file is different and it cant find it
> > > > >> >
> > > > >> >
> > > > >> > On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov <
> > > > mgrigo...@apache.org
> > > > >> > >wrote:
> > > > >> >
> > > > >> > > It looks perfect!
> > > > >> > >
> > > > >> > > Martin Grigorov
> > > > >> > > Wicket Training and Consulting
> > > > >> > >
> > > > >> > >
> > > > >> > > On Tue, Jan 14, 2014 at 4:39 PM, Anna Simbirtsev <
> > > > >> asimbirt...@gmail.com
> > > > >> > > >wrote:
> > > > >> > >
> > > > >> > > > if I get rid of the CryptoMapper
> > > > >> > > > new link looks like
> > > > >> > > >
> > > > >> > > >  > > > >> > > >
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> href="./wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > > > >> > > >  > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > > > >> > > > >"
> > > > >> > > > />
> > >

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
The file structure is

myApplication/src/main/java
myApplication/src/main/resources/info/css/ that has all css files
myApplication/src/main/resources/info/images has all the images




On Tue, Jan 14, 2014 at 10:04 AM, Martin Grigorov wrote:

> What is the file structure ?
> What packages and files you have in UI package ?
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:56 PM, Anna Simbirtsev  >wrote:
>
> > Do you have any other suggestions why it may not be able to find the css
> > file?
> >
> >
> > On Tue, Jan 14, 2014 at 9:49 AM, Anna Simbirtsev  > >wrote:
> >
> > > this is a dynamic parameter, is changes based on settings, it should
> work
> > > either way
> > >
> > >
> > > On Tue, Jan 14, 2014 at 9:45 AM, Martin Grigorov  > >wrote:
> > >
> > >> The only difference is that the resolved theme is 'info' instead of
> > 'root'
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >>
> > >>
> > >> On Tue, Jan 14, 2014 at 4:43 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > >> >wrote:
> > >>
> > >> > The name of the file is different and it cant find it
> > >> >
> > >> >
> > >> > On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov <
> > mgrigo...@apache.org
> > >> > >wrote:
> > >> >
> > >> > > It looks perfect!
> > >> > >
> > >> > > Martin Grigorov
> > >> > > Wicket Training and Consulting
> > >> > >
> > >> > >
> > >> > > On Tue, Jan 14, 2014 at 4:39 PM, Anna Simbirtsev <
> > >> asimbirt...@gmail.com
> > >> > > >wrote:
> > >> > >
> > >> > > > if I get rid of the CryptoMapper
> > >> > > > new link looks like
> > >> > > >
> > >> > > >  > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> href="./wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > >> > > >  > >> > > >
> > >> > >
> > >> >
> > >>
> >
> http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > >> > > > >"
> > >> > > > />
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > On Tue, Jan 14, 2014 at 9:35 AM, Martin Grigorov <
> > >> mgrigo...@apache.org
> > >> > > > >wrote:
> > >> > > >
> > >> > > > > Because you use CryptoMapper in your app.
> > >> > > > >
> > >> > > > > Martin Grigorov
> > >> > > > > Wicket Training and Consulting
> > >> > > > >
> > >> > > > >
> > >> > > > > On Tue, Jan 14, 2014 at 4:32 PM, Anna Simbirtsev <
> > >> > > asimbirt...@gmail.com
> > >> > > > > >wrote:
> > >> > > > >
> > >> > > > > > NEW: href="../X5EA-RpmG5-
> > >> > > > > >
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > >> > > > > > />
> > >> > > > > >
> > >> > > > > > why is the new link looks like this?
> > >> > > > > >
> > >> > > > > >
> > >> > > > > > On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov <
> > >> > > mgrigo...@apache.org
> > >> > > > > > >wrote:
> > >> > > > > >
> > >> > > > > > > I am not sure what you mean.
> > >> > > > > > >
> > >> > > > > > > Martin Grigorov
> > >> > > > > >

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
Do you have any other suggestions why it may not be able to find the css
file?


On Tue, Jan 14, 2014 at 9:49 AM, Anna Simbirtsev wrote:

> this is a dynamic parameter, is changes based on settings, it should work
> either way
>
>
> On Tue, Jan 14, 2014 at 9:45 AM, Martin Grigorov wrote:
>
>> The only difference is that the resolved theme is 'info' instead of 'root'
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>> On Tue, Jan 14, 2014 at 4:43 PM, Anna Simbirtsev > >wrote:
>>
>> > The name of the file is different and it cant find it
>> >
>> >
>> > On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov > > >wrote:
>> >
>> > > It looks perfect!
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > >
>> > >
>> > > On Tue, Jan 14, 2014 at 4:39 PM, Anna Simbirtsev <
>> asimbirt...@gmail.com
>> > > >wrote:
>> > >
>> > > > if I get rid of the CryptoMapper
>> > > > new link looks like
>> > > >
>> > > > > > > >
>> > > >
>> > >
>> >
>> href="./wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
>> > > > > > > >
>> > >
>> >
>> http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
>> > > > >"
>> > > > />
>> > > >
>> > > >
>> > > >
>> > > > On Tue, Jan 14, 2014 at 9:35 AM, Martin Grigorov <
>> mgrigo...@apache.org
>> > > > >wrote:
>> > > >
>> > > > > Because you use CryptoMapper in your app.
>> > > > >
>> > > > > Martin Grigorov
>> > > > > Wicket Training and Consulting
>> > > > >
>> > > > >
>> > > > > On Tue, Jan 14, 2014 at 4:32 PM, Anna Simbirtsev <
>> > > asimbirt...@gmail.com
>> > > > > >wrote:
>> > > > >
>> > > > > > NEW: href="../X5EA-RpmG5-
>> > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
>> > > > > > />
>> > > > > >
>> > > > > > why is the new link looks like this?
>> > > > > >
>> > > > > >
>> > > > > > On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov <
>> > > mgrigo...@apache.org
>> > > > > > >wrote:
>> > > > > >
>> > > > > > > I am not sure what you mean.
>> > > > > > >
>> > > > > > > Martin Grigorov
>> > > > > > > Wicket Training and Consulting
>> > > > > > >
>> > > > > > >
>> > > > > > > On Tue, Jan 14, 2014 at 4:24 PM, Anna Simbirtsev <
>> > > > > asimbirt...@gmail.com
>> > > > > > > >wrote:
>> > > > > > >
>> > > > > > > > I changed these. But why is new link encoded?
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov <
>> > > > > mgrigo...@apache.org
>> > > > > > > > >wrote:
>> > > > > > > >
>> > > > > > > > > On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev <
>> > > > > > > asimbirt...@gmail.com
>> > > > > > > > > >wrote:
>> > > > > > > > >
>> > > > > > > > > > OLD:
>> > > > > > > > > >
>> > > > > > > >
>> > > > > >
>> > > >
>> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > info.af

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
this is a dynamic parameter, is changes based on settings, it should work
either way


On Tue, Jan 14, 2014 at 9:45 AM, Martin Grigorov wrote:

> The only difference is that the resolved theme is 'info' instead of 'root'
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:43 PM, Anna Simbirtsev  >wrote:
>
> > The name of the file is different and it cant find it
> >
> >
> > On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov  > >wrote:
> >
> > > It looks perfect!
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Tue, Jan 14, 2014 at 4:39 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > if I get rid of the CryptoMapper
> > > > new link looks like
> > > >
> > > >  > > >
> > > >
> > >
> >
> href="./wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > > >  > > >
> > >
> >
> http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > > > >"
> > > > />
> > > >
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:35 AM, Martin Grigorov <
> mgrigo...@apache.org
> > > > >wrote:
> > > >
> > > > > Because you use CryptoMapper in your app.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > >
> > > > >
> > > > > On Tue, Jan 14, 2014 at 4:32 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > NEW: href="../X5EA-RpmG5-
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > > > > > />
> > > > > >
> > > > > > why is the new link looks like this?
> > > > > >
> > > > > >
> > > > > > On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov <
> > > mgrigo...@apache.org
> > > > > > >wrote:
> > > > > >
> > > > > > > I am not sure what you mean.
> > > > > > >
> > > > > > > Martin Grigorov
> > > > > > > Wicket Training and Consulting
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Jan 14, 2014 at 4:24 PM, Anna Simbirtsev <
> > > > > asimbirt...@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > I changed these. But why is new link encoded?
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov <
> > > > > mgrigo...@apache.org
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev <
> > > > > > > asimbirt...@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > OLD:
> > > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > info.afilias.WAT.UI.CSSLinksInjector; name:
> > > info/css/tooltip.css
> > > > > > > > >
> > > > > > > > > 1. afilias vs. stuff
> > > > > > > > >
> > > > > > > > > 2. info vs. root
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > NEW:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > &g

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
The name of the file is different and it cant find it


On Tue, Jan 14, 2014 at 9:41 AM, Martin Grigorov wrote:

> It looks perfect!
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:39 PM, Anna Simbirtsev  >wrote:
>
> > if I get rid of the CryptoMapper
> > new link looks like
> >
> >  >
> >
> href="./wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> >  >
> http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css
> > >"
> > />
> >
> >
> >
> > On Tue, Jan 14, 2014 at 9:35 AM, Martin Grigorov  > >wrote:
> >
> > > Because you use CryptoMapper in your app.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Tue, Jan 14, 2014 at 4:32 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > NEW: href="../X5EA-RpmG5-
> > > >
> > > >
> > >
> >
> t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > > > />
> > > >
> > > > why is the new link looks like this?
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov <
> mgrigo...@apache.org
> > > > >wrote:
> > > >
> > > > > I am not sure what you mean.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > >
> > > > >
> > > > > On Tue, Jan 14, 2014 at 4:24 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > I changed these. But why is new link encoded?
> > > > > >
> > > > > >
> > > > > > On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov <
> > > mgrigo...@apache.org
> > > > > > >wrote:
> > > > > >
> > > > > > > On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev <
> > > > > asimbirt...@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > OLD:
> > > > > > > >
> > > > > >
> > > >
> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
> > > > > > > >
> > > > > > >
> > > > > > > info.afilias.WAT.UI.CSSLinksInjector; name:
> info/css/tooltip.css
> > > > > > >
> > > > > > > 1. afilias vs. stuff
> > > > > > >
> > > > > > > 2. info vs. root
> > > > > > >
> > > > > > >
> > > > > > > > NEW:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> href="../X5EA-RpmG5-t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > > > > > > > />
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Jan 14, 2014 at 9:16 AM, Martin Grigorov <
> > > > > mgrigo...@apache.org
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > On Tue, Jan 14, 2014 at 4:13 PM, Anna Simbirtsev <
> > > > > > > asimbirt...@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > Ho would I know the produced url? I sent the error
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Check the produced HTML of a page that uses this code in
> your
> > > > > running
> > > > > > > > > application with 1.4.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
&g

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
if I get rid of the CryptoMapper
new link looks like

http://localhost:8080/wat-application/wicket/resource/info.afilias.WAT.UI.CSSLinksInjector/info/css/tooltip-ver-1389710287000.css>"
/>



On Tue, Jan 14, 2014 at 9:35 AM, Martin Grigorov wrote:

> Because you use CryptoMapper in your app.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:32 PM, Anna Simbirtsev  >wrote:
>
> > NEW: href="../X5EA-RpmG5-
> >
> >
> t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > />
> >
> > why is the new link looks like this?
> >
> >
> > On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov  > >wrote:
> >
> > > I am not sure what you mean.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Tue, Jan 14, 2014 at 4:24 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > I changed these. But why is new link encoded?
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov <
> mgrigo...@apache.org
> > > > >wrote:
> > > >
> > > > > On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > OLD:
> > > > > >
> > > >
> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
> > > > > >
> > > > >
> > > > > info.afilias.WAT.UI.CSSLinksInjector; name: info/css/tooltip.css
> > > > >
> > > > > 1. afilias vs. stuff
> > > > >
> > > > > 2. info vs. root
> > > > >
> > > > >
> > > > > > NEW:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> href="../X5EA-RpmG5-t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > > > > > />
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Jan 14, 2014 at 9:16 AM, Martin Grigorov <
> > > mgrigo...@apache.org
> > > > > > >wrote:
> > > > > >
> > > > > > > On Tue, Jan 14, 2014 at 4:13 PM, Anna Simbirtsev <
> > > > > asimbirt...@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Ho would I know the produced url? I sent the error
> > > > > > > >
> > > > > > >
> > > > > > > Check the produced HTML of a page that uses this code in your
> > > running
> > > > > > > application with 1.4.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Jan 14, 2014 at 9:10 AM, Martin Grigorov <
> > > > > mgrigo...@apache.org
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > What is the produced url for login.css Wicket 1.4 and what
> is
> > > the
> > > > > new
> > > > > > > > error
> > > > > > > > > ?
> > > > > > > > >
> > > > > > > > > Martin Grigorov
> > > > > > > > > Wicket Training and Consulting
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Jan 14, 2014 at 4:06 PM, Anna Simbirtsev <
> > > > > > > asimbirt...@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > I changed it but still get the error
> > > > > > > > > >
> > > > > > > > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > > > > > > > CssResourceReference(CSSLinksInjector.class,
> > > > > > > > > > root + "/css/login.css")));
> > > > > > > > > &

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
NEW: href="../X5EA-RpmG5-
t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
/>

why is the new link looks like this?


On Tue, Jan 14, 2014 at 9:29 AM, Martin Grigorov wrote:

> I am not sure what you mean.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:24 PM, Anna Simbirtsev  >wrote:
>
> > I changed these. But why is new link encoded?
> >
> >
> > On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov  > >wrote:
> >
> > > On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > OLD:
> > > >
> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
> > > >
> > >
> > > info.afilias.WAT.UI.CSSLinksInjector; name: info/css/tooltip.css
> > >
> > > 1. afilias vs. stuff
> > >
> > > 2. info vs. root
> > >
> > >
> > > > NEW:
> > > >
> > > >
> > >
> >
> href="../X5EA-RpmG5-t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > > > />
> > > >
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:16 AM, Martin Grigorov <
> mgrigo...@apache.org
> > > > >wrote:
> > > >
> > > > > On Tue, Jan 14, 2014 at 4:13 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Ho would I know the produced url? I sent the error
> > > > > >
> > > > >
> > > > > Check the produced HTML of a page that uses this code in your
> running
> > > > > application with 1.4.
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Jan 14, 2014 at 9:10 AM, Martin Grigorov <
> > > mgrigo...@apache.org
> > > > > > >wrote:
> > > > > >
> > > > > > > What is the produced url for login.css Wicket 1.4 and what is
> the
> > > new
> > > > > > error
> > > > > > > ?
> > > > > > >
> > > > > > > Martin Grigorov
> > > > > > > Wicket Training and Consulting
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Jan 14, 2014 at 4:06 PM, Anna Simbirtsev <
> > > > > asimbirt...@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > I changed it but still get the error
> > > > > > > >
> > > > > > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > > > > > CssResourceReference(CSSLinksInjector.class,
> > > > > > > > root + "/css/login.css")));
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
> > > > > > > > reier...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > > Why not just use CSSLinksInjector.class instead of
> > getClass()?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev <
> > > > > > > asimbirt...@gmail.com
> > > > > > > > > >wrote:
> > > > > > > > >
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > I am upgrading wicket from 1.4 to 6.7.
> > > > > > > > > >
> > > > > > > > > > Before my css files were added this way:
> > > > > > > > > >
> > > > > > > > > > public class CSSLinksInjector implements
> > > > > > > > IComponentInstantiationListener,
> > > > > > > > > > Serializable
> > > > > > > > > > {
> > > > > > > > > > private stati

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
I changed these. But why is new link encoded?


On Tue, Jan 14, 2014 at 9:22 AM, Martin Grigorov wrote:

> On Tue, Jan 14, 2014 at 4:19 PM, Anna Simbirtsev  >wrote:
>
> > OLD:
> > href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
> >
>
> info.afilias.WAT.UI.CSSLinksInjector; name: info/css/tooltip.css
>
> 1. afilias vs. stuff
>
> 2. info vs. root
>
>
> > NEW:
> >
> >
> href="../X5EA-RpmG5-t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
> > />
> >
> >
> >
> > On Tue, Jan 14, 2014 at 9:16 AM, Martin Grigorov  > >wrote:
> >
> > > On Tue, Jan 14, 2014 at 4:13 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > Ho would I know the produced url? I sent the error
> > > >
> > >
> > > Check the produced HTML of a page that uses this code in your running
> > > application with 1.4.
> > >
> > >
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 9:10 AM, Martin Grigorov <
> mgrigo...@apache.org
> > > > >wrote:
> > > >
> > > > > What is the produced url for login.css Wicket 1.4 and what is the
> new
> > > > error
> > > > > ?
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > >
> > > > >
> > > > > On Tue, Jan 14, 2014 at 4:06 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > I changed it but still get the error
> > > > > >
> > > > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > > > CssResourceReference(CSSLinksInjector.class,
> > > > > > root + "/css/login.css")));
> > > > > >
> > > > > >
> > > > > > On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
> > > > > > reier...@gmail.com> wrote:
> > > > > >
> > > > > > > Why not just use CSSLinksInjector.class instead of getClass()?
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev <
> > > > > asimbirt...@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I am upgrading wicket from 1.4 to 6.7.
> > > > > > > >
> > > > > > > > Before my css files were added this way:
> > > > > > > >
> > > > > > > > public class CSSLinksInjector implements
> > > > > > IComponentInstantiationListener,
> > > > > > > > Serializable
> > > > > > > > {
> > > > > > > > private static final long serialVersionUID =
> > > > > 7463279042460663915L;
> > > > > > > >
> > > > > > > > //private final List cssResources =
> new
> > > > > > > > ArrayList();
> > > > > > > > private String theme;
> > > > > > > >
> > > > > > > > public CSSLinksInjector(String theme)
> > > > > > > > {
> > > > > > > > this.theme = theme;
> > > > > > > > String root = (theme == null || theme.isEmpty()) ?
> "" :
> > > > "/" +
> > > > > > > > theme;
> > > > > > > >
> > > > > > > > /*
> > > > > > > >
> > > > > > > >
> > > > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > > > > > root + "/css/login.css"));
> > > > > > > >
> > > > > > > >
> > > > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > > > > > root + "/css/tooltip.css"));*/
> > > > > > > > }
> > > > > > > >
> > > > > > > >
&g

Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
OLD:
href="resources/info.stuff.WAT.UI.CSSLinksInjector/root/css/tooltip.css"
NEW:
href="../X5EA-RpmG5-t7GSByiSpogTj4bvW9MKMW4vn832-xprwEXT2RkaeV8fX_4jkKsv1CB554pAX0u87jm6UPI3w_ihTiZY3tftZ8jJqrrURxUxvKsFXCdT_2G6JYzRb5crh/X5E87/URx2a/zRb59/sFXb4/URx2a/zRb59"
/>



On Tue, Jan 14, 2014 at 9:16 AM, Martin Grigorov wrote:

> On Tue, Jan 14, 2014 at 4:13 PM, Anna Simbirtsev  >wrote:
>
> > Ho would I know the produced url? I sent the error
> >
>
> Check the produced HTML of a page that uses this code in your running
> application with 1.4.
>
>
> >
> >
> > On Tue, Jan 14, 2014 at 9:10 AM, Martin Grigorov  > >wrote:
> >
> > > What is the produced url for login.css Wicket 1.4 and what is the new
> > error
> > > ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Tue, Jan 14, 2014 at 4:06 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > I changed it but still get the error
> > > >
> > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > CssResourceReference(CSSLinksInjector.class,
> > > > root + "/css/login.css")));
> > > >
> > > >
> > > > On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >
> > > > > Why not just use CSSLinksInjector.class instead of getClass()?
> > > > >
> > > > >
> > > > > On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev <
> > > asimbirt...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I am upgrading wicket from 1.4 to 6.7.
> > > > > >
> > > > > > Before my css files were added this way:
> > > > > >
> > > > > > public class CSSLinksInjector implements
> > > > IComponentInstantiationListener,
> > > > > > Serializable
> > > > > > {
> > > > > > private static final long serialVersionUID =
> > > 7463279042460663915L;
> > > > > >
> > > > > > //private final List cssResources = new
> > > > > > ArrayList();
> > > > > > private String theme;
> > > > > >
> > > > > > public CSSLinksInjector(String theme)
> > > > > > {
> > > > > > this.theme = theme;
> > > > > > String root = (theme == null || theme.isEmpty()) ? "" :
> > "/" +
> > > > > > theme;
> > > > > >
> > > > > > /*
> > > > > >
> > > > > >
> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > > > root + "/css/login.css"));
> > > > > >
> > > > > >
> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > > > root + "/css/tooltip.css"));*/
> > > > > > }
> > > > > >
> > > > > >
> > > > > > Now, I am adding them like this:
> > > > > >
> > > > > > public void onInstantiation(Component component)
> > > > > > {
> > > > > > if (component instanceof WebPage)
> > > > > > {
> > > > > > component.add(new CssBehaviour(theme));
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > > private class CssBehaviour extends Behavior {
> > > > > >
> > > > > > private static final long serialVersionUID =
> > > > > -1540416397347502364L;
> > > > > > private String theme;
> > > > > >
> > > > > > public CssBehaviour(String theme) {
> > > > > > this.theme = theme;
> > > > > > }
> > > > > >
> > > > > > @Override
> > > > > > public void renderHead(Component component,
> IHeaderResponse
> > > > > > response) {
> > > > > > String root = (theme == null || theme.isEmpty()) ?
> "" :
> > > > "/" +
> > > > > > theme;
> > > > > >
> > > > > >
> > > > > >
> response.render(CssReferenceHeaderItem.forReference(new
> > > > > > CssResourceReference(getClass(),
> > > > > > root + "/css/login.css")));
> > > > > >
> response.render(CssReferenceHeaderItem.forReference(new
> > > > > > CssResourceReference(getClass(),
> > > > > > root + "/css/tooltip.css")));
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > > When I run, I get an error:
> > > > > >
> > > > > > 2014-01-14 13:36:53,950 [838889794@qtp-4816459-2] WARN
> > > > > > org.apache.wicket.request.resource.ResourceReferenceRegistry - A
> > > > > > ResourceReference wont be created for a resource with key [scope:
> > > > > > info.afilias.WAT.UI.CSSLinksInjector$CssBehaviour; name:
> > > > > > info/css/login.css; locale: null; style: null; variation: null]
> > > because
> > > > > it
> > > > > > cannot be located.
> > > > > >
> > > > > > Before it was fine.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards - Ernesto Reinaldo Barreiro
> > > > >
> > > >
> > >
> >
>


Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
Ho would I know the produced url? I sent the error


On Tue, Jan 14, 2014 at 9:10 AM, Martin Grigorov wrote:

> What is the produced url for login.css Wicket 1.4 and what is the new error
> ?
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Tue, Jan 14, 2014 at 4:06 PM, Anna Simbirtsev  >wrote:
>
> > I changed it but still get the error
> >
> > response.render(CssReferenceHeaderItem.forReference(new
> > CssResourceReference(CSSLinksInjector.class,
> > root + "/css/login.css")));
> >
> >
> > On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Why not just use CSSLinksInjector.class instead of getClass()?
> > >
> > >
> > > On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > I am upgrading wicket from 1.4 to 6.7.
> > > >
> > > > Before my css files were added this way:
> > > >
> > > > public class CSSLinksInjector implements
> > IComponentInstantiationListener,
> > > > Serializable
> > > > {
> > > > private static final long serialVersionUID =
> 7463279042460663915L;
> > > >
> > > > //private final List cssResources = new
> > > > ArrayList();
> > > > private String theme;
> > > >
> > > > public CSSLinksInjector(String theme)
> > > > {
> > > > this.theme = theme;
> > > > String root = (theme == null || theme.isEmpty()) ? "" : "/" +
> > > > theme;
> > > >
> > > > /*
> > > >
> > > > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > root + "/css/login.css"));
> > > >
> > > > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > > > root + "/css/tooltip.css"));*/
> > > > }
> > > >
> > > >
> > > > Now, I am adding them like this:
> > > >
> > > > public void onInstantiation(Component component)
> > > > {
> > > > if (component instanceof WebPage)
> > > > {
> > > > component.add(new CssBehaviour(theme));
> > > > }
> > > > }
> > > >
> > > >
> > > > private class CssBehaviour extends Behavior {
> > > >
> > > > private static final long serialVersionUID =
> > > -1540416397347502364L;
> > > > private String theme;
> > > >
> > > > public CssBehaviour(String theme) {
> > > > this.theme = theme;
> > > > }
> > > >
> > > > @Override
> > > > public void renderHead(Component component, IHeaderResponse
> > > > response) {
> > > > String root = (theme == null || theme.isEmpty()) ? "" :
> > "/" +
> > > > theme;
> > > >
> > > >
> > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > CssResourceReference(getClass(),
> > > > root + "/css/login.css")));
> > > > response.render(CssReferenceHeaderItem.forReference(new
> > > > CssResourceReference(getClass(),
> > > > root + "/css/tooltip.css")));
> > > > }
> > > > }
> > > >
> > > >
> > > > When I run, I get an error:
> > > >
> > > > 2014-01-14 13:36:53,950 [838889794@qtp-4816459-2] WARN
> > > > org.apache.wicket.request.resource.ResourceReferenceRegistry - A
> > > > ResourceReference wont be created for a resource with key [scope:
> > > > info.afilias.WAT.UI.CSSLinksInjector$CssBehaviour; name:
> > > > info/css/login.css; locale: null; style: null; variation: null]
> because
> > > it
> > > > cannot be located.
> > > >
> > > > Before it was fine.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>


Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
The error changed to:
WARN org.apache.wicket.request.resource.ResourceReferenceRegistry - A
ResourceReference wont be created for a resource with key [scope:
info.afilias.WAT.UI.CSSLinksInjector; name: info/css/tooltip.css; locale:
null; style: null; variation: null] because it cannot be located.



On Tue, Jan 14, 2014 at 9:06 AM, Anna Simbirtsev wrote:

> I changed it but still get the error
>
> response.render(CssReferenceHeaderItem.forReference(new
> CssResourceReference(CSSLinksInjector.class,
> root + "/css/login.css")));
>
>
> On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Why not just use CSSLinksInjector.class instead of getClass()?
>>
>>
>> On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev > >wrote:
>>
>> > Hi,
>> >
>> > I am upgrading wicket from 1.4 to 6.7.
>> >
>> > Before my css files were added this way:
>> >
>> > public class CSSLinksInjector implements
>> IComponentInstantiationListener,
>> > Serializable
>> > {
>> > private static final long serialVersionUID = 7463279042460663915L;
>> >
>> > //private final List cssResources = new
>> > ArrayList();
>> > private String theme;
>> >
>> > public CSSLinksInjector(String theme)
>> > {
>> > this.theme = theme;
>> > String root = (theme == null || theme.isEmpty()) ? "" : "/" +
>> > theme;
>> >
>> > /*
>> >
>> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
>> > root + "/css/login.css"));
>> >
>> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
>> > root + "/css/tooltip.css"));*/
>> > }
>> >
>> >
>> > Now, I am adding them like this:
>> >
>> > public void onInstantiation(Component component)
>> > {
>> > if (component instanceof WebPage)
>> > {
>> > component.add(new CssBehaviour(theme));
>> > }
>> > }
>> >
>> >
>> > private class CssBehaviour extends Behavior {
>> >
>> > private static final long serialVersionUID =
>> -1540416397347502364L;
>> > private String theme;
>> >
>> > public CssBehaviour(String theme) {
>> > this.theme = theme;
>> > }
>> >
>> > @Override
>> > public void renderHead(Component component, IHeaderResponse
>> > response) {
>> > String root = (theme == null || theme.isEmpty()) ? "" : "/"
>> +
>> > theme;
>> >
>> >
>> > response.render(CssReferenceHeaderItem.forReference(new
>> > CssResourceReference(getClass(),
>> > root + "/css/login.css")));
>> > response.render(CssReferenceHeaderItem.forReference(new
>> > CssResourceReference(getClass(),
>> > root + "/css/tooltip.css")));
>> > }
>> > }
>> >
>> >
>> > When I run, I get an error:
>> >
>> > 2014-01-14 13:36:53,950 [838889794@qtp-4816459-2] WARN
>> > org.apache.wicket.request.resource.ResourceReferenceRegistry - A
>> > ResourceReference wont be created for a resource with key [scope:
>> > info.afilias.WAT.UI.CSSLinksInjector$CssBehaviour; name:
>> > info/css/login.css; locale: null; style: null; variation: null] because
>> it
>> > cannot be located.
>> >
>> > Before it was fine.
>> >
>>
>>
>>
>> --
>> Regards - Ernesto Reinaldo Barreiro
>>
>
>


Re: CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
I changed it but still get the error

response.render(CssReferenceHeaderItem.forReference(new
CssResourceReference(CSSLinksInjector.class,
root + "/css/login.css")));


On Tue, Jan 14, 2014 at 8:51 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Why not just use CSSLinksInjector.class instead of getClass()?
>
>
> On Tue, Jan 14, 2014 at 2:46 PM, Anna Simbirtsev  >wrote:
>
> > Hi,
> >
> > I am upgrading wicket from 1.4 to 6.7.
> >
> > Before my css files were added this way:
> >
> > public class CSSLinksInjector implements IComponentInstantiationListener,
> > Serializable
> > {
> > private static final long serialVersionUID = 7463279042460663915L;
> >
> > //private final List cssResources = new
> > ArrayList();
> > private String theme;
> >
> > public CSSLinksInjector(String theme)
> > {
> > this.theme = theme;
> > String root = (theme == null || theme.isEmpty()) ? "" : "/" +
> > theme;
> >
> > /*
> >
> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > root + "/css/login.css"));
> >
> > cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
> > root + "/css/tooltip.css"));*/
> > }
> >
> >
> > Now, I am adding them like this:
> >
> > public void onInstantiation(Component component)
> > {
> > if (component instanceof WebPage)
> > {
> > component.add(new CssBehaviour(theme));
> > }
> > }
> >
> >
> > private class CssBehaviour extends Behavior {
> >
> > private static final long serialVersionUID =
> -1540416397347502364L;
> > private String theme;
> >
> > public CssBehaviour(String theme) {
> > this.theme = theme;
> > }
> >
> > @Override
> > public void renderHead(Component component, IHeaderResponse
> > response) {
> > String root = (theme == null || theme.isEmpty()) ? "" : "/" +
> > theme;
> >
> >
> > response.render(CssReferenceHeaderItem.forReference(new
> > CssResourceReference(getClass(),
> > root + "/css/login.css")));
> > response.render(CssReferenceHeaderItem.forReference(new
> > CssResourceReference(getClass(),
> > root + "/css/tooltip.css")));
> > }
> > }
> >
> >
> > When I run, I get an error:
> >
> > 2014-01-14 13:36:53,950 [838889794@qtp-4816459-2] WARN
> > org.apache.wicket.request.resource.ResourceReferenceRegistry - A
> > ResourceReference wont be created for a resource with key [scope:
> > info.afilias.WAT.UI.CSSLinksInjector$CssBehaviour; name:
> > info/css/login.css; locale: null; style: null; variation: null] because
> it
> > cannot be located.
> >
> > Before it was fine.
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


CssBehaviour can't find css files

2014-01-14 Thread Anna Simbirtsev
Hi,

I am upgrading wicket from 1.4 to 6.7.

Before my css files were added this way:

public class CSSLinksInjector implements IComponentInstantiationListener,
Serializable
{
private static final long serialVersionUID = 7463279042460663915L;

//private final List cssResources = new
ArrayList();
private String theme;

public CSSLinksInjector(String theme)
{
this.theme = theme;
String root = (theme == null || theme.isEmpty()) ? "" : "/" + theme;

/*

cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
root + "/css/login.css"));

cssResources.add(CSSPackageResource.getHeaderContribution(getClass(),
root + "/css/tooltip.css"));*/
}


Now, I am adding them like this:

public void onInstantiation(Component component)
{
if (component instanceof WebPage)
{
component.add(new CssBehaviour(theme));
}
}


private class CssBehaviour extends Behavior {

private static final long serialVersionUID = -1540416397347502364L;
private String theme;

public CssBehaviour(String theme) {
this.theme = theme;
}

@Override
public void renderHead(Component component, IHeaderResponse
response) {
String root = (theme == null || theme.isEmpty()) ? "" : "/" +
theme;


response.render(CssReferenceHeaderItem.forReference(new
CssResourceReference(getClass(),
root + "/css/login.css")));
response.render(CssReferenceHeaderItem.forReference(new
CssResourceReference(getClass(),
root + "/css/tooltip.css")));
}
}


When I run, I get an error:

2014-01-14 13:36:53,950 [838889794@qtp-4816459-2] WARN
org.apache.wicket.request.resource.ResourceReferenceRegistry - A
ResourceReference wont be created for a resource with key [scope:
info.afilias.WAT.UI.CSSLinksInjector$CssBehaviour; name:
info/css/login.css; locale: null; style: null; variation: null] because it
cannot be located.

Before it was fine.


Re: How to ignore submit button while executing event on blowser close?

2013-04-23 Thread Anna Simbirtsev
But when should we set it to 1 so that it ignores submit button?


On Mon, Apr 22, 2013 at 4:03 PM, Martin Grigorov wrote:

> Hi,
>
> In your code no one sets dont_confirm_leave to 1.
>
>
> On Mon, Apr 22, 2013 at 10:51 PM, Anna Simbirtsev  >wrote:
>
> > We try to use the following java script to detect window close or
> redirect
> > event. We are trying to ignore the submit button, but it does not work.
> >
> >  > class="button submitarea" onclick="var
> > e=document.getElementById('myForm8_hf_0'); e.name='submitButton';
> > e.value='x';var f=document.getElementById('myForm8');var ff=f;if
> > (ff.onsubmit != undefined) { if (ff.onsubmit()==false) return false;
> > }f.submit();e.value='';e.name='';return
> > false;" wicket:id="submitButton" href="#">SUBMIT"
> >
> >
> > function wireUpEvents() {
> >
> > var dont_confirm_leave = 0; //set dont_confirm_leave to 1 when you want
> the
> > user to be able to leave withou confirmation
> > var leave_message = 'You sure you want to leave?'
> > function goodbye(e) {
> > if (!validNavigation) {
> > if (dont_confirm_leave!==1) {
> > if(!e) e = window.event;
> > //e.cancelBubble is supported by IE - this will kill the bubbling
> process.
> > e.cancelBubble = true;
> > e.returnValue = leave_message;
> > //e.stopPropagation works in Firefox.
> > if (e.stopPropagation) {
> > e.stopPropagation();
> > e.preventDefault();
> > }
> > //return works for Chrome and Safari
> > return leave_message;
> > }
> > }
> > }
> > window.onbeforeunload=goodbye;
> >
> > // Attach the event keypress to exclude the F5 refresh
> > $(document).bind('keypress', function(e) {
> > if (e.keyCode == 116){
> > validNavigation = true;
> > }
> > });
> >
> > // Attach the event click for all links in the page
> > $("a").bind("click", function() {
> > validNavigation = true;
> > });
> >
> > $("a").live("click", function() {
> > validNavigation = true;
> > });
> > // Attach the event submit for all forms in the page
> > $("form").bind("submit", function() {
> > validNavigation = true;
> > });
> >
> > // Attach the event click for all inputs in the page
> > $("input[type=submit]").bind("click", function() {
> > validNavigation = true;
> > });
> >
> > }
> >
> > // Wire up the events as soon as the DOM tree is ready
> > $(document).ready(function() {
> > wireUpEvents();
> > });
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
thank you

you were right, this actually did it:

captchaImageResource.invalidate();
imagePass = randomString(6, 8);
captchaImageResource.getChallengeIdModel().setObject(imagePass);

On Tue, Oct 9, 2012 at 1:48 PM, Paul Bors  wrote:

> As per the live example at:
>
> http://www.wicket-library.com/wicket-examples/captcha/wicket/bookmarkable/or
>
> g.apache.wicket.examples.source.SourcesPage?3&SourcesPage_class=org.apache.w
> icket.examples.captcha.Captcha
>
> org.apache.wicket.extensions.markup.html.captcha.CaptchaImageResource is
> the
> model for the image... reading its API:
>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/htm
>
> l/captcha/CaptchaImageResource.html#CaptchaImageResource(org.apache.wicket.m<http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/htm%0Al/captcha/CaptchaImageResource.html#CaptchaImageResource%28org.apache.wicket.m>
> odel.IModel, int, int)
>
> public CaptchaImageResource(IModel challengeId, fontSize,
> margin) Construct.
> Parameters:
>   challengeId - The id of the challenge
>   fontSize - The font size
>   margin - The image's margin
>
> My guess would be that you need to send through the right challengeId model
> that holds on the string of letters you want to change...
>
> There is also a little Kitten Capcha in the API you might want to check out
> :)
>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/captcha/ki
> ttens/KittenCaptchaPanel.html<http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/captcha/ki%0Attens/KittenCaptchaPanel.html>
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Tuesday, October 09, 2012 1:43 PM
> To: users@wicket.apache.org
> Subject: Re: captcha show different strings
>
> only the look of it changes, but the letters don't
>
> On Tue, Oct 9, 2012 at 1:40 PM, Paul Bors  wrote:
>
> > It chances on every form submit, why don't you look over the code
> > since is open source and figure out what the model type/object for it
> is...
> >
> > ~ Thank you,
> >   Paul Bors
> >
> > -Original Message-
> > From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> > Sent: Tuesday, October 09, 2012 1:36 PM
> > To: users@wicket.apache.org
> > Subject: Re: captcha show different strings
> >
> > yes, but how can I get it to produce a different string upon simple
> > page reload?
> >
> > On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:
> >
> > > The string is only equal within the same session, meaning: upon
> > > simple page reload it stays the same. If you start a new session
> > > (either be opening a new browser or by simply deleting the '?1' from
> > > the url) you will get a fresh new string.
> > >
> > > Cheers,
> > >-Tom
> > >
> > >
> > > On 09.10.2012, at 18:47, Anna Simbirtsev 
> wrote:
> > >
> > > > Hi
> > > >
> > > > I am looking at the captcha example and it always produces the
> > > > same
> > > string.
> > > > How do I make it to produce different strings?
> > > >
> > > > http://www.wicket-library.com/wicket-examples/captcha/?0
> > > >
> > > > Thanks
> > > > Anna
> > >
> > >
> > > 
> > > - 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
> >
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
only the look of it changes, but the letters don't

On Tue, Oct 9, 2012 at 1:40 PM, Paul Bors  wrote:

> It chances on every form submit, why don't you look over the code since is
> open source and figure out what the model type/object for it is...
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Tuesday, October 09, 2012 1:36 PM
> To: users@wicket.apache.org
> Subject: Re: captcha show different strings
>
> yes, but how can I get it to produce a different string upon simple page
> reload?
>
> On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:
>
> > The string is only equal within the same session, meaning: upon simple
> > page reload it stays the same. If you start a new session (either be
> > opening a new browser or by simply deleting the '?1' from the url) you
> > will get a fresh new string.
> >
> > Cheers,
> >-Tom
> >
> >
> > On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
> >
> > > Hi
> > >
> > > I am looking at the captcha example and it always produces the same
> > string.
> > > How do I make it to produce different strings?
> > >
> > > http://www.wicket-library.com/wicket-examples/captcha/?0
> > >
> > > Thanks
> > > Anna
> >
> >
> > -
> > 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
>
>


Re: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
yes, but how can I get it to produce a different string upon simple page
reload?

On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:

> The string is only equal within the same session, meaning: upon simple
> page reload it stays the same. If you start a new session (either be
> opening a new browser or by simply deleting the '?1' from the url) you will
> get a fresh new string.
>
> Cheers,
>-Tom
>
>
> On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
>
> > Hi
> >
> > I am looking at the captcha example and it always produces the same
> string.
> > How do I make it to produce different strings?
> >
> > http://www.wicket-library.com/wicket-examples/captcha/?0
> >
> > Thanks
> > Anna
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: disabling ajax submit button

2012-09-17 Thread Anna Simbirtsev
SUBMIT

Sorry, you are right, it is an ajax link, not a button.

On Thu, Sep 13, 2012 at 4:26 PM, Paul Bors  wrote:

> I'm confused, the title is talking about an Ajax submit button yet your
> code
> snippet shows an AjaxSubmitLink.
> Perhaps you meant to use an AjaxButton in your Java code?
>
> What's the HTML mark-up you use with the Java code you showed us?
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Thursday, September 13, 2012 3:28 PM
> To: users@wicket.apache.org
> Subject: Re: disabling ajax submit button
>
> it does not work
>
> On Thu, Sep 13, 2012 at 11:53 AM, vineet semwal
> wrote:
>
> > that should have worked... btw why not just button.setEnabled(false)  ?
> >
> > On Thu, Sep 13, 2012 at 9:11 PM, Anna Simbirtsev
> > 
> > wrote:
> > > I am using wicket 1.4.3
> > > and changing to the code you mentioned below, does not work as
> > > well:(
> > >
> > > Thanks
> > >
> > > On Wed, Sep 12, 2012 at 11:42 AM, Sébastien Gautrin <
> > sgaut...@telemetris.com
> > >> wrote:
> > >
> > >> Which wicket version ? (I ask because I see you are using several
> > >> calls that are deprecated in 1.5).
> > >> Besides, within the declaration of your inner class, don't try to
> > >> access the variable you are defining (and without declaring it
> > >> final, it should normally not compile anyway).
> > >>
> > >> Not changing the deprecated calls, this should probably look like :
> > >>
> > >> add(new SimpleAttributeModifier("**disabled", "disabled"));
> > >> target.addComponent(this);
> > >>
> > >>  Original Message 
> > >> *Subject: *disabling ajax submit button
> > >> *From: *Anna Simbirtsev 
> > >> *To: *users@wicket.apache.org
> > >> *Date: *2012-09-12
> > >>
> > >>  Hi
> > >>>
> > >>> I am trying to disable ajax submit button after it has been clicked.
> > >>>
> > >>> AjaxSubmitLink  submitButton1 =  new
> > >>> AjaxSubmitLink("submitButton1"**)
> > {
> > >>>
> > >>>  private static final long serialVersionUID = 1L;
> > >>>
> > >>>
> > >>>  protected void onSubmit(AjaxRequestTarget target,
> > >>> final Form
> > >>> form)
> > >>>  {
> > >>>  submitButton1.add(
> > >>>  new SimpleAttributeModifier("**disabled",
> > >>> "disabled"));
> > >>>
> > >>>  target.addComponent(**submitButton1);
> > >>>  }
> > >>>
> > >>>
> > >>> This does not work.:(
> > >>>
> > >>>
> > >>
> >
> >
> >
> > --
> > regards,
> >
> > Vineet Semwal
> >
> > -
> > 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
>
>


Re: disabling ajax submit button

2012-09-13 Thread Anna Simbirtsev
it does not work

On Thu, Sep 13, 2012 at 11:53 AM, vineet semwal wrote:

> that should have worked... btw why not just button.setEnabled(false)  ?
>
> On Thu, Sep 13, 2012 at 9:11 PM, Anna Simbirtsev 
> wrote:
> > I am using wicket 1.4.3
> > and changing to the code you mentioned below, does not work as well:(
> >
> > Thanks
> >
> > On Wed, Sep 12, 2012 at 11:42 AM, Sébastien Gautrin <
> sgaut...@telemetris.com
> >> wrote:
> >
> >> Which wicket version ? (I ask because I see you are using several calls
> >> that are deprecated in 1.5).
> >> Besides, within the declaration of your inner class, don't try to access
> >> the variable you are defining
> >> (and without declaring it final, it should normally not compile anyway).
> >>
> >> Not changing the deprecated calls, this should probably look like :
> >>
> >> add(new SimpleAttributeModifier("**disabled", "disabled"));
> >> target.addComponent(this);
> >>
> >>  Original Message 
> >> *Subject: *disabling ajax submit button
> >> *From: *Anna Simbirtsev 
> >> *To: *users@wicket.apache.org
> >> *Date: *2012-09-12
> >>
> >>  Hi
> >>>
> >>> I am trying to disable ajax submit button after it has been clicked.
> >>>
> >>> AjaxSubmitLink  submitButton1 =  new AjaxSubmitLink("submitButton1"**)
> {
> >>>
> >>>  private static final long serialVersionUID = 1L;
> >>>
> >>>
> >>>  protected void onSubmit(AjaxRequestTarget target, final
> >>> Form
> >>> form)
> >>>  {
> >>>  submitButton1.add(
> >>>  new SimpleAttributeModifier("**disabled",
> >>> "disabled"));
> >>>
> >>>  target.addComponent(**submitButton1);
> >>>  }
> >>>
> >>>
> >>> This does not work.:(
> >>>
> >>>
> >>
>
>
>
> --
> regards,
>
> Vineet Semwal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: disabling ajax submit button

2012-09-13 Thread Anna Simbirtsev
I am using wicket 1.4.3
and changing to the code you mentioned below, does not work as well:(

Thanks

On Wed, Sep 12, 2012 at 11:42 AM, Sébastien Gautrin  wrote:

> Which wicket version ? (I ask because I see you are using several calls
> that are deprecated in 1.5).
> Besides, within the declaration of your inner class, don't try to access
> the variable you are defining
> (and without declaring it final, it should normally not compile anyway).
>
> Not changing the deprecated calls, this should probably look like :
>
> add(new SimpleAttributeModifier("**disabled", "disabled"));
> target.addComponent(this);
>
>  Original Message ----
> *Subject: *disabling ajax submit button
> *From: *Anna Simbirtsev 
> *To: *users@wicket.apache.org
> *Date: *2012-09-12
>
>  Hi
>>
>> I am trying to disable ajax submit button after it has been clicked.
>>
>> AjaxSubmitLink  submitButton1 =  new AjaxSubmitLink("submitButton1"**) {
>>
>>  private static final long serialVersionUID = 1L;
>>
>>
>>  protected void onSubmit(AjaxRequestTarget target, final
>> Form
>> form)
>>  {
>>  submitButton1.add(
>>  new SimpleAttributeModifier("**disabled",
>> "disabled"));
>>
>>  target.addComponent(**submitButton1);
>>  }
>>
>>
>> This does not work.:(
>>
>>
>


disabling ajax submit button

2012-09-12 Thread Anna Simbirtsev
Hi

I am trying to disable ajax submit button after it has been clicked.

AjaxSubmitLink  submitButton1 =  new AjaxSubmitLink("submitButton1") {

private static final long serialVersionUID = 1L;


protected void onSubmit(AjaxRequestTarget target, final Form
form)
{
submitButton1.add(
new SimpleAttributeModifier("disabled",
"disabled"));

target.addComponent(submitButton1);
}


This does not work.:(


Re: Debug messages

2012-09-05 Thread Anna Simbirtsev
This log setting? I tried changing log4j.rootLogger=INFO,Stdout, it still
prints.

Thank you for you answer.

log4j.rootLogger=DEBUG,Stdout

log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
log4j.appender.Stdout.layout=org.apache.log4j.TTCCLayout
log4j.appender.Stdout.layout.ThreadPrinting=true
log4j.appender.Stdout.layout.ContextPrinting=true
log4j.appender.Stdout.layout.DateFormat=ISO8601
log4j.appender.Stdout.layout.TimeZone=GMT

log4j.logger.org.springframework=INFO
log4j.logger.org.springframework.beans.factory=DEBUG
log4j.logger.org.apache.wicket=INFO
log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
log4j.logger.org.apache.wicket.version=INFO
log4j.logger.org.apache.wicket.RequestCycle=INFO

On Wed, Sep 5, 2012 at 4:23 PM, vineet semwal wrote:

> change the log setting to INFO from DEBUG
>
> On Thu, Sep 6, 2012 at 1:24 AM, Anna Simbirtsev 
> wrote:
> > Hi
> >
> > I am seeing the following debug messages, how do I turn them off?
> >
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
> > org.apache.wicket.MarkupContainer - Rendering raw markup
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
> > Rendered [MarkupContainer [Component id = 7]]
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
> org.apache.wicket.Component
> > - End render [MarkupContainer [Component id = 7]]
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
> > Rendered [MarkupContainer [Component id = linkContainer]]
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
> org.apache.wicket.Component
> > - End render [MarkupContainer [Component id = linkContainer]]
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
> > org.apache.wicket.MarkupContainer - Rendering raw markup
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
> > Rendered [Page class = info.afilias.WAT.UI.Pages.SubMenuContents, id = 2,
> > version = 0]
> > 15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
> org.apache.wicket.Component
> > - End render [Page class = info.afilias.WAT.UI.Pages.SubMenuContents, id
> =
> > 2, version = 0]
> > 15:51:07.817 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
> > ending request for page [Page class =
> > info.afilias.WAT.UI.Pages.SubMenuContents, id = 2, version = 0], request
> > [method = GET, protocol = HTTP/1.1, requestURL =
> > http://localhost:8080/application/home, contentType = null,
> contentLength =
> > -1, contextPath = /application, pathInfo = null, requestURI =
> > /application/home, servletPath = /home, pathTranslated = null]
> > 15:51:07.817 [1945207123@qtp-636450175-3] DEBUG
> org.apache.wicket.Session -
> > update: Session not dirty.
>
>
>
> --
> thank you,
>
> regards,
> Vineet Semwal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Debug messages

2012-09-05 Thread Anna Simbirtsev
Hi

I am seeing the following debug messages, how do I turn them off?

15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
org.apache.wicket.MarkupContainer - Rendering raw markup
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
Rendered [MarkupContainer [Component id = 7]]
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Component
- End render [MarkupContainer [Component id = 7]]
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
Rendered [MarkupContainer [Component id = linkContainer]]
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Component
- End render [MarkupContainer [Component id = linkContainer]]
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG
org.apache.wicket.MarkupContainer - Rendering raw markup
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
Rendered [Page class = info.afilias.WAT.UI.Pages.SubMenuContents, id = 2,
version = 0]
15:51:07.816 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Component
- End render [Page class = info.afilias.WAT.UI.Pages.SubMenuContents, id =
2, version = 0]
15:51:07.817 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Page -
ending request for page [Page class =
info.afilias.WAT.UI.Pages.SubMenuContents, id = 2, version = 0], request
[method = GET, protocol = HTTP/1.1, requestURL =
http://localhost:8080/application/home, contentType = null, contentLength =
-1, contextPath = /application, pathInfo = null, requestURI =
/application/home, servletPath = /home, pathTranslated = null]
15:51:07.817 [1945207123@qtp-636450175-3] DEBUG org.apache.wicket.Session -
update: Session not dirty.


Closing modal window with keyboard

2011-11-08 Thread Anna Simbirtsev
Hi,

Is there a way to close modal window with a keyboard shortcut?

Thanks
Anna


Passing info to the modal window

2011-09-02 Thread Anna Simbirtsev
Hi, I have a modal window defined like in the following example:


*public class *Modal *extends *WebPage
{
  *public *Modal()
  {
 *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow("modal1"));

  modal1.setPageMapName("modal-1");
  modal1.setCookieName("modal-1");
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink("showModal1")
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

}

*public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

 public void setData(String data) {

 }
  }
}

My question is how can I call the function setData, if I have the modal1.

Thanks
Anna


passing information to the modal window class

2011-09-02 Thread Anna Simbirtsev
Hi, I have a modal window defined like in the following example:

*public class *Modal *extends *WebPage
{
  *public *Modal()
  {
 *final *ModalWindow modal1;
  add(modal1 = *new *ModalWindow("modal1"));

  modal1.setPageMapName("modal-1");
  modal1.setCookieName("modal-1");
  modal1.setPageCreator(*new *ModalWindow.PageCreator()
  {
  *public *Page createPage()
  {
  *return new *ModalPage1(Modal.this, modal1);
  }
  });

  add(*new *AjaxLink("showModal1")
  {
  *public **void *onClick(AjaxRequestTarget target)
  {
  modal1.show(target);
  }
  });

}

*public class *ModalPage1 *extends *WebPage{
  *public *ModalPage1(Modal modal,ModalWindow modalwindow){

  public void setData(String m) {

  }

  }
}


Re: modal page encoding

2011-08-22 Thread Anna Simbirtsev
 it seems that Ajax form processing should always be encoded in UTF-8, is
there alternative way to let Ajax form processing using 'iso-8859-1' except
changing wicket-ajax.js

On Mon, Aug 22, 2011 at 10:51 AM, Martin Grigorov wrote:

> disable your browser caches
> or give more details what exactly is the problem
>
> On Mon, Aug 22, 2011 at 5:39 PM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > Encoding issue in Wicket:
> > we want to change encoding from "utf-8" to "iso-8859-01", after adding
> the
> > following codes in application, it works for page, but doesn't work with
> > modal page, which is still using 'utf-8' encoding.
> >
> > getRequestCycleSettings().setResponseRequestEncoding("iso-8859-1");
> > getMarkupSettings().setDefaultMarkupEncoding("iso-8859-1");
> >
>
>
>
> --
> 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
>
>


-- 
Anna Simbirtsev
(416) 729-7331


modal page encoding

2011-08-22 Thread Anna Simbirtsev
Hi,

Encoding issue in Wicket:
we want to change encoding from "utf-8" to "iso-8859-01", after adding the
following codes in application, it works for page, but doesn't work with
modal page, which is still using 'utf-8' encoding.

getRequestCycleSettings().setResponseRequestEncoding("iso-8859-1");
getMarkupSettings().setDefaultMarkupEncoding("iso-8859-1");


Re: Username gets cached

2011-08-03 Thread Anna Simbirtsev
I have autocomplete="off", it does not work.

On Wed, Aug 3, 2011 at 10:12 AM, vineet semwal
wrote:

> try after doing autocomplete off on that textfield
>
> On Wed, Aug 3, 2011 at 7:31 PM, Anna Simbirtsev 
> wrote:
> > No, I am not. The pages are not related.
> >
> > On Wed, Aug 3, 2011 at 9:54 AM, robert.mcguinness <
> > robert.mcguinness@gmail.com> wrote:
> >
> >> are you sharing the same model between pages?
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Username-gets-cached-tp3715475p3715532.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
> >>
> >>
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
> >
>
>
>
> --
> thank you,
>
> regards,
> Vineet Semwal
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Username gets cached

2011-08-03 Thread Anna Simbirtsev
No, I am not. The pages are not related.

On Wed, Aug 3, 2011 at 9:54 AM, robert.mcguinness <
robert.mcguinness@gmail.com> wrote:

> are you sharing the same model between pages?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Username-gets-cached-tp3715475p3715532.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
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Username gets cached

2011-08-03 Thread Anna Simbirtsev
Hi,

On the login page I have a text field with wicket id username and Password
text field with wicket id password.
If I have a password text field on a different page with different wicket
id, it caches the values and populates the password field with password and
the field before it with username.

How can I turn off auto populating the fields?

Thanks
Anna


Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
I can't, because target.addComponent is called in the
AjaxFormComponentUpdatingBehavior on one of the field. But I already found a
solution. I added AjaxFormComponentUpdatingBehavior to the text field, so
that the value is kept on the server.
Thanks

On Wed, Jul 20, 2011 at 10:51 AM, Pedro Santos  wrote:

> Hi Anna, use an submit component like AjaxLink or AjaxButton to
> interact with server. Even if you skip the default form processing by
> set submitComponent.setDefaultFormProcessing(false) the input in the
> fieldName will be kept.
>
> On Wed, Jul 20, 2011 at 11:37 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > I refresh the page using target.addComponent(fieldName);
> > The value that was entered in the text field is cleared. How can I get it
> to
> > keep the value?
> >
> > Thanks
> > Anna
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
Hi,

I refresh the page using target.addComponent(fieldName);
The value that was entered in the text field is cleared. How can I get it to
keep the value?

Thanks
Anna


Distinguish between error messages for date

2011-06-27 Thread Anna Simbirtsev
Hi,

I have a date text field and I want to give 2 different error messages for
different errors:
1) invalid date
2) invalid date format


DateTextField myField = new DateTextField("myField",
"-MM-dd") {

private static final long serialVersionUID = 1L;

public IConverter getConverter(Class type)
  {
DateConverter converter = new DateConverter()
{
private static final long serialVersionUID = 1L;

/**
 * @see
org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
 */
@Override
public DateFormat getDateFormat(Locale locale)
{
SimpleDateFormat dateFormat = new
SimpleDateFormat("-MM-dd");
dateFormat.setLenient(false);

return dateFormat;
}
};

return converter;
  }
};
add(myField);

I put this into properties file but it gives same message for both cases.
iprRegistered.IConverter.Date=my message

Thanks


selenium certificate problem

2011-06-13 Thread Anna Simbirtsev
Hi,

I am using selenium to test my wicket application. When run test
cases, I get an error "This Connection is Untrusted" and asks me to
accept to certificate.
I am trying to get selenium server to use my profile and not to create
a new one every time.
I added the following line to pom.xml, but it does not work.

/home/myhome/seleniumprofile

seleniumprofile directory is copied from .mozilla/firefox directory



org.codehaus.mojo
selenium-maven-plugin
1.0.1


start
pre-integration-test

start-server



/home/myhome/seleniumprofile
true




stop
post-integration-test

stop-server



  

Thanks
Anna

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



Rendering the page, error some elements are missing

2011-05-13 Thread Anna Simbirtsev
Hi,

I have the following markup for MyPanel.html:



  My page
   


 Label
 
  Please Select
  This is a very very long
long text that goes here
  2
  3
 

fragments contents come here

 
 Reason
 
  Please 
Select
  This is a 
very very
long long text that goes here
  2
  3
 
  
   

SUBMIT



 Mypage
 



Label



   
  code
  
   


   


In onSubmit of submit button of MyPanel, I try to do the following:

AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {

private static final long serialVersionUID = 1L;

protected void onSubmit(AjaxRequestTarget target, Form form)
{

processData();

target.addComponent(MyPanel.this);

This should show the second wicket:enclosure, and hide the first enclosure.
But I get an error message:

The component(s) below failed to render. A common problem is that you
have added a component in code but forgot to reference it in the
markup (thus the component will never be rendered).

1. [MarkupContainer [Component id = fragment]]
2. [MarkupContainer [Component id = reason]]
3. [MarkupContainer [Component id = submit]]

I have no idea why it is missing from the markup.

Thanks
Anna

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



WebMarkupContainer and replaceWith

2011-05-11 Thread Anna Simbirtsev
Hi,

I am trying to replace WebMarkupContainer with Panel, but get the
following error:
org.apache.wicket.markup.MarkupException: close tag not found for tag:
.

The container has other elements attached to it.

Is there any way to get it working or I can only replace panel with panel?

Thanks
Anna

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



dynamic tree model

2011-02-18 Thread Anna Simbirtsev
Hi,

I have a tree with ExternalLink as a leaf node. Is it possible to make
the tree dynamic? Like when the user clicks on a +, the model gets
reloaded and the tree rerendered?

Thanks
Anna

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



Re: LoadableDetachableModel

2011-02-18 Thread Anna Simbirtsev
No, it sends a request somewhere and gets a response, I can't change
the response. is there any other way? or maybe I need to change the
model?

On Fri, Feb 18, 2011 at 10:52 AM, Sven Meier  wrote:
>
> Hi,
>
> I assume your query model loads the records from a db? Then persist the new
> Myrecord first (via a DAO and/or service layer) and then detach the model
> explicitely to let it query a fresh state.
>
> WebMarkupContainer myPanel = new WebMarkupContainer("myPanel");
> myPanel.setOutputMarkupId(true);
> form.add(myPanel);
>
> final QueryModel model = (QueryModel)getDefaultModel();
>
> final ListView lv = new ListView("rows", model) {
>        @Override
>        protected void populateItem(ListItem item) {
>                // don't pull anything out of models just to place it into 
> another model,
>                // otherwise you're just increasing your session size
>                item.add(new TextField("value",
>                        new PropertyModel(item.getModel(), "value"),
>                        Integer.class));
>        }
> }
> myPanel.add(lv);
>
> AjaxSubmitLink addLink = new AjaxSubmitLink("addRow") {
>        @Override
>        public void onSubmit(AjaxRequestTarget target, Form form) {
>                // let you service layer persist the new record
>                dao.persist(new Myrecord());
>                // let the model query a fresh state
>                model.detach();
>
>                if (target != null)     {
>                        target.addComponent(myPanel);
>                        target.addComponent(addLink);
>                }
>        }
>        public boolean isVisible() {
>                // although disdained recently IMHO this is a perfect place to 
> override
> isVisible()
>                // and be always up-to-date
>                return super.isVisible() && model.getObject().size() < 10
>        }
> };
> addLink.setDefaultFormProcessing(false);
> form.add(addLink);
>
> HTH
>
> Sven
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModel-tp3312829p3312947.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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



LoadableDetachableModel

2011-02-18 Thread Anna Simbirtsev
Hi,

I have a list view, and I am using  LoadableDetachableModel as the
model for the list view.

The only problem that I have is I also have add more button, that adds
extra rows to the list view using ajax.

Since the model is read only, I can't add any rows to it.


WebMarkupContainer myPanel = new WebMarkupContainer(
"myPanel");
myPanel.setOutputMarkupId(true);
form.add(myPanel);

final ListView lv = new ListView("rows", (QueryModel)
getDefaultModel()) {

private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item)
{
Myrecord dR = (Myrecord) item.getModelObject();


item.add(new TextField("value",
new PropertyModel(dR, "value"),
Integer.class));
}

myPanel.add(lv);

AjaxSubmitLink addLink = new AjaxSubmitLink("addRow") {

private static final long serialVersionUID = 1L;

@Override
public void onSubmit(AjaxRequestTarget target, Form 
form)
{
if (count < 10)
{
lv.getModelObject().add(new Myrecord());

if (target != null)
{
target.addComponent(myPanel);
count++;

if (count >= 10)
{

addLink.setVisible(false);

target.addComponent(addLink);
}
}
}
}
};
addLink.setDefaultFormProcessing(false);

if (count >= 10)
addLink.setVisible(false);

form.add(addLink);


The QueryModel is a class extending LoadableDetachableModel

What other model can I use?

Thanks

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



Re: DatePicker to pick a year

2010-12-10 Thread Anna Simbirtsev
Thanks, I'll try it.

On Fri, Dec 10, 2010 at 4:02 AM, Nivedan Nadaraj  wrote:
> So I am guessing your model is of TemporalType.Date and If it is the case
> and if your not yet resolved it, can you try changing the dateformat to
> mm-dd-yy ? or dd-mm-yy ? And see if your getting the validation error. If
> your not then DatePicker field is expecting that default format and to
> override it I guess Julien's suggestion would be the way to go.
> Cheers
>
>
> On Fri, Dec 10, 2010 at 4:53 PM, Nivedan Nadaraj wrote:
>
>> So did that work? Have you tried to check your model annotation?
>>
>>
>>
>> On Wed, Dec 8, 2010 at 10:24 PM, Anna Simbirtsev 
>> wrote:
>>
>>> It is a pure Date.
>>>
>>> On Tue, Dec 7, 2010 at 9:24 PM, nivs  wrote:
>>> >
>>> > Hi
>>> >
>>> > If your getting the date format error from the Model side and it is
>>> > expecting a timestamp , then you might get that issue.
>>> > Are you using a TimeStamp field or pure date?
>>> >
>>> > If I wanted only to store date in the backend without timestamp details
>>> my
>>> > model has to be decorated like
>>> >
>>> > @Temporal(TemporalType.DATE) //This is important
>>> > @Column(name = "DATE_OF_APPLICATION", length = 7)
>>> > public Date getDateOfApplication() {
>>> >        return this.dateOfApplication;
>>> > }
>>> >
>>> > If for instance it was
>>> > @Temporal(TemporalType.TIMESTAMP)
>>> >
>>> > It will fail validation based on the format.
>>> >
>>> > Hope that helps
>>> > Cheers
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/DatePicker-to-pick-a-year-tp3063856p3077604.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
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Anna Simbirtsev
>>> (416) 729-7331
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: DatePicker to pick a year

2010-12-08 Thread Anna Simbirtsev
It is a pure Date.

On Tue, Dec 7, 2010 at 9:24 PM, nivs  wrote:
>
> Hi
>
> If your getting the date format error from the Model side and it is
> expecting a timestamp , then you might get that issue.
> Are you using a TimeStamp field or pure date?
>
> If I wanted only to store date in the backend without timestamp details my
> model has to be decorated like
>
> @Temporal(TemporalType.DATE) //This is important
> @Column(name = "DATE_OF_APPLICATION", length = 7)
> public Date getDateOfApplication() {
>        return this.dateOfApplication;
> }
>
> If for instance it was
> @Temporal(TemporalType.TIMESTAMP)
>
> It will fail validation based on the format.
>
> Hope that helps
> Cheers
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/DatePicker-to-pick-a-year-tp3063856p3077604.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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: DatePicker to pick a year

2010-12-07 Thread Anna Simbirtsev
Hi,

I am using the wiQuery for the calendar now, but have some problems.

1) The page refreshes when I click in the field, then the datepicker appeares.

2) When I try to submit, it gives me an error: '1980-12-04' is not a valid Date.


DatePicker datefield = new DatePicker("datefield", Date.class);
datefield.setYearRange(new DatePickerYearRange(new
Short("-210"), new Short("0")));
datefield.setDateFormat("yy-mm-dd");
datefield.setChangeYear(true);
datefield.setChangeMonth(true);
datefield.setShowOn(ShowOnEnum.FOCUS);
add(datefield);


In the model object, datefield is a Date type.

Thanks
Anna


On Tue, Nov 30, 2010 at 11:20 AM, Alexander Monakhov  wrote:
> Hi.
>
> Why don't you use wiQuery?
>
> BTW, it's not a good idea to set markup id, because you're not sure
> whether it's unique across entire page. Let it be set by framework.
>
> If you don't want to use wiQuery, use header contribution to inject
> jquery related code from java code to page. In this case you can use
> getMarkupId() to retrieve actual input's id and put it to jquery
> related code.
>
> Best regards, Alexander.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: DatePicker to pick a year

2010-11-30 Thread Anna Simbirtsev
Hi,

I am trying to use JQuery calendar instead, because I like that it has
month and year dropdowns.

I added js, css and images files.

Added this to the head:

  $(document).ready(function() {
$("#mydatepicker").datepicker();
$( "#mydatepicker" ).datepicker({ changeMonth: true, changeYear: true });
  });

This is in the body:



But it does not work, does anybody has any ideas?

Thanks

On Mon, Nov 29, 2010 at 1:07 PM, Anna Simbirtsev  wrote:
> That works, thanks. I just wonder how users will be able to figure it out.
>
> On Mon, Nov 29, 2010 at 11:56 AM, Marco Mancini  wrote:
>> in this page the problem is dateformat... but he can switch year
>> https://issues.apache.org/jira/browse/WICKET-2767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846200#action_12846200
>>
>> 
>>
>> try to click on month name for change year!
>>
>>
>>
>> 2010/11/29 Anna Simbirtsev 
>>
>>> It does not work, only can switch between month, not year.
>>>
>>> On Mon, Nov 29, 2010 at 11:33 AM, Marco Mancini 
>>> wrote:
>>> > try this code:
>>> >
>>> > DatePicker mydp= new DatePicker(){
>>> >                private static final long serialVersionUID = 1L;
>>> >
>>> >               �...@override
>>> >                protected boolean enableMonthYearSelection() {
>>> >                    return true;
>>> >                }
>>> >            };
>>> >
>>> > 2010/11/29 Anna Simbirtsev 
>>> >
>>> >> Hi,
>>> >>
>>> >> Is it possible to get datapicker to switch between year, currently
>>> >> there are arrows to only switch between month?
>>> >>
>>> >> Thanks,
>>> >> Anna
>>> >>
>>> >> -
>>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>>> >>
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Anna Simbirtsev
>>> (416) 729-7331
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: DatePicker to pick a year

2010-11-29 Thread Anna Simbirtsev
That works, thanks. I just wonder how users will be able to figure it out.

On Mon, Nov 29, 2010 at 11:56 AM, Marco Mancini  wrote:
> in this page the problem is dateformat... but he can switch year
> https://issues.apache.org/jira/browse/WICKET-2767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846200#action_12846200
>
> 
>
> try to click on month name for change year!
>
>
>
> 2010/11/29 Anna Simbirtsev 
>
>> It does not work, only can switch between month, not year.
>>
>> On Mon, Nov 29, 2010 at 11:33 AM, Marco Mancini 
>> wrote:
>> > try this code:
>> >
>> > DatePicker mydp= new DatePicker(){
>> >                private static final long serialVersionUID = 1L;
>> >
>> >               �...@override
>> >                protected boolean enableMonthYearSelection() {
>> >                    return true;
>> >                }
>> >            };
>> >
>> > 2010/11/29 Anna Simbirtsev 
>> >
>> >> Hi,
>> >>
>> >> Is it possible to get datapicker to switch between year, currently
>> >> there are arrows to only switch between month?
>> >>
>> >> Thanks,
>> >> Anna
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Anna Simbirtsev
>> (416) 729-7331
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: DatePicker to pick a year

2010-11-29 Thread Anna Simbirtsev
It does not work, only can switch between month, not year.

On Mon, Nov 29, 2010 at 11:33 AM, Marco Mancini  wrote:
> try this code:
>
> DatePicker mydp= new DatePicker(){
>                private static final long serialVersionUID = 1L;
>
>               �...@override
>                protected boolean enableMonthYearSelection() {
>                    return true;
>                }
>            };
>
> 2010/11/29 Anna Simbirtsev 
>
>> Hi,
>>
>> Is it possible to get datapicker to switch between year, currently
>> there are arrows to only switch between month?
>>
>> Thanks,
>> Anna
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



DatePicker to pick a year

2010-11-29 Thread Anna Simbirtsev
Hi,

Is it possible to get datapicker to switch between year, currently
there are arrows to only switch between month?

Thanks,
Anna

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



Re: Link inside feedback message

2010-11-16 Thread Anna Simbirtsev
Thank you.

On Tue, Nov 16, 2010 at 10:26 AM, Manfred Bergmann
 wrote:
>
> Check the API docs for Component.
> You'll find urlFor() methods that take a Page subclass and PareParameters.
>
> => urlFor(Class pageClass, PageParameters parameters)
>
>
> Manfred
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Link-inside-feedback-message-tp3043825p3045009.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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: Link inside feedback message

2010-11-16 Thread Anna Simbirtsev
And I need to provide the whole URL? What if I need to use
bookmarkable page link. For example:
add(new BookmarkablePageLink("homelink", Home.class));

On Mon, Nov 15, 2010 at 10:01 PM, Alexander Morozov
 wrote:
>
> /* add feedback */
> FeedbackPanel panel = new FeedbackPanel("feedback");
> panel.setEscapeModelStrings(false);
>
> /* message with HTML*/
> info("Please, visit 
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Link-inside-feedback-message-tp3043825p3044162.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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Link inside feedback message

2010-11-15 Thread Anna Simbirtsev
Hi,

Is it possible to add a bookmarkable link to a feedback message? To
have a link inside a message?

Thanks,
Anna

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



AjaxSubmitLink problem

2010-10-27 Thread Anna Simbirtsev
Hi,

I am using AjaxSubmitLink and I have setDefaultFormProcessing(false)
to avoid form validation. The only problem is that none of the form
values get submitted. If I need to get the value of one of the fields,
how do I do that?

Thanks,
Anna

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



Re: automatically sizing modal window

2010-09-28 Thread Anna Simbirtsev
I think if the modal window is a panel, not a Page, then it auto sizes
its height.

On Mon, Sep 27, 2010 at 5:41 PM, Martin Grigorov  wrote:
> patches are welcome
> especially if they work cross-browser ;-)
>
> On Mon, Sep 27, 2010 at 11:23 PM,  wrote:
>
>> Sounds like a nice feature, however be careful, if the content is too
>> large the close button may be off-screen and make it impossible to close.
>> So maybe it should auto adjust within the bounds of the screen...
>>
>>
>>
>>
>> From:   andrea del bene 
>> To:     users@wicket.apache.org
>> Date:   09/27/2010 05:04 PM
>> Subject:        Re: automatically sizing modal window
>>
>>
>>
>> Hi Martin,
>>
>> what I'd like to have is a window that automatically adjusts its height
>> and width in order to ensure that all its content it's always visible
>> without scrollbars.   I think it could be done with some JavaScript code.
>> Do you think it's possible to implement such behavior?
>>
>> Thank you in advance!
>> > Can you give more information about this feature, please.
>> > Either here or in the ticket.
>> > What are the current obstacles? How do you want it to be? Etc.
>> >
>> > On Sun, Sep 26, 2010 at 3:49 PM, andrea del
>> benewrote:
>> >
>> >
>> >> On 09/25/2010 02:30 PM, Fernando Wermus wrote:
>> >>
>> >>
>> >>> I would like so much this feature. It is so important to me!
>> >>>
>> >>> On Sat, Sep 25, 2010 at 5:51 AM, Josh Kamau
>> >>>   wrote:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>> Hi guys,
>> >>>>
>> >>>> Is there are way to ensure that a modal window automatically sizes to
>> fit
>> >>>> the available content? the default size seems sometimes too big and
>> >>>> sometimes too small for the contents.
>> >>>>
>> >>>> Regards.
>> >>>> Josh
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>>
>>
>>
>> Notice: This communication, including any attachments, is intended solely
>> for the use of the individual or entity to which it is addressed. This
>> communication may contain information that is protected from disclosure
>> under State and/or Federal law. Please notify the sender immediately if
>> you have received this communication in error and delete this email from
>> your system. If you are not the intended recipient, you are requested not
>> to disclose, copy, distribute or take any action in reliance on the
>> contents of this information.
>



-- 
Anna Simbirtsev
(416) 729-7331

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



setDefaultButton works in all browsers?

2010-09-21 Thread Anna Simbirtsev
I am using setDefaultButton to submit the form using enter key. It
seems to be working ok, but I have read on the internet that people
are having problems in some browsers. Does anybody have any
recommendations?

Thanks

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



Re: Close modal window on session timeout

2010-09-13 Thread Anna Simbirtsev
Its working, thank you.

On Mon, Sep 13, 2010 at 2:13 PM, Anna Simbirtsev  wrote:
> When would this java script get executed? I added it to the base page,
> but does not work.
>
> On Sat, Sep 11, 2010 at 7:07 AM, Alexander Morozov
>  wrote:
>>
>> Yep, just put it to home (base) page.
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Close-modal-window-on-session-timeout-tp2534936p2535578.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
>>
>>
>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: Close modal window on session timeout

2010-09-13 Thread Anna Simbirtsev
When would this java script get executed? I added it to the base page,
but does not work.

On Sat, Sep 11, 2010 at 7:07 AM, Alexander Morozov
 wrote:
>
> Yep, just put it to home (base) page.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Close-modal-window-on-session-timeout-tp2534936p2535578.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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Re: Close modal window on session timeout

2010-09-10 Thread Anna Simbirtsev
Yes, it is a page.
To change it to a panel is not an option for me right now  since we
are on a tight deadline. But as I understand a lot of things would be
easier with a panel.

On Fri, Sep 10, 2010 at 3:42 PM, Ernesto Reinaldo Barreiro
 wrote:
> Anna,
>
> Just guessing... Are the contents of your modal window in a Page? If
> you make the contents live in a Panel (instead of a page) then (I
> suppose) you will not have this problem.
>
> Ernesto
>
> On Fri, Sep 10, 2010 at 9:03 PM, Anna Simbirtsev  
> wrote:
>> Hi,
>>
>>
>> I open a modal window from the parent window, and after some time the
>> session times out.
>> The modal window is still open, so the login page is displayed inside
>> the modal window.
>>
>> Is there a way to have a modal window close on session timeout?
>>
>> Thanks,
>> Anna
>>
>> -
>> 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
>
>



-- 
Anna Simbirtsev
(416) 729-7331

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



Close modal window on session timeout

2010-09-10 Thread Anna Simbirtsev
Hi,


I open a modal window from the parent window, and after some time the
session times out.
The modal window is still open, so the login page is displayed inside
the modal window.

Is there a way to have a modal window close on session timeout?

Thanks,
Anna

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



Re: Using AjaxCheckBox

2010-08-23 Thread Anna Simbirtsev
Thanks, this fixed a problem. But I thought, it would give me an error
message, if I am trying to update a component that does not have
setOutputMarkupId(true) ?

On Mon, Aug 23, 2010 at 3:26 PM, Sven Meier  wrote:

> Hi,
>
> calling b.setOutputMarkupId(true) during Ajax request is too late. The HTML
> tag will not have a markup id, so nothing will be updated.
>
> Call this method immediately after constructing the checkbox.
>
> Regards
>
> Sven
>
>
>
> On 08/23/2010 09:18 PM, Anna Simbirtsev wrote:
>
>> Hi,
>>
>> I am trying to use AjaxCheckBox to update another checkbox model object
>> when
>> this checkbox is clicked.
>>
>> CheckBox b = new CheckBox("basicCreate",
>> new Model());
>>
>> AjaxCheckBox a = new AjaxCheckBox("create",
>> new Model()) {
>>
>> private static final long serialVersionUID =
>> 288634742710645609L;
>>
>> protected void onUpdate(AjaxRequestTarget target)
>> {
>> if (getModelObject()) {
>> b.setModelObject(true);
>> b.setOutputMarkupId(true);
>>
>> target.addComponent(b);
>> }
>> }
>> };
>>
>> So when checkbox a is checked, I want checkbox b to be checked as well.
>> But nothing happens. Am I doing something wrong?
>>
>> Thanks,
>> Anna
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Using AjaxCheckBox

2010-08-23 Thread Anna Simbirtsev
Hi,

I am trying to use AjaxCheckBox to update another checkbox model object when
this checkbox is clicked.

CheckBox b = new CheckBox("basicCreate",
new Model());

AjaxCheckBox a = new AjaxCheckBox("create",
new Model()) {

private static final long serialVersionUID =
288634742710645609L;

protected void onUpdate(AjaxRequestTarget target)
{
if (getModelObject()) {
b.setModelObject(true);
b.setOutputMarkupId(true);

target.addComponent(b);
}
}
};

So when checkbox a is checked, I want checkbox b to be checked as well.
But nothing happens. Am I doing something wrong?

Thanks,
Anna


Testing modal window

2010-08-12 Thread Anna Simbirtsev
Hi,

I am trying to write a test case to test that the parent page gets updated
with new values once the modal window closes.


public class DataAddITCase extends AbstractITCase
{
public DataAddITCase()
{
super();
}

@Override
protected void signin()
{
super.signin("login", "password");
}

@Test
public void createData()
{
ModalWindow modalWindow = testModalWindow();

wicketTester.startPage(new AddDataPage(modalWindow));

buildTestForm();

wicketTester.executeAjaxEvent("myForm:submit", "onclick");
wicketTester.assertNoErrorMessage();

wicketTester.assertRenderedPage(Data.class);

Data mainPage = (Data) wicketTester
.getLastRenderedPage();
List objects =
(List)mainPage.getDefaultModelObject();

boolean found = false;
for (Object c : objects) {
if (c.getCode().equals("PP"))
found = true;
}

if (!found)
Assert.fail("Object PP was not added");*/
}

private void buildTestForm()
{
FormTester form = wicketTester.newFormTester("myForm");
form.setValue("code", "PP");
form.setValue("name", "");
}

private ModalWindow testModalWindow()
{
wicketTester.startPage(Data.class);

wicketTester.executeAjaxEvent("myForm:showModal1", "onclick");

wicketTester.assertNoErrorMessage();

wicketTester.assertRenderedPage(Data.class);

ModalWindow modalWindow = (ModalWindow) wicketTester
.getComponentFromLastRenderedPage("myForm:modal1");
Assert.assertTrue(modalWindow.isVisible());
return modalWindow;
}

}

The problem is after wicketTester.executeAjaxEvent("myForm:submit",
"onclick"); it does not come back to the parent page.
So wicketTester.assertRenderedPage(Data.class); fails.

How can I test that that data on the parent page is updated once the modal
window is closed?

Thanks


Re: refreshing fragment

2010-07-12 Thread Anna Simbirtsev
No, I don't think so.:(

On Mon, Jul 12, 2010 at 11:15 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> No validation error?
>
> **
> Martin
>
> 2010/7/12 Anna Simbirtsev :
> > I took out the wicket enclosure, still does not work. The value in the
> > textfield still stays the same, instead of being empty. Printing out
> > loans.getComment(), prints an empty value.
> >
> > On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> Is your component visible in browser source when your refresh it ??
> >>
> >> Ajax cannot referesh invisible components 
> >>
> >> **
> >> Martin
> >>
> >> 2010/7/12 Anna Simbirtsev :
> >> > fragments contents
> come
> >> > here
> >> > 
> >> >  
> >> >  
> >> >
> >> >  
> >> >Loan ID
> >> >Comment
> >> >
> >> >  
> >> >
> >> >
> >> >  
> >> >
> >> >
> >> > >> > type="text" onfocus="this.className='';"/>
> >> >
> >> >
> >> >     wicket:id="rsubmit"
> >> > href="#" class="button">SUBMIT
> >> >
> >> >
> >> >  
> >> >
> >> >  
> >> > 
> >> >   
> >> >
> >> > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi <
> >> > martin.maku...@koodaripalvelut.com> wrote:
> >> >
> >> >> what is your fragment about ?   does it have
> markupid?
> >> >>
> >> >> 2010/7/12 Anna Simbirtsev :
> >> >> > Hi,
> >> >> >
> >> >> > I have a listview inside a fragment. Listview has a text field
> >> comment.
> >> >> >
> >> >> >
> >> >> > Fragment f = new Fragment("fragment", "fragmentid", form2);
> >> >> >f.setOutputMarkupId(true);
> >> >> >form.add(f);
> >> >> >
> >> >> > final ListView lv = new ListView("loans", data
> >> >> >.getLoans()) {
> >> >> >
> >> >> >private static final long serialVersionUID = 1L;
> >> >> >
> >> >> >@Override
> >> >> >protected void populateItem(ListItem item)
> >> >> >{
> >> >> >finalLoan loan = (Loan) item.getModelObject();
> >> >> >
> >> >> >item.add(new Label("id", loan.getId()));
> >> >> >
> >> >> >final TextField comment = new TextField(
> >> >> >        "comment", new PropertyModel(loan,
> >> >> "comment")
> >> >> > );
> >> >> >
> >> >> >item.add(comment);
> >> >> >
> >> >> >item
> >> >> >.add(addLoanSubmitButton(loan));
> >> >> >}
> >> >> >};
> >> >> >
> >> >> >f.add(lv);
> >> >> >
> >> >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment
> >> using
> >> >> > target.addComponent(f);.
> >> >> > But it does not get refreshed.
> >> >> >
> >> >> > Any ideas?
> >> >> >
> >> >> > Thanks
> >> >> >
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Anna Simbirtsev
> >> > (416) 729-7331
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: refreshing fragment

2010-07-12 Thread Anna Simbirtsev
I took out the wicket enclosure, still does not work. The value in the
textfield still stays the same, instead of being empty. Printing out
loans.getComment(), prints an empty value.

On Mon, Jul 12, 2010 at 11:01 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Is your component visible in browser source when your refresh it ??
>
> Ajax cannot referesh invisible components 
>
> **
> Martin
>
> 2010/7/12 Anna Simbirtsev :
> > fragments contents come
> > here
> > 
> >  
> >  
> >
> >  
> >Loan ID
> >Comment
> >
> >  
> >
> >
> >  
> >
> >
> > > type="text" onfocus="this.className='';"/>
> >
> >
> > > href="#" class="button">SUBMIT
> >
> >
> >  
> >
> >      
> > 
> >   
> >
> > On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> what is your fragment about ?   does it have markupid?
> >>
> >> 2010/7/12 Anna Simbirtsev :
> >> > Hi,
> >> >
> >> > I have a listview inside a fragment. Listview has a text field
> comment.
> >> >
> >> >
> >> > Fragment f = new Fragment("fragment", "fragmentid", form2);
> >> >f.setOutputMarkupId(true);
> >> >form.add(f);
> >> >
> >> > final ListView lv = new ListView("loans", data
> >> >.getLoans()) {
> >> >
> >> >private static final long serialVersionUID = 1L;
> >> >
> >> >@Override
> >> >protected void populateItem(ListItem item)
> >> >{
> >> >finalLoan loan = (Loan) item.getModelObject();
> >> >
> >> >item.add(new Label("id", loan.getId()));
> >> >
> >> >final TextField comment = new TextField(
> >> >"comment", new PropertyModel(loan,
> >> "comment")
> >> > );
> >> >
> >> >item.add(comment);
> >> >
> >> >item
> >> >.add(addLoanSubmitButton(loan));
> >> >}
> >> >    };
> >> >
> >> >f.add(lv);
> >> >
> >> > In onSubmit, I refresh data.getLoans() and try to refresh fragment
> using
> >> > target.addComponent(f);.
> >> > But it does not get refreshed.
> >> >
> >> > Any ideas?
> >> >
> >> > Thanks
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: refreshing fragment

2010-07-12 Thread Anna Simbirtsev
fragments contents come
here
 
  
  

  
Loan ID
Comment

  


  





SUBMIT


  

  
 
   

On Mon, Jul 12, 2010 at 10:47 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> what is your fragment about ?   does it have markupid?
>
> 2010/7/12 Anna Simbirtsev :
> > Hi,
> >
> > I have a listview inside a fragment. Listview has a text field comment.
> >
> >
> > Fragment f = new Fragment("fragment", "fragmentid", form2);
> >f.setOutputMarkupId(true);
> >form.add(f);
> >
> > final ListView lv = new ListView("loans", data
> >.getLoans()) {
> >
> >private static final long serialVersionUID = 1L;
> >
> >@Override
> >protected void populateItem(ListItem item)
> >{
> >finalLoan loan = (Loan) item.getModelObject();
> >
> >item.add(new Label("id", loan.getId()));
> >
> >final TextField comment = new TextField(
> >"comment", new PropertyModel(loan,
> "comment")
> > );
> >
> >item.add(comment);
> >
> >item
> >.add(addLoanSubmitButton(loan));
> >}
> >};
> >
> >f.add(lv);
> >
> > In onSubmit, I refresh data.getLoans() and try to refresh fragment using
> > target.addComponent(f);.
> > But it does not get refreshed.
> >
> > Any ideas?
> >
> > Thanks
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


refreshing fragment

2010-07-12 Thread Anna Simbirtsev
Hi,

I have a listview inside a fragment. Listview has a text field comment.


Fragment f = new Fragment("fragment", "fragmentid", form2);
f.setOutputMarkupId(true);
form.add(f);

final ListView lv = new ListView("loans", data
.getLoans()) {

private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item)
{
finalLoan loan = (Loan) item.getModelObject();

item.add(new Label("id", loan.getId()));

final TextField comment = new TextField(
"comment", new PropertyModel(loan, "comment")
);

item.add(comment);

item
.add(addLoanSubmitButton(loan));
}
};

f.add(lv);

In onSubmit, I refresh data.getLoans() and try to refresh fragment using
target.addComponent(f);.
But it does not get refreshed.

Any ideas?

Thanks


Re: Refreshing modal window

2010-07-02 Thread Anna Simbirtsev
I'm sorry, it actually works in IE, but not in Mozilla. Does anybody have
any idea how to get it to work in Mozilla?

Thank you

On Fri, Jul 2, 2010 at 10:37 AM, Anna Simbirtsev wrote:

> I think because its a modal window, it has the same url as the parent
> window.
>
>
> On Fri, Jul 2, 2010 at 9:47 AM, Anna Simbirtsev wrote:
>
>> Hi, it does not work.
>>
>>
>> On Wed, Jun 30, 2010 at 6:35 PM, Nelson Segura wrote:
>>
>>> To execute javascript after AJAX, do the following
>>>
>>> ajaxRequestTarget.appendJavascript("alert('hello');");
>>>
>>>
>>> To jump to a section using javascript use
>>>
>>> window.location.hash = '#idname';
>>>
>>>
>>> You can put a #top anchor on top of your window, and then jump to it
>>> using the combination of code above.
>>> I have not tried this myself, though :)
>>>
>>> ajaxRequestTarget.appendJavascript("window.location.hash = '#top';");
>>>
>>> -Nelson
>>>
>>> On Wed, Jun 30, 2010 at 1:54 PM, Anna Simbirtsev 
>>> wrote:
>>> >
>>> > I need to scroll to the top on ajax response. Would you have an example
>>> on
>>> > how to do it?
>>> >
>>> >
>>> > On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura 
>>> wrote:
>>> >
>>> > > Are you refreshing the whole window or just the feedback panel?
>>> > > You can try to refresh the whole window, or you can include some java
>>> > > script
>>> > > that scrolls your window to the top on the ajax response.
>>> > > -Nelson
>>> > >
>>> > > On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev <
>>> asimbirt...@gmail.com
>>> > > >wrote:
>>> > >
>>> > > > Hi,
>>> > > >
>>> > > > My problem is that after the user clicks AjaxSubmit button, and the
>>> > > > confirmation message is displayed in feedback panel, the window
>>> does not
>>> > > > refresh, so if the user scrolled to the bottom of the model window,
>>> > > he/she
>>> > > > does not see the confirmation message.
>>> > > >
>>> > > > How can I get the modal window to refresh, so the top part of the
>>> window
>>> > > is
>>> > > > visible?
>>> > > >
>>> > > > Thanks,
>>> > > > Anna
>>> > > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > Anna Simbirtsev
>>> > (416) 729-7331
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Anna Simbirtsev
>> (416) 729-7331
>>
>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>



-- 
Anna Simbirtsev
(416) 729-7331


Re: Refreshing modal window

2010-07-02 Thread Anna Simbirtsev
I think because its a modal window, it has the same url as the parent
window.

On Fri, Jul 2, 2010 at 9:47 AM, Anna Simbirtsev wrote:

> Hi, it does not work.
>
>
> On Wed, Jun 30, 2010 at 6:35 PM, Nelson Segura  wrote:
>
>> To execute javascript after AJAX, do the following
>>
>> ajaxRequestTarget.appendJavascript("alert('hello');");
>>
>>
>> To jump to a section using javascript use
>>
>> window.location.hash = '#idname';
>>
>>
>> You can put a #top anchor on top of your window, and then jump to it
>> using the combination of code above.
>> I have not tried this myself, though :)
>>
>> ajaxRequestTarget.appendJavascript("window.location.hash = '#top';");
>>
>> -Nelson
>>
>> On Wed, Jun 30, 2010 at 1:54 PM, Anna Simbirtsev 
>> wrote:
>> >
>> > I need to scroll to the top on ajax response. Would you have an example
>> on
>> > how to do it?
>> >
>> >
>> > On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura 
>> wrote:
>> >
>> > > Are you refreshing the whole window or just the feedback panel?
>> > > You can try to refresh the whole window, or you can include some java
>> > > script
>> > > that scrolls your window to the top on the ajax response.
>> > > -Nelson
>> > >
>> > > On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev <
>> asimbirt...@gmail.com
>> > > >wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > My problem is that after the user clicks AjaxSubmit button, and the
>> > > > confirmation message is displayed in feedback panel, the window does
>> not
>> > > > refresh, so if the user scrolled to the bottom of the model window,
>> > > he/she
>> > > > does not see the confirmation message.
>> > > >
>> > > > How can I get the modal window to refresh, so the top part of the
>> window
>> > > is
>> > > > visible?
>> > > >
>> > > > Thanks,
>> > > > Anna
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Anna Simbirtsev
>> > (416) 729-7331
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>



-- 
Anna Simbirtsev
(416) 729-7331


Re: Rerender modal window fields without ajaxtargetrequest

2010-07-02 Thread Anna Simbirtsev
I get a null pointer exception, I think the AjaxRequestTarget.get() returns
null.

On Thu, Jul 1, 2010 at 2:41 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Anna,
>
> You mean how to access AjaxRequestTarget? Try AjaxRequestTarget.get():
> I think it can be accessed as a thread local.
>
> Ernesto
>
> On Thu, Jul 1, 2010 at 3:22 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > AjaxSubmitLink removeLink = new AjaxSubmitLink("removeLink") {
> > @Override
> > public void onSubmit(AjaxTargetRequest target) {
> >
> >MyPanel.this.replaceWith(new ConfirmDeletePanel(
> >MyPanel.this.getId(), "are you sure") {
> >
> >   @Override
> >   protected void onCancel() {
> > this.replaceWith(MyPanel.this);
> >   }
> >
> >  @Override
> >  protected void onConfirm() {
> >// do something you want confirmed beforehand
> >//  then
> >this.replaceWith(MyPanel.this);
> >  }
> > });
> > }
> >
> > };
> > In onConfirm function of ConfirmDeletePanel, how can I rerender some
> fields
> > in the MyPanel.this after it is replaced back if i don't have
> > AjaxTargetRequest?
> > I mean onConfirm changes the values that are displayed on MyPanel and I
> want
> > to refresh them.
> >
> > Thanks
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Refreshing modal window

2010-07-02 Thread Anna Simbirtsev
Hi, it does not work.

On Wed, Jun 30, 2010 at 6:35 PM, Nelson Segura  wrote:

> To execute javascript after AJAX, do the following
>
> ajaxRequestTarget.appendJavascript("alert('hello');");
>
>
> To jump to a section using javascript use
>
> window.location.hash = '#idname';
>
>
> You can put a #top anchor on top of your window, and then jump to it
> using the combination of code above.
> I have not tried this myself, though :)
>
> ajaxRequestTarget.appendJavascript("window.location.hash = '#top';");
>
> -Nelson
>
> On Wed, Jun 30, 2010 at 1:54 PM, Anna Simbirtsev 
> wrote:
> >
> > I need to scroll to the top on ajax response. Would you have an example
> on
> > how to do it?
> >
> >
> > On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura 
> wrote:
> >
> > > Are you refreshing the whole window or just the feedback panel?
> > > You can try to refresh the whole window, or you can include some java
> > > script
> > > that scrolls your window to the top on the ajax response.
> > > -Nelson
> > >
> > > On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > My problem is that after the user clicks AjaxSubmit button, and the
> > > > confirmation message is displayed in feedback panel, the window does
> not
> > > > refresh, so if the user scrolled to the bottom of the model window,
> > > he/she
> > > > does not see the confirmation message.
> > > >
> > > > How can I get the modal window to refresh, so the top part of the
> window
> > > is
> > > > visible?
> > > >
> > > > Thanks,
> > > > Anna
> > > >
> > >
> >
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Rerender modal window fields without ajaxtargetrequest

2010-07-01 Thread Anna Simbirtsev
Thank you, I'll try it.

On Thu, Jul 1, 2010 at 2:41 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Anna,
>
> You mean how to access AjaxRequestTarget? Try AjaxRequestTarget.get():
> I think it can be accessed as a thread local.
>
> Ernesto
>
> On Thu, Jul 1, 2010 at 3:22 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > AjaxSubmitLink removeLink = new AjaxSubmitLink("removeLink") {
> > @Override
> > public void onSubmit(AjaxTargetRequest target) {
> >
> >MyPanel.this.replaceWith(new ConfirmDeletePanel(
> >MyPanel.this.getId(), "are you sure") {
> >
> >   @Override
> >   protected void onCancel() {
> > this.replaceWith(MyPanel.this);
> >   }
> >
> >  @Override
> >  protected void onConfirm() {
> >// do something you want confirmed beforehand
> >//  then
> >this.replaceWith(MyPanel.this);
> >  }
> > });
> > }
> >
> > };
> > In onConfirm function of ConfirmDeletePanel, how can I rerender some
> fields
> > in the MyPanel.this after it is replaced back if i don't have
> > AjaxTargetRequest?
> > I mean onConfirm changes the values that are displayed on MyPanel and I
> want
> > to refresh them.
> >
> > Thanks
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Rerender modal window fields without ajaxtargetrequest

2010-06-30 Thread Anna Simbirtsev
Hi,

AjaxSubmitLink removeLink = new AjaxSubmitLink("removeLink") {
@Override
public void onSubmit(AjaxTargetRequest target) {

MyPanel.this.replaceWith(new ConfirmDeletePanel(
MyPanel.this.getId(), "are you sure") {

   @Override
   protected void onCancel() {
 this.replaceWith(MyPanel.this);
   }

  @Override
  protected void onConfirm() {
// do something you want confirmed beforehand
//  then
this.replaceWith(MyPanel.this);
  }
});
}

};
In onConfirm function of ConfirmDeletePanel, how can I rerender some fields
in the MyPanel.this after it is replaced back if i don't have
AjaxTargetRequest?
I mean onConfirm changes the values that are displayed on MyPanel and I want
to refresh them.

Thanks
Anna


Re: Refreshing modal window

2010-06-30 Thread Anna Simbirtsev
I need to scroll to the top on ajax response. Would you have an example on
how to do it?


On Wed, Jun 30, 2010 at 4:27 PM, Nelson Segura  wrote:

> Are you refreshing the whole window or just the feedback panel?
> You can try to refresh the whole window, or you can include some java
> script
> that scrolls your window to the top on the ajax response.
> -Nelson
>
> On Wed, Jun 30, 2010 at 12:22 PM, Anna Simbirtsev  >wrote:
>
> > Hi,
> >
> > My problem is that after the user clicks AjaxSubmit button, and the
> > confirmation message is displayed in feedback panel, the window does not
> > refresh, so if the user scrolled to the bottom of the model window,
> he/she
> > does not see the confirmation message.
> >
> > How can I get the modal window to refresh, so the top part of the window
> is
> > visible?
> >
> > Thanks,
> > Anna
> >
>



-- 
Anna Simbirtsev
(416) 729-7331


Refreshing modal window

2010-06-30 Thread Anna Simbirtsev
Hi,

My problem is that after the user clicks AjaxSubmit button, and the
confirmation message is displayed in feedback panel, the window does not
refresh, so if the user scrolled to the bottom of the model window, he/she
does not see the confirmation message.

How can I get the modal window to refresh, so the top part of the window is
visible?

Thanks,
Anna


Re: LinkTree and DownloadLink

2010-06-23 Thread Anna Simbirtsev
Thank you, its showing now.


On Wed, Jun 23, 2010 at 3:24 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Anna,
>
> Third parameter ( "Example DownloadLink" in your case) is just an
> alternative fine name: see onClick() method to see how it is used. Can
> you try following panel?
>
> import java.io.File;
>
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.link.DownloadLink;
> import org.apache.wicket.markup.html.panel.Panel;
>
> public class DownLoadLinkPanel extends Panel {
>
>private static final long serialVersionUID = 1L;
>
> /**
> * @param id
> */
>public DownLoadLinkPanel(String id) {
>super(id);
>DownloadLink dl = new DownloadLink( "download", new File(
>"wat-application/images/addmore.jpg" ), "AddMore.jpg" );
>add(dl);
>dl.add(new Label("text", "Example DownloadLink"));
>}
>
> }
>
> 
>
> DownLoadLinkPanel.html
>
> 
> 
> 
>
> ---
>
> and then
>
> return new DownLoadLinkPanel(componentId);
>
> Ernesto
>
> On Tue, Jun 22, 2010 at 10:43 PM, Anna Simbirtsev 
> wrote:
> > I think the problem is in this: DownloadLink dl = new DownloadLink( id,
> new
> > File( "wat-application/images/addmore.jpg" ), "Example DownloadLink" );
> >
> > This does not produce any output.
> >
> > On Tue, Jun 22, 2010 at 4:18 PM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> >> Not sure but I think if you put Link on a  you will have a
> >> generated markup  which might not be visible.
> >> Why don't you use a panel like following?
> >>
> >> 
> >>   
> >> 
> >>
> >> Ernesto
> >>
> >>
> >> On Tue, Jun 22, 2010 at 9:09 PM, Anna Simbirtsev  >
> >> wrote:
> >> > Thanks
> >> >
> >> > Do you know why if I add DownloadLink directly without the panel, its
> >> > invisible?
> >> >
> >> > On Tue, Jun 22, 2010 at 2:55 PM, Ernesto Reinaldo Barreiro <
> >> > reier...@gmail.com> wrote:
> >> >
> >> >> Your MyPanel extends Form and Form should be applied to  tag
> not
> >> >>  tag.
> >> >>
> >> >> Ernesto
> >> >>
> >> >> On Tue, Jun 22, 2010 at 7:50 PM, Anna Simbirtsev <
> asimbirt...@gmail.com
> >> >
> >> >> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > I am trying to extend newNodeComponent on a LinkTree to make nodes
> >> >> > DownLoadLink.
> >> >> >
> >> >> > tree = new LinkTree("tree", createTreeModel()){
> >> >> >
> >> >> > private static final long serialVersionUID = 1L;
> >> >> >
> >> >> > @Override
> >> >> > protected Component newNodeComponent( String id, IModel
> >> model
> >> >> )
> >> >> > {
> >> >> > return new LinkIconPanel( id, model, this ) {
> >> >> >
> >> >> >private static final long serialVersionUID =
> >> 1L;
> >> >> >
> >> >> > @Override
> >> >> > protected Component
> newContentComponent(
> >> >> String
> >> >> > componentId, BaseTree tree, IModel model ) {
> >> >> > Object obj = ( (
> >> >> DefaultMutableTreeNode
> >> >> > )model.getObject() ).getUserObject();
> >> >> > if( !obj.equals("1:subtree...,
> >> >> > 2:subtree..., 3:subtree...") ) {
> >> >> > LOGGER.debug("link");
> >> >> > return new
> MyPanel(componentId);
> >> >> > }
> >> >> >
> >> >> > return new Label( componentId,
> >> >> > model.getObject().toString() );
> >> >> > }
> >> >> >
> >> >> > };
> >> >&

Re: LinkTree and DownloadLink

2010-06-22 Thread Anna Simbirtsev
I think the problem is in this: DownloadLink dl = new DownloadLink( id, new
File( "wat-application/images/addmore.jpg" ), "Example DownloadLink" );

This does not produce any output.

On Tue, Jun 22, 2010 at 4:18 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Not sure but I think if you put Link on a  you will have a
> generated markup  which might not be visible.
> Why don't you use a panel like following?
>
> 
>   
> 
>
> Ernesto
>
>
> On Tue, Jun 22, 2010 at 9:09 PM, Anna Simbirtsev 
> wrote:
> > Thanks
> >
> > Do you know why if I add DownloadLink directly without the panel, its
> > invisible?
> >
> > On Tue, Jun 22, 2010 at 2:55 PM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> >> Your MyPanel extends Form and Form should be applied to  tag not
> >>  tag.
> >>
> >> Ernesto
> >>
> >> On Tue, Jun 22, 2010 at 7:50 PM, Anna Simbirtsev  >
> >> wrote:
> >> > Hi,
> >> >
> >> > I am trying to extend newNodeComponent on a LinkTree to make nodes
> >> > DownLoadLink.
> >> >
> >> > tree = new LinkTree("tree", createTreeModel()){
> >> >
> >> > private static final long serialVersionUID = 1L;
> >> >
> >> > @Override
> >> > protected Component newNodeComponent( String id, IModel
> model
> >> )
> >> > {
> >> > return new LinkIconPanel( id, model, this ) {
> >> >
> >> >private static final long serialVersionUID =
> 1L;
> >> >
> >> > @Override
> >> > protected Component newContentComponent(
> >> String
> >> > componentId, BaseTree tree, IModel model ) {
> >> > Object obj = ( (
> >> DefaultMutableTreeNode
> >> > )model.getObject() ).getUserObject();
> >> > if( !obj.equals("1:subtree...,
> >> > 2:subtree..., 3:subtree...") ) {
> >> > LOGGER.debug("link");
> >> > return new MyPanel(componentId);
> >> > }
> >> >
> >> > return new Label( componentId,
> >> > model.getObject().toString() );
> >> > }
> >> >
> >> > };
> >> > }
> >> >  };
> >> > form.add(tree);
> >> > tree.getTreeState().collapseAll();
> >> >
> >> >
> >> >
> >> >   public class MyPanel extends Form   {
> >> >
> >> >
> >> > private static final long serialVersionUID = 1L;
> >> >
> >> > MyPanel(String id) {
> >> > super(id);
> >> >
> >> > DownloadLink dl = new DownloadLink( id, new File(
> >> > "wat-application/images/addmore.jpg" ), "Example DownloadLink" );
> >> > add(dl);
> >> > }
> >> >  }
> >> >
> >> >
> >> > I copied the example from:
> >> > http://www.wicket-library.com/wicket-examples/ajax/tree/simple.0
> >> >
> >> >
> >> > But i get the following error:
> >> > WicketMessage: Component content must be applied to a tag of type
> 'form',
> >> > not '' (line
> 0,
> >> > column 0)
> >> >
> >> >
> >> > 
> >> >  >> wicket:id="icon"
> >> > class="icon"/> wicket:id="contentLink"> >> > wicket:id="content" class="content">
> >> > , index = 8, current = ' >> > class="content">' (line 19, column 144)]
> >> >
> >> > Thanks
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: LinkTree and DownloadLink

2010-06-22 Thread Anna Simbirtsev
Thanks

Do you know why if I add DownloadLink directly without the panel, its
invisible?

On Tue, Jun 22, 2010 at 2:55 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Your MyPanel extends Form and Form should be applied to  tag not
>  tag.
>
> Ernesto
>
> On Tue, Jun 22, 2010 at 7:50 PM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > I am trying to extend newNodeComponent on a LinkTree to make nodes
> > DownLoadLink.
> >
> > tree = new LinkTree("tree", createTreeModel()){
> >
> > private static final long serialVersionUID = 1L;
> >
> > @Override
> > protected Component newNodeComponent( String id, IModel model
> )
> > {
> > return new LinkIconPanel( id, model, this ) {
> >
> >private static final long serialVersionUID = 1L;
> >
> > @Override
> > protected Component newContentComponent(
> String
> > componentId, BaseTree tree, IModel model ) {
> > Object obj = ( (
> DefaultMutableTreeNode
> > )model.getObject() ).getUserObject();
> > if( !obj.equals("1:subtree...,
> > 2:subtree..., 3:subtree...") ) {
> > LOGGER.debug("link");
> > return new MyPanel(componentId);
> > }
> >
> > return new Label( componentId,
> > model.getObject().toString() );
> > }
> >
> > };
> > }
> >  };
> > form.add(tree);
> > tree.getTreeState().collapseAll();
> >
> >
> >
> >   public class MyPanel extends Form   {
> >
> >
> > private static final long serialVersionUID = 1L;
> >
> > MyPanel(String id) {
> > super(id);
> >
> > DownloadLink dl = new DownloadLink( id, new File(
> > "wat-application/images/addmore.jpg" ), "Example DownloadLink" );
> > add(dl);
> > }
> >  }
> >
> >
> > I copied the example from:
> > http://www.wicket-library.com/wicket-examples/ajax/tree/simple.0
> >
> >
> > But i get the following error:
> > WicketMessage: Component content must be applied to a tag of type 'form',
> > not '' (line 0,
> > column 0)
> >
> >
> > 
> >  wicket:id="icon"
> > class="icon"/> > wicket:id="content" class="content">
> > , index = 8, current = ' > class="content">' (line 19, column 144)]
> >
> > Thanks
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: modal window from AJAX ?

2010-06-22 Thread Anna Simbirtsev
I think you can do modalWindow.show(target).

On Tue, Jun 22, 2010 at 2:16 PM, Maris Orbidans wrote:

>
> Hi
>
> Is it possible to open modal window from AjaxButton's onSubmit() method
> ?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


LinkTree and DownloadLink

2010-06-22 Thread Anna Simbirtsev
Hi,

I am trying to extend newNodeComponent on a LinkTree to make nodes
DownLoadLink.

tree = new LinkTree("tree", createTreeModel()){

private static final long serialVersionUID = 1L;

@Override
 protected Component newNodeComponent( String id, IModel model )
{
 return new LinkIconPanel( id, model, this ) {

private static final long serialVersionUID = 1L;

@Override
 protected Component newContentComponent( String
componentId, BaseTree tree, IModel model ) {
 Object obj = ( ( DefaultMutableTreeNode
)model.getObject() ).getUserObject();
 if( !obj.equals("1:subtree...,
2:subtree..., 3:subtree...") ) {
 LOGGER.debug("link");
 return new MyPanel(componentId);
 }

 return new Label( componentId,
model.getObject().toString() );
 }

 };
 }
 };
 form.add(tree);
 tree.getTreeState().collapseAll();



   public class MyPanel extends Form   {


 private static final long serialVersionUID = 1L;

 MyPanel(String id) {
 super(id);

 DownloadLink dl = new DownloadLink( id, new File(
"wat-application/images/addmore.jpg" ), "Example DownloadLink" );
 add(dl);
 }
 }


I copied the example from:
http://www.wicket-library.com/wicket-examples/ajax/tree/simple.0


But i get the following error:
WicketMessage: Component content must be applied to a tag of type 'form',
not '' (line 0,
column 0)




, index = 8, current = '' (line 19, column 144)]

Thanks


Anchor, not jumping in Mozilla

2010-06-18 Thread Anna Simbirtsev
Hi,

I have a SubmitLink that submits the form and returns to the same page. But
I need it to jump to the result section.
I added an anchor:

form = new ShinyForm("myForm") {

private static final long serialVersionUID =
-4058461619493381294L;

protected void onComponentTag(ComponentTag tag)
{
   super.onComponentTag(tag);
   StringBuilder b = new
StringBuilder(tag.getString("action").toString()).append("#result");
   tag.put("action", b.toString());
}
};

The anchor appears in url and it jump in Google Chrome, but not in Mozilla.
In mozilla, I need to click reload for it to jump.

Thanks,
Anna


Re: NULL model on empty string?

2010-06-10 Thread Anna Simbirtsev
This would not work for
form.add(new TextField("guid", Integer.class)) ?

It works if type is String.

On Thu, Jun 10, 2010 at 3:03 PM, Josh Chappelle wrote:

> Call setConvertEmptyInputStringToNull(false) on your TextField.
>
> Josh
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Thursday, June 10, 2010 1:49 PM
> To: users@wicket.apache.org
> Subject: NULL model on empty string?
>
> Hi,
>
> I use CompoundPropertyModel for all the fields on the page.
>
> form.add(new TextField("url"));
>
> If the value entered by user is empty, then the model get updated with null
> value? How can I get getUrl() function to return "" instead of null.
>
> Thanks
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


NULL model on empty string?

2010-06-10 Thread Anna Simbirtsev
Hi,

I use CompoundPropertyModel for all the fields on the page.

form.add(new TextField("url"));

If the value entered by user is empty, then the model get updated with null
value? How can I get getUrl() function to return "" instead of null.

Thanks


FormTester with dynamic fields

2010-04-09 Thread Anna Simbirtsev
Hi,

I have the following MarkupContainer:

   final MarkupContainer panel = new WebMarkupContainer("panel");
   panel.setOutputMarkupId(true);

form.add(panel);

ArrayList rows = new ArrayList(1);
rows.add(new Contact());

final ListView lv = new ListView("rows", rows) {

private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item) {
 Contact c = new Contact();

 TextField text = new TextField("field",
new PropertyModel(c, "id"));

 item.add(text);
}
};
lv.setReuseItems(true);
panel.add(lv);

There is also an ADD MORE button, that adds more of those on the page.



   
  
   


I using FormTester to test the page:
FormTester formTester = getWicketTester().newFormTester("myForm");

formTester.setValue("field", "BLAH");

But that does not work.

Thanks,
Anna


DatePicker and visibility of the parent component

2010-03-25 Thread Anna Simbirtsev
Hi,

I have date picker added to a date field.

DateTextField field = new DateTextField("field", "-MM-dd");

field1.add(new DatePicker());

If the section the date picker is in is visible there is no problem. If the
section is not visible using wicket:enclosure, I get an error:
http://localhost:8080/resources/org.apache.wicket.extensions.yui.YuiLib/calendar/calendar.jsUncaught
TypeError: Cannot read property 'id' of null

Thanks
Anna


Re: Feedback and field validation

2010-03-25 Thread Anna Simbirtsev
Thanks for your response. How do I get the components to hold the error
messages? As I understand the messages get marked rendered once they are
displayed.

On Wed, Mar 24, 2010 at 6:39 PM, alexander.elsholz <
alexander.elsh...@widas.de> wrote:

>
> hi anna,
>
> feedback-messages will clear after the request processing.  build a visitor
> that checks the
> feedbackmassges of every component. your components have to hold the
> messages when error, info and warn will called. clear on successful
> validate.
>
> alex
>
>
> Anna Simbirtsev wrote:
> >
> > Hi,
> >
> > I validate fields using AjaxFormComponentUpdatingBehavior("onblur"). When
> > I
> > am on field 1, and data is invalid, it displays feedback message, and I
> > can
> > see this message in session. When I move to a different field, this
> > feedback
> > message is no longer in the session. Can somebody explain that?
> >
> > Thanks,
> > Anna
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Feedback-and-field-validation-tp27924233p28022371.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
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Feedback and field validation

2010-03-16 Thread Anna Simbirtsev
Hi,

I validate fields using AjaxFormComponentUpdatingBehavior("onblur"). When I
am on field 1, and data is invalid, it displays feedback message, and I can
see this message in session. When I move to a different field, this feedback
message is no longer in the session. Can somebody explain that?

Thanks,
Anna


Re: Remove error message for a specific component

2010-03-15 Thread Anna Simbirtsev
Thanks

I have another question.
I use the following code to validate a field onblur event. I have couple of
those fields. When the first field is validated, it displays error message
for it. But when the second field is invalid, it displays error message for
it, and removes error message for the first field.

Also once I click submit, it does not show error messages for these fields.

field1.add(new AjaxFormComponentUpdatingBehavior("onblur")
{
private static final long serialVersionUID = 1L;

protected void onUpdate(AjaxRequestTarget target)
{
Pattern pattern = Pattern.compile("[0-9]*");

if (data.getField1()!= null &&
!pattern.matcher(data.getField1()).matches()) {
error("Field contains invalid characters.");
target.addComponent(feedback);

field1.add(new SimpleAttributeModifier( "class",
"error"));
} else {
field1.add(new SimpleAttributeModifier( "class", ""));
}
target.addComponent(field1);
}
});

On Mon, Mar 15, 2010 at 2:25 PM, Igor Vaynberg wrote:

> getsession().getfeedbackmessages().clear(new ifeedbackmessagefilter() {
>  accept(feedbackmessagefilter f) { f.getreporter()==component; }
>
>
> -igor
>
>
> On Mon, Mar 15, 2010 at 10:59 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > How can I remove error message for a specific component?
> > In the Component.class, it checks that the component is valid the
> following
> > way:
> >
> > public final boolean hasErrorMessage()
> > {
> >return
> Session.get().getFeedbackMessages().hasErrorMessageFor(this);
> > }
> >
> > I need to remove error message for specific components to make them
> valid.
> >
> > Thanks,
> >
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Remove error message for a specific component

2010-03-15 Thread Anna Simbirtsev
Hi,

How can I remove error message for a specific component?
In the Component.class, it checks that the component is valid the following
way:

public final boolean hasErrorMessage()
{
return Session.get().getFeedbackMessages().hasErrorMessageFor(this);
}

I need to remove error message for specific components to make them valid.

Thanks,

Anna


Field highlighting on error in Modal window

2010-03-11 Thread Anna Simbirtsev
Hi,

I implemented LondonWicket-FormsWithFlair.pdf on my main windows, but on
Modal windows it does not work, since it uses Ajax to submit the form. Do I
have to check each field manually and manually highlight it in Modal
windows?

Thanks,
Anna


Re: Clear feedback panel

2010-03-08 Thread Anna Simbirtsev
I think my feedback messages are not in Session, when I print

FeedbackMessages me = Session.get().getFeedbackMessages();

System.out.println("size: " + me.size());

it returns 0.

On Sat, Mar 6, 2010 at 9:16 AM, Riyad Kalla  wrote:

> I thought the feedback messages were stored in the request by default? At
> least I remember a thread from a week and a half ago about a person doing a
> redirect and loosing his messages so he had to manually switch to saving
> them in the Session...
>
> On Fri, Mar 5, 2010 at 9:12 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Maybe you are not really replacing the feedback using ajax. Look at
> > wicket-debug popup.  Do you hae
> > feedbackPanel.setOutputMarkupId(true);?
> >
> > **
> > Martin
> >
> > 2010/3/5 Anna Simbirtsev :
> > > It does not work for some reason.
> > >
> > > Session.get().cleanupFeedbackMessages();
> > > target.addComponent(feedback);
> > >
> > > The message is still visible.
> > >
> > > On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi <
> > > martin.maku...@koodaripalvelut.com> wrote:
> > >
> > >> session.cleanupfeedbackmessages.
> > >>
> > >> 2010/3/5 Anna Simbirtsev :
> > >> > Hi,
> > >> >
> > >> > How can I clear FeedbackPanel messages?
> > >> > I want to remove them from the page using target.addComponent(f);
> > where f
> > >> is
> > >> > FeedbackPanel.
> > >> > I just don't know how to set messages to null.
> > >> >
> > >> > Thanks,
> > >> > Anna
> > >> >
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Anna Simbirtsev
> > > (416) 729-7331
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Anna Simbirtsev
(416) 729-7331


Re: Clear feedback panel

2010-03-08 Thread Anna Simbirtsev
Yes, I have setOutputMarkupId(true). I am using ajax to display feedback
messages. Its just clearing the message that does not work for some reason.
I tried the following:

FeedbackMessages me = Session.get().getFeedbackMessages();

 Iterator entryIter = me.iterator();
 while (entryIter.hasNext()) {
   FeedbackMessage entry =
(FeedbackMessage)entryIter.next();
   System.out.println("Message: " +
entry.toString());
   entry.markRendered();
 }
target.addComponent(feedback);

On Fri, Mar 5, 2010 at 11:12 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Maybe you are not really replacing the feedback using ajax. Look at
> wicket-debug popup.  Do you hae
> feedbackPanel.setOutputMarkupId(true);?
>
> **
> Martin
>
> 2010/3/5 Anna Simbirtsev :
> > It does not work for some reason.
> >
> > Session.get().cleanupFeedbackMessages();
> > target.addComponent(feedback);
> >
> > The message is still visible.
> >
> > On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> session.cleanupfeedbackmessages.
> >>
> >> 2010/3/5 Anna Simbirtsev :
> >> > Hi,
> >> >
> >> > How can I clear FeedbackPanel messages?
> >> > I want to remove them from the page using target.addComponent(f);
> where f
> >> is
> >> > FeedbackPanel.
> >> > I just don't know how to set messages to null.
> >> >
> >> > Thanks,
> >> > Anna
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Clear feedback panel

2010-03-05 Thread Anna Simbirtsev
It does not work for some reason.

Session.get().cleanupFeedbackMessages();
target.addComponent(feedback);

The message is still visible.

On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> session.cleanupfeedbackmessages.
>
> 2010/3/5 Anna Simbirtsev :
> > Hi,
> >
> > How can I clear FeedbackPanel messages?
> > I want to remove them from the page using target.addComponent(f); where f
> is
> > FeedbackPanel.
> > I just don't know how to set messages to null.
> >
> > Thanks,
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Clear feedback panel

2010-03-05 Thread Anna Simbirtsev
Hi,

How can I clear FeedbackPanel messages?
I want to remove them from the page using target.addComponent(f); where f is
FeedbackPanel.
I just don't know how to set messages to null.

Thanks,
Anna


Re: Making label visible using Ajax, does not update model

2010-03-01 Thread Anna Simbirtsev
Thanks.

On Mon, Mar 1, 2010 at 3:08 PM, Riyad Kalla  wrote:

> Anna,
> Try this:
>
> ==
> f.add(new Label("label1", new PopertyModel(data, "label1")));
> f.add(new Label("label2", new PopertyModel(data, "label2")));
> ==
>
> That way when the model is queried for the value, the propertymodel
> will dynamically query "data"'s appropriate property name (in this
> case label1 and label2) for the values.
>
> -R
>
> On Mon, Mar 1, 2010 at 1:06 PM, Anna Simbirtsev 
> wrote:
> >
> > But how can I use a label with a real model?
> >
> > On Mon, Mar 1, 2010 at 2:59 PM, James Carman
> > wrote:
> >
> > > You're not using a real model.  You're constructing the labels with an
> > > empty string (the data.getLabel1() is evaluated when you construct the
> > > Label object).
> > >
> > > On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev  >
> > > wrote:
> > > > Hi,
> > > >
> > > > I have labels defined in the following way:
> > > >
> > > > MarkupContainer f = new WebMarkupContainer("viewPanel");
> > > >
> > > > f.setOutputMarkupPlaceholderTag(true);
> > > > form.add(f);
> > > > f.setVisible(false);
> > > >
> > > > f.add(new Label("label1", data.getLabel1()));
> > > > f.add(new Label("label2", data.getLabel2()));
> > > >
> > > > AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {
> > > >
> > > >private static final long serialVersionUID = 1L;
> > > >
> > > >protected void onSubmit(AjaxRequestTarget target, Form
> > > form)
> > > > {
> > > >
> > > >data = Manager.getData(data);
> > > >
> > > >f.setVisible(true);
> > > >target.addComponent(f);
> > > >}
> > > >  };
> > > >
> > > > 
> > > >    
> > > >
> > > > 
> > > >
> > > > Originally data.getLabel1() return empty string.
> Manager.getData(data)
> > > sets
> > > > the values for the labels to some values.
> > > > But when the panel becomes visible, the values are still empty. Why
> are
> > > > models not updated to display new values?
> > > >
> > > > Thanks,
> > > > Anna
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Anna Simbirtsev
> > (416) 729-7331
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Making label visible using Ajax, does not update model

2010-03-01 Thread Anna Simbirtsev
But how can I use a label with a real model?

On Mon, Mar 1, 2010 at 2:59 PM, James Carman
wrote:

> You're not using a real model.  You're constructing the labels with an
> empty string (the data.getLabel1() is evaluated when you construct the
> Label object).
>
> On Mon, Mar 1, 2010 at 2:57 PM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > I have labels defined in the following way:
> >
> > MarkupContainer f = new WebMarkupContainer("viewPanel");
> >
> > f.setOutputMarkupPlaceholderTag(true);
> > form.add(f);
> > f.setVisible(false);
> >
> > f.add(new Label("label1", data.getLabel1()));
> > f.add(new Label("label2", data.getLabel2()));
> >
> > AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {
> >
> >private static final long serialVersionUID = 1L;
> >
> >protected void onSubmit(AjaxRequestTarget target, Form
> form)
> > {
> >
> >data = Manager.getData(data);
> >
> >f.setVisible(true);
> >target.addComponent(f);
> >}
> >  };
> >
> > 
> >
> >
> > 
> >
> > Originally data.getLabel1() return empty string. Manager.getData(data)
> sets
> > the values for the labels to some values.
> > But when the panel becomes visible, the values are still empty. Why are
> > models not updated to display new values?
> >
> > Thanks,
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Making label visible using Ajax, does not update model

2010-03-01 Thread Anna Simbirtsev
Hi,

I have labels defined in the following way:

MarkupContainer f = new WebMarkupContainer("viewPanel");

f.setOutputMarkupPlaceholderTag(true);
form.add(f);
f.setVisible(false);

f.add(new Label("label1", data.getLabel1()));
f.add(new Label("label2", data.getLabel2()));

AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {

private static final long serialVersionUID = 1L;

protected void onSubmit(AjaxRequestTarget target, Form form)
{

data = Manager.getData(data);

f.setVisible(true);
target.addComponent(f);
}
 };






Originally data.getLabel1() return empty string. Manager.getData(data) sets
the values for the labels to some values.
But when the panel becomes visible, the values are still empty. Why are
models not updated to display new values?

Thanks,
Anna


Re: wicket:enclosure does not get re-rendered

2010-02-25 Thread Anna Simbirtsev
Thanks, its working now.

On Thu, Feb 25, 2010 at 12:02 PM, Igor Vaynberg wrote:

> enclosures are a shortcut/convenience and do nto work for all
> scenarios. whenever the enclosure does not work you can use
> EnclosureContainer or simply a WebMarkupContainer.
>
> to repaint something via ajax that is initially invisible you need to
> call setoutputmarkupplacehodlertag(true) on it.
>
> -igor
>
> On Thu, Feb 25, 2010 at 8:43 AM, Anna Simbirtsev 
> wrote:
> > Hi,
> >
> > I have fragment inside wicket:enclosure. When ajax submit takes place, it
> > tries to re-render fragment, but does not succeed, since wicket:enclosure
> is
> > still invisible, even though isVisible method returns true.
> >
> >
> >
> > 
> >Password
> >
> > 
> >  > class="button">SUBMIT
> >
> > 
> >   fragments contents come here
> >   
> > 
> >
> >   
> > 
> >
> >
> >
> >
> > boolean authenticated=false;
> > final Model m = new Model();
> > form.add(new RequiredTextField("password", m));
> >
> > AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {
> >
> >private static final long serialVersionUID = 1L;
> >
> >protected void onSubmit(AjaxRequestTarget target, Form
> form)
> > {
> >
> >authenticated = true;
> >
> >target.addComponent(f);
> >}
> > };
> > form.add(submitbutton);
> >
> > f = new Fragment("fragment", "fragmentid", form) {
> >
> >private static final long serialVersionUID =
> > 2612235776527846442L;
> >
> >public boolean isVisible() {
> >  if (authenticated)
> >   return true;
> >
> >  return false;
> >}
> > };
> >  f.setOutputMarkupId(true);
> >  form.add(f);
> >
> >
> > Thanks
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


wicket:enclosure does not get re-rendered

2010-02-25 Thread Anna Simbirtsev
Hi,

I have fragment inside wicket:enclosure. When ajax submit takes place, it
tries to re-render fragment, but does not succeed, since wicket:enclosure is
still invisible, even though isVisible method returns true.




Password


SUBMIT


   fragments contents come here
   


   





boolean authenticated=false;
final Model m = new Model();
form.add(new RequiredTextField("password", m));

AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {

private static final long serialVersionUID = 1L;

protected void onSubmit(AjaxRequestTarget target, Form form)
{

authenticated = true;

target.addComponent(f);
}
};
form.add(submitbutton);

f = new Fragment("fragment", "fragmentid", form) {

private static final long serialVersionUID =
2612235776527846442L;

public boolean isVisible() {
  if (authenticated)
   return true;

  return false;
}
};
 f.setOutputMarkupId(true);
 form.add(f);


Thanks
Anna


Modal window closes, parent window needs to be refreshed

2010-02-17 Thread Anna Simbirtsev
Hi,

When a child modal window closes, I need to refresh the values in the parent
window.
I think I should use modal.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback()
function to search for the new values to display.
But I am not sure how to rerender the page so the values shown will be
changed to new ones.

Thanks,
Anna


  1   2   >