about Kartik-v's BootstrapFileInput

2015-04-12 Thread Hasan Çelik
​Normally I was using ​Jasny's FileUpload.. As I understand, you've changed
fileupload library...

While I was using Jasny's FileUpload, my saving process was like that,

user1.setPhoto(fileUploadField.getFileUpload().getBytes());

But in the Kartik-v's BootstrapFileInput, I didn't find a way to
insert data to the database..

How can I insert data to the database???


Re: wicket-bootstrap current version error

2015-04-11 Thread Hasan Çelik
Hi Martin,

I can import wicket-bootstrap 0.10.0 and 0.9.8 not the others...for example
I can not import 0.9.9-snapshot..


Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

2015-04-11 17:47 GMT+03:00 Martin Grigorov :

> Hi,
>
> You have to build the whole project, not only the samples.
> On Apr 11, 2015 5:02 PM, "Hasan Çelik"  wrote:
>
> > I downloaded current version of the wicket-bootstrap.. but when I try to
> > run, I am getting this error?
> >
> >
> > [INFO] Scanning for projects...
> > [INFO]
> >
> > [INFO]
> > 
> > [INFO] Building bootstrap-samples 0.9.9-SNAPSHOT
> > [INFO]
> > 
> > [INFO]
> > [INFO] >>> jetty-maven-plugin:8.1.15.v20140411:run (default-cli) @
> > wicket-bootstrap-samples >>>
> > [WARNING] The POM for
> > de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT is
> missing,
> > no dependency information available
> > [WARNING] The POM for
> > de.agilecoders.wicket:wicket-bootstrap-extensions:jar:0.9.9-SNAPSHOT is
> > missing, no dependency information available
> > [WARNING] The POM for
> > de.agilecoders.wicket:wicket-bootstrap-less:jar:0.9.9-SNAPSHOT is
> missing,
> > no dependency information available
> > [WARNING] The POM for
> > de.agilecoders.wicket:wicket-bootstrap-themes:jar:0.9.9-SNAPSHOT is
> > missing, no dependency information available
> > [INFO]
> > 
> > [INFO] BUILD FAILURE
> > [INFO]
> > 
> > [INFO] Total time: 2.093s
> > [INFO] Finished at: Sat Apr 11 16:53:56 EEST 2015
> > [INFO] Final Memory: 13M/155M
> > [INFO]
> > 
> > [ERROR] Failed to execute goal on project wicket-bootstrap-samples: Could
> > not resolve dependencies for project
> > de.agilecoders.wicket:wicket-bootstrap-samples:war:0.9.9-SNAPSHOT: The
> > following artifacts could not be resolved:
> > de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT,
> > de.agilecoders.wicket:wicket-bootstrap-extensions:jar:0.9.9-SNAPSHOT,
> > de.agilecoders.wicket:wicket-bootstrap-less:jar:0.9.9-SNAPSHOT,
> > de.agilecoders.wicket:wicket-bootstrap-themes:jar:0.9.9-SNAPSHOT: Failure
> > to find de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT in
> > https://oss.sonatype.org/content/repositories/snapshots was cached in
> the
> > local repository, resolution will not be reattempted until the update
> > interval of sonatype-nexus-snapshots has elapsed or updates are forced ->
> > [Help 1]
> > [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/DependencyResolutionException
> >
> > Process finished with exit code 1
> >
>


wicket-bootstrap current version error

2015-04-11 Thread Hasan Çelik
I downloaded current version of the wicket-bootstrap.. but when I try to
run, I am getting this error?


[INFO] Scanning for projects...
[INFO]

[INFO]

[INFO] Building bootstrap-samples 0.9.9-SNAPSHOT
[INFO]

[INFO]
[INFO] >>> jetty-maven-plugin:8.1.15.v20140411:run (default-cli) @
wicket-bootstrap-samples >>>
[WARNING] The POM for
de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT is missing,
no dependency information available
[WARNING] The POM for
de.agilecoders.wicket:wicket-bootstrap-extensions:jar:0.9.9-SNAPSHOT is
missing, no dependency information available
[WARNING] The POM for
de.agilecoders.wicket:wicket-bootstrap-less:jar:0.9.9-SNAPSHOT is missing,
no dependency information available
[WARNING] The POM for
de.agilecoders.wicket:wicket-bootstrap-themes:jar:0.9.9-SNAPSHOT is
missing, no dependency information available
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 2.093s
[INFO] Finished at: Sat Apr 11 16:53:56 EEST 2015
[INFO] Final Memory: 13M/155M
[INFO]

[ERROR] Failed to execute goal on project wicket-bootstrap-samples: Could
not resolve dependencies for project
de.agilecoders.wicket:wicket-bootstrap-samples:war:0.9.9-SNAPSHOT: The
following artifacts could not be resolved:
de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT,
de.agilecoders.wicket:wicket-bootstrap-extensions:jar:0.9.9-SNAPSHOT,
de.agilecoders.wicket:wicket-bootstrap-less:jar:0.9.9-SNAPSHOT,
de.agilecoders.wicket:wicket-bootstrap-themes:jar:0.9.9-SNAPSHOT: Failure
to find de.agilecoders.wicket:wicket-bootstrap-core:jar:0.9.9-SNAPSHOT in
https://oss.sonatype.org/content/repositories/snapshots was cached in the
local repository, resolution will not be reattempted until the update
interval of sonatype-nexus-snapshots has elapsed or updates are forced ->
[Help 1]
[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/DependencyResolutionException

Process finished with exit code 1


Internationalization with Wicket

2015-04-09 Thread Hasan Çelik
Hi,

Before I created  properties class for every class, for example,

HomePage.html
HomePage.java
HomePage.properties
HomePage_tr.properties
SecondPage.html
SecondPage.java
SecondPage.properties
SecondPage_tr.properties

In this way, It caused visual pollution and takes a few times while
loading... after that I decided to create one properties file instead of
above..And I located it into the /resource directory...

When I run the program, I am getting an error... As I understand program
doesn't find the properties file in the /resource directory...I think I
should refer it in somewhere??

My question is; Is there a way to create one properties file like that for
Internationalization ?


Re: Wicketstuff "filename too long" error

2015-03-23 Thread Hasan Çelik
I think, you're right...When I tried to clone D:/test/, it worked... Thanks


Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

2015-03-23 14:54 GMT+02:00 Richter, Marvin <
marvin.rich...@freenetdigital.com>:

> It doesn’t necessarily mean that the filename itself is too long but the
> entire path.
>
> Maybe try to clone the repo in a directory which is higher in the
> hierarchy (like C:\dev for example).
>
> Best,
> Marvin
>
> > Am 22.03.2015 um 16:59 schrieb Hasan Çelik :
> >
> > I could find this
> >
> > https://support.microsoft.com/en-us/kb/177665
> >
> > but there is no setting for windows filename limitation :(
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > 2015-03-22 17:19 GMT+02:00 Martin Grigorov :
> >
> >> Hi,
> >>
> >> You hit some weird Windows limit.
> >> What version is this Windows ? I don't use Windows since a while and I
> am
> >> not sure what 6.1 maps to.
> >> Search in the web about other similar problems. I guess there is a
> setting
> >> to allow it longer file names.
> >>
> >> Martin Grigorov
> >> Freelancer, available for hire!
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Sun, Mar 22, 2015 at 4:54 PM, Hasan Çelik 
> wrote:
> >>
> >>> Hi,
> >>>
> >>> When I clone the wicketstuff repository, I am getting "filename too
> long"
> >>> error. Is that a problem???
> >>>
> >>> https://gist.github.com/cortix/49d380f418c316d8fb58
> >>>
> >>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicketstuff "filename too long" error

2015-03-22 Thread Hasan Çelik
I could find this

 https://support.microsoft.com/en-us/kb/177665

but there is no setting for windows filename limitation :(


Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

2015-03-22 17:19 GMT+02:00 Martin Grigorov :

> Hi,
>
> You hit some weird Windows limit.
> What version is this Windows ? I don't use Windows since a while and I am
> not sure what 6.1 maps to.
> Search in the web about other similar problems. I guess there is a setting
> to allow it longer file names.
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sun, Mar 22, 2015 at 4:54 PM, Hasan Çelik  wrote:
>
> > Hi,
> >
> > When I clone the wicketstuff repository, I am getting "filename too long"
> > error. Is that a problem???
> >
> > https://gist.github.com/cortix/49d380f418c316d8fb58
> >
>


Wicketstuff "filename too long" error

2015-03-22 Thread Hasan Çelik
Hi,

When I clone the wicketstuff repository, I am getting "filename too long"
error. Is that a problem???

https://gist.github.com/cortix/49d380f418c316d8fb58


Re: About @Controller @RequestMapping annotations

2015-03-20 Thread Hasan Çelik
Thank you Martin...

Best Regards


Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

2015-03-20 18:55 GMT+02:00 Martin Grigorov :

> Hi,
>
> Check
>
> https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/wicketstuff-restannotations-parent
> It uses JAX-RS annotations (more portable than Spring custom ones).
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Mar 20, 2015 at 6:04 PM, Hasan Çelik  wrote:
>
> > Hi,
> >
> > Can I use Spring @RequestMapping and @Controller annotations for wicket
> > projects. These are only for Spring MVC???. I wonder,Is there any
> > controller,RequestMapping annotations for wicketI am new to all this.
> >
> > Best Regards
> >
>


About @Controller @RequestMapping annotations

2015-03-20 Thread Hasan Çelik
Hi,

Can I use Spring @RequestMapping and @Controller annotations for wicket
projects. These are only for Spring MVC???. I wonder,Is there any
controller,RequestMapping annotations for wicketI am new to all this.

Best Regards


Re: About BasePage's BrandName setting

2015-01-12 Thread Hasan Çelik
Thank you so so much :) Yes now it works



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Mon, Jan 12, 2015 at 6:00 PM, Martin Grigorov 
wrote:

> https://github.com/cortix/project/pull/1
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jan 12, 2015 at 3:52 PM, Hasan Çelik  wrote:
>
> > Sorry about that, it's my fault, I didn't know that it was about
> > wicket-bootstrap... By the way
> >
> > I googled and I have found that
> >
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/385
> >
> > But I didnt override newBrandNameLink in the BasePage...Where should I
> > override it ?
> >
> > Thank you so much for these information and your patience
> >
> > Best Regards
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On Mon, Jan 12, 2015 at 3:15 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > Please read again what I've explained in my previous mail.
> > > Your 'brandName' component is broken.
> > > 1) It is a . Must be 
> > > 2) It is not needed at all. You see Bootstrap's brandName link in the
> > > produced UI. Your custom brand name produces  without
> > any
> > > text so you don't see it in the UI at all.
> > > 3) read Bootstrap docs for expected HTML template for Navbar and check
> it
> > > against what your application produces.
> > > 4) You need to override
> > >
> > >
> >
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/Navbar.java#L229
> > > instead of using your own component for brandName. Your first messages
> > > didn't explain that you use Wicket-Bootstrap so I wasn't able to
> suggest
> > > you this then
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Jan 12, 2015 at 2:08 PM, Hasan Çelik 
> > wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > The reason why I'm using two BasePage, When the members visit the
> > > website ,
> > > > I want to show only BasePage1 menu
> > > >
> > > > When the visitor login in , I want to show the Management Page menu
> > > > (BasePage2)... but problem is, when they login in, if they click the
> > > > brandname, wicket forward them to HomePage...I don't want to do this
> :(
> > > so
> > > > I try to override brandname link in every BasePage... I used your
> > saying
> > > > but it doesn't work
> > > >
> > > > class BasePage {
> > > >
> > > >   @Override protected void onInitialize() {super.onInitialize();
> > > > add(brandLink("brandLink"))}
> > > >
> > > >   protected abstract AbstractLink brandLink(String id);
> > > > }
> > > >
> > > > class BasePage1 extend BasePage {
> > > >   ...
> > > >   protected BookmarkablePageLink brandLink(String id) {return new
> > > > BookmarkablePageLink(id, IndexPage.class)}
> > > > }
> > > >
> > > > class BasePage2 extend BasePage {
> > > >   ...
> > > >   protected BookmarkablePageLink brandLink(String id) {return new
> > > > BookmarkablePageLink(id, ManagementPage.class)}
> > > > }
> > > >
> > > > Regards
> > > >
> > > >
> > > >
> > > > Web Sitesi : www.ab-hibe.com
> > > > E-mail: hasance...@berkadem.com
> > > > E-mail: i...@ab-hibe.com
> > > > Gsm1: 0 544 640 96 25
> > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > > >
> > > > On Sun, Jan 11, 2015 at 11:18 PM, Martin Grigorov <
> > mgrigo...@apache.org>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Yes, it works. It produces HTML like (check the produced HTML in
> your
> > > > app):
> > > > > 
> > >

Re: About BasePage's BrandName setting

2015-01-12 Thread Hasan Çelik
Sorry about that, it's my fault, I didn't know that it was about
wicket-bootstrap... By the way

I googled and I have found that

https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/385

But I didnt override newBrandNameLink in the BasePage...Where should I
override it ?

Thank you so much for these information and your patience

Best Regards



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Mon, Jan 12, 2015 at 3:15 PM, Martin Grigorov 
wrote:

> Hi,
>
> Please read again what I've explained in my previous mail.
> Your 'brandName' component is broken.
> 1) It is a . Must be 
> 2) It is not needed at all. You see Bootstrap's brandName link in the
> produced UI. Your custom brand name produces  without any
> text so you don't see it in the UI at all.
> 3) read Bootstrap docs for expected HTML template for Navbar and check it
> against what your application produces.
> 4) You need to override
>
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/Navbar.java#L229
> instead of using your own component for brandName. Your first messages
> didn't explain that you use Wicket-Bootstrap so I wasn't able to suggest
> you this then
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jan 12, 2015 at 2:08 PM, Hasan Çelik  wrote:
>
> > Hi Martin,
> >
> > The reason why I'm using two BasePage, When the members visit the
> website ,
> > I want to show only BasePage1 menu
> >
> > When the visitor login in , I want to show the Management Page menu
> > (BasePage2)... but problem is, when they login in, if they click the
> > brandname, wicket forward them to HomePage...I don't want to do this :(
> so
> > I try to override brandname link in every BasePage... I used your saying
> > but it doesn't work
> >
> > class BasePage {
> >
> >   @Override protected void onInitialize() {super.onInitialize();
> > add(brandLink("brandLink"))}
> >
> >   protected abstract AbstractLink brandLink(String id);
> > }
> >
> > class BasePage1 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, IndexPage.class)}
> > }
> >
> > class BasePage2 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, ManagementPage.class)}
> > }
> >
> > Regards
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On Sun, Jan 11, 2015 at 11:18 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > Yes, it works. It produces HTML like (check the produced HTML in your
> > app):
> > > 
> > >
> > > Not sure why but you use your custom HTML element for the brand name,
> and
> > > it is a :
> > >
> > >
> >
> https://github.com/cortix/project/blob/master/src/main/java/web/BasePage.html#L13
> > >
> > > I see you use Wicket-Bootstrap. It's Navbar component provides a
> factory
> > > method for the brand name link:
> > >
> > >
> >
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/Navbar.java#L229
> > > Just use it. No need to add your own one.
> > > Check http://getbootstrap.com/components/#navbar-default for more
> about
> > > Bootstrap's expacted HTML.
> > >
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Sun, Jan 11, 2015 at 9:55 PM, Hasan Çelik 
> > wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > Thanks for reply, In the future I may use these pages...brandname
> link
> > > > doesn't work...Afer I click Management.page, I check the brandlink
> but
> > > > again it forward the Homepage... What I want to do,
> > > >
> > > > when I click ManagementPage, brandlink ---> /management
> > > > when I click HomePage, brandlink --->

Re: About BasePage's BrandName setting

2015-01-12 Thread Hasan Çelik
Hi Martin,

The reason why I'm using two BasePage, When the members visit the website ,
I want to show only BasePage1 menu

When the visitor login in , I want to show the Management Page menu
(BasePage2)... but problem is, when they login in, if they click the
brandname, wicket forward them to HomePage...I don't want to do this :( so
I try to override brandname link in every BasePage... I used your saying
but it doesn't work

class BasePage {

  @Override protected void onInitialize() {super.onInitialize();
add(brandLink("brandLink"))}

  protected abstract AbstractLink brandLink(String id);
}

class BasePage1 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, IndexPage.class)}
}

class BasePage2 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, ManagementPage.class)}
}

Regards



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Sun, Jan 11, 2015 at 11:18 PM, Martin Grigorov 
wrote:

> Hi,
>
> Yes, it works. It produces HTML like (check the produced HTML in your app):
> 
>
> Not sure why but you use your custom HTML element for the brand name, and
> it is a :
>
> https://github.com/cortix/project/blob/master/src/main/java/web/BasePage.html#L13
>
> I see you use Wicket-Bootstrap. It's Navbar component provides a factory
> method for the brand name link:
>
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/navbar/Navbar.java#L229
> Just use it. No need to add your own one.
> Check http://getbootstrap.com/components/#navbar-default for more about
> Bootstrap's expacted HTML.
>
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sun, Jan 11, 2015 at 9:55 PM, Hasan Çelik  wrote:
>
> > Hi Martin,
> >
> > Thanks for reply, In the future I may use these pages...brandname link
> > doesn't work...Afer I click Management.page, I check the brandlink but
> > again it forward the Homepage... What I want to do,
> >
> > when I click ManagementPage, brandlink ---> /management
> > when I click HomePage, brandlink ---> /index
> >
> > I hope, I made myself clear
> >
> > Regards
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On Sun, Jan 11, 2015 at 10:45 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > There is no need to provide BasePage1.html and BasePage2.html at all.
> > > If there is no specific html for a page then Wicket will use the markup
> > of
> > > the parent page (i.e. BasePage.html)
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Jan 9, 2015 at 4:09 PM, Hasan Çelik 
> > wrote:
> > >
> > > > *Hi,*
> > > >
> > > > * I replied my old question but it didn't exist in the forum and I
> > > choosed
> > > > this way, sorry about that, I wanted to remind dioalog...Anyway I
> asked
> > > > this question before,*
> > > > --
> > > > Hi,
> > > >
> > > > Normally I have one Base Page, but I want to create more than one..
> > > >
> > > > For example
> > > >
> > > > LoginPage extend BasePage1
> > > > ManagmentPage extend BasePage2
> > > >
> > > > A user login in the website, redirect to ManagementPage... but  when
> > user
> > > > click BrandName,  redirect to LoginPage ...Can I change the brandname
> > for
> > > > other BasePages
> > > >
> > > > For example
> > > >
> > > > In the ManagmentPage brandName link may be/managementPage ,
> > > > In the LoginPage brandName link may be /index
> > > >
> > > > Is there a way to change it ?
> > > >
> > > >
> > >
> >
> -
> > > > *Martin Grigorov  said*
> > > >
> > > > Hi,
> > > >
> &

Re: About BasePage's BrandName setting

2015-01-11 Thread Hasan Çelik
Hi Martin,

Thanks for reply, In the future I may use these pages...brandname link
doesn't work...Afer I click Management.page, I check the brandlink but
again it forward the Homepage... What I want to do,

when I click ManagementPage, brandlink ---> /management
when I click HomePage, brandlink ---> /index

I hope, I made myself clear

Regards



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Sun, Jan 11, 2015 at 10:45 PM, Martin Grigorov 
wrote:

> Hi,
>
> There is no need to provide BasePage1.html and BasePage2.html at all.
> If there is no specific html for a page then Wicket will use the markup of
> the parent page (i.e. BasePage.html)
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Jan 9, 2015 at 4:09 PM, Hasan Çelik  wrote:
>
> > *Hi,*
> >
> > * I replied my old question but it didn't exist in the forum and I
> choosed
> > this way, sorry about that, I wanted to remind dioalog...Anyway I asked
> > this question before,*
> > --
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
> >
> -
> > *Martin Grigorov  said*
> >
> > Hi,
> >
> > class BasePage {
> >
> >   @Override protected void onInitialize() {super.onInitialize();
> > add(brandLink("brandLink"))}
> >
> >   protected abstract AbstractLink brandLink(String id);
> > }
> >
> > class BasePage1 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, IndexPage.class)}
> > }
> >
> > class BasePage2 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, ManagementPage.class)}
> > }
> >
> >
> --
> > According to this reply,
> >
> > I want to ask another question,
> >
> > Hi Martin,
> >
> > If I use these construction, How can I change my BasePage markup and java
> > class
> >
> > Normally my BasePage.html
> >
> > https://gist.github.com/cortix/68b584310e9be62de4c6
> >
> > ​and BasePage.java
> >
> > https://gist.github.com/cortix/7a5453cddac75b90f29a
> >
> > According your code, I tried to create new BasePage, BasePage1, BasePage2
> >
> > but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
> > and also java pages...
> >
> > If BasePage.java would be my main page, How can I edit child and extend
> tag
> > for BasePage1, BasePage2
> >
> > because
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > and
> >
> > BasePage1 extend BasePage
> > BasePage2 extend BasePage
> >
> >
> >
> ---
> > Martin Grigorov said
> >
> > Hi,
> >
> > Please create a quickstart application at GitHub and give us the url.
> >
> >
> >
> 
> >
> > Apologize for delay, I tried to learn to create quick start project on
> the
> > github...
> >
> > https://github.com/cortix/project
> >
>


About BasePage's BrandName setting

2015-01-09 Thread Hasan Çelik
*Hi,*

* I replied my old question but it didn't exist in the forum and I choosed
this way, sorry about that, I wanted to remind dioalog...Anyway I asked
this question before,*
--
Hi,

Normally I have one Base Page, but I want to create more than one..

For example

LoginPage extend BasePage1
ManagmentPage extend BasePage2

A user login in the website, redirect to ManagementPage... but  when user
click BrandName,  redirect to LoginPage ...Can I change the brandname for
other BasePages

For example

In the ManagmentPage brandName link may be/managementPage ,
In the LoginPage brandName link may be /index

Is there a way to change it ?
-
*Martin Grigorov  said*

Hi,

class BasePage {

  @Override protected void onInitialize() {super.onInitialize();
add(brandLink("brandLink"))}

  protected abstract AbstractLink brandLink(String id);
}

class BasePage1 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, IndexPage.class)}
}

class BasePage2 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, ManagementPage.class)}
}
--
According to this reply,

I want to ask another question,

Hi Martin,

If I use these construction, How can I change my BasePage markup and java
class

Normally my BasePage.html

https://gist.github.com/cortix/68b584310e9be62de4c6

​and BasePage.java

https://gist.github.com/cortix/7a5453cddac75b90f29a

According your code, I tried to create new BasePage, BasePage1, BasePage2

but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
and also java pages...

If BasePage.java would be my main page, How can I edit child and extend tag
for BasePage1, BasePage2

because

LoginPage extend BasePage1
ManagmentPage extend BasePage2

and

BasePage1 extend BasePage
BasePage2 extend BasePage

---
Martin Grigorov said

Hi,

Please create a quickstart application at GitHub and give us the url.



Apologize for delay, I tried to learn to create quick start project on the
github...

https://github.com/cortix/project


Fwd: About BasePage's BrandName setting

2015-01-09 Thread Hasan Çelik
Hi Martin,

Apologize for delay, I tried to learn to create quick start project on the
github...

https://github.com/cortix/project




Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Sat, Jan 3, 2015 at 6:49 PM, Martin Grigorov 
wrote:

> Hi,
>
> Please create a quickstart application at GitHub and give us the url.
>
> On Sat, Jan 3, 2015 at 6:37 PM, Hasan Çelik  wrote:
>
> > *Hi,*
> >
> > *I asked this question before,*
> >
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
> > *Martin Grigorov  said*
> >
> > Hi,
> >
> > class BasePage {
> >
> >   @Override protected void onInitialize() {super.onInitialize();
> > add(brandLink("brandLink"))}
> >
> >   protected abstract AbstractLink brandLink(String id);
> > }
> >
> > class BasePage1 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, IndexPage.class)}
> > }
> >
> > class BasePage2 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, ManagementPage.class)}
> > }
> >
> > *According to this reply,*
> >
> > *I want to ask another question, *
> >
> > *Hi Martin,*
> >
> > *If I use these construction, How can I change my BasePage markup and
> java
> > class*
> >
> > *Normally my BasePage.html*
> >
> > *https://gist.github.com/cortix/68b584310e9be62de4c6*
> > <https://gist.github.com/cortix/68b584310e9be62de4c6>
> >
> > *​and BasePage.java*
> >
> >
> > *https://gist.github.com/cortix/7a5453cddac75b90f29a
> > <https://gist.github.com/cortix/7a5453cddac75b90f29a>*
> >
> > *According your code, I tried to create new BasePage, BasePage1,
> BasePage2*
> >
> > *but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
> > and also java pages...*
> >
> > *If BasePage.java would be my main page, How can I edit child and extend
> > tag for BasePage1, BasePage2*
> >
> > *because *
> >
> >
> > *LoginPage extend BasePage1 ManagmentPage extend BasePage2*
> > *and*
> >
> > *BasePage1 extend BasePage*
> > *BasePage2 extend BasePage*
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
>


Re: About BasePage's BrandName setting

2015-01-09 Thread Hasan Çelik
Hi Martin,

Apologize for delay, I tried to learn to create quick start project on the
github...

https://github.com/cortix/project




Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Sat, Jan 3, 2015 at 6:49 PM, Martin Grigorov 
wrote:

> Hi,
>
> Please create a quickstart application at GitHub and give us the url.
>
> On Sat, Jan 3, 2015 at 6:37 PM, Hasan Çelik  wrote:
>
> > *Hi,*
> >
> > *I asked this question before,*
> >
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
> > *Martin Grigorov  said*
> >
> > Hi,
> >
> > class BasePage {
> >
> >   @Override protected void onInitialize() {super.onInitialize();
> > add(brandLink("brandLink"))}
> >
> >   protected abstract AbstractLink brandLink(String id);
> > }
> >
> > class BasePage1 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, IndexPage.class)}
> > }
> >
> > class BasePage2 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, ManagementPage.class)}
> > }
> >
> > *According to this reply,*
> >
> > *I want to ask another question, *
> >
> > *Hi Martin,*
> >
> > *If I use these construction, How can I change my BasePage markup and
> java
> > class*
> >
> > *Normally my BasePage.html*
> >
> > *https://gist.github.com/cortix/68b584310e9be62de4c6*
> > <https://gist.github.com/cortix/68b584310e9be62de4c6>
> >
> > *​and BasePage.java*
> >
> >
> > *https://gist.github.com/cortix/7a5453cddac75b90f29a
> > <https://gist.github.com/cortix/7a5453cddac75b90f29a>*
> >
> > *According your code, I tried to create new BasePage, BasePage1,
> BasePage2*
> >
> > *but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
> > and also java pages...*
> >
> > *If BasePage.java would be my main page, How can I edit child and extend
> > tag for BasePage1, BasePage2*
> >
> > *because *
> >
> >
> > *LoginPage extend BasePage1 ManagmentPage extend BasePage2*
> > *and*
> >
> > *BasePage1 extend BasePage*
> > *BasePage2 extend BasePage*
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
>


Re: About BasePage's BrandName setting

2015-01-09 Thread Hasan Çelik
Hi Martin,

Apologize for delay, I tried to learn to create quick start project on the
github...

https://github.com/cortix/project





Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On Sat, Jan 3, 2015 at 6:49 PM, Martin Grigorov 
wrote:

> Hi,
>
> Please create a quickstart application at GitHub and give us the url.
>
> On Sat, Jan 3, 2015 at 6:37 PM, Hasan Çelik  wrote:
>
> > *Hi,*
> >
> > *I asked this question before,*
> >
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
> > *Martin Grigorov  said*
> >
> > Hi,
> >
> > class BasePage {
> >
> >   @Override protected void onInitialize() {super.onInitialize();
> > add(brandLink("brandLink"))}
> >
> >   protected abstract AbstractLink brandLink(String id);
> > }
> >
> > class BasePage1 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, IndexPage.class)}
> > }
> >
> > class BasePage2 extend BasePage {
> >   ...
> >   protected BookmarkablePageLink brandLink(String id) {return new
> > BookmarkablePageLink(id, ManagementPage.class)}
> > }
> >
> > *According to this reply,*
> >
> > *I want to ask another question, *
> >
> > *Hi Martin,*
> >
> > *If I use these construction, How can I change my BasePage markup and
> java
> > class*
> >
> > *Normally my BasePage.html*
> >
> > *https://gist.github.com/cortix/68b584310e9be62de4c6*
> > <https://gist.github.com/cortix/68b584310e9be62de4c6>
> >
> > *​and BasePage.java*
> >
> >
> > *https://gist.github.com/cortix/7a5453cddac75b90f29a
> > <https://gist.github.com/cortix/7a5453cddac75b90f29a>*
> >
> > *According your code, I tried to create new BasePage, BasePage1,
> BasePage2*
> >
> > *but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
> > and also java pages...*
> >
> > *If BasePage.java would be my main page, How can I edit child and extend
> > tag for BasePage1, BasePage2*
> >
> > *because *
> >
> >
> > *LoginPage extend BasePage1 ManagmentPage extend BasePage2*
> > *and*
> >
> > *BasePage1 extend BasePage*
> > *BasePage2 extend BasePage*
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
>


About BasePage's BrandName setting

2015-01-03 Thread Hasan Çelik
*Hi,*

*I asked this question before,*

Hi,

Normally I have one Base Page, but I want to create more than one..

For example

LoginPage extend BasePage1
ManagmentPage extend BasePage2

A user login in the website, redirect to ManagementPage... but  when user
click BrandName,  redirect to LoginPage ...Can I change the brandname for
other BasePages

For example

In the ManagmentPage brandName link may be/managementPage ,
In the LoginPage brandName link may be /index

Is there a way to change it ?

*Martin Grigorov  said*

Hi,

class BasePage {

  @Override protected void onInitialize() {super.onInitialize();
add(brandLink("brandLink"))}

  protected abstract AbstractLink brandLink(String id);
}

class BasePage1 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, IndexPage.class)}
}

class BasePage2 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, ManagementPage.class)}
}

*According to this reply,*

*I want to ask another question, *

*Hi Martin,*

*If I use these construction, How can I change my BasePage markup and java
class*

*Normally my BasePage.html*

*https://gist.github.com/cortix/68b584310e9be62de4c6*


*​and BasePage.java*


*https://gist.github.com/cortix/7a5453cddac75b90f29a
*

*According your code, I tried to create new BasePage, BasePage1, BasePage2*

*but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
and also java pages...*

*If BasePage.java would be my main page, How can I edit child and extend
tag for BasePage1, BasePage2*

*because *


*LoginPage extend BasePage1 ManagmentPage extend BasePage2*
*and*

*BasePage1 extend BasePage*
*BasePage2 extend BasePage*



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara


Fwd: About BasePage's BrandName setting

2015-01-03 Thread Hasan Çelik
Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

-- Forwarded message --
From: Hasan Çelik 
Date: 29 December 2014 at 22:47
Subject: Re: About BasePage's BrandName setting
To: users@wicket.apache.org


Hi Martin,

If I use these construction, How can I change my BasePage markup and java
class

Normally my BasePage.html

https://gist.github.com/cortix/68b584310e9be62de4c6

​and BasePage.java

https://gist.github.com/cortix/7a5453cddac75b90f29a

According your code, I tried to create new BasePage, BasePage1, BasePage2

but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
and also java pages...

If BasePage.java would be my main page, How can I edit child and extend tag
for BasePage1, BasePage2

because

LoginPage extend BasePage1
ManagmentPage extend BasePage2

and

BasePage1 extend BasePage
BasePage2 extend BasePage

sorry about that because I try to learn the usage of wicket



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 18 December 2014 at 12:02, Martin Grigorov  wrote:

> Hi,
>
> class BasePage {
>
>   @Override protected void onInitialize() {super.onInitialize();
> add(brandLink("brandLink"))}
>
>   protected abstract AbstractLink brandLink(String id);
> }
>
> class BasePage1 extend BasePage {
>   ...
>   protected BookmarkablePageLink brandLink(String id) {return new
> BookmarkablePageLink(id, IndexPage.class)}
> }
>
> class BasePage2 extend BasePage {
>   ...
>   protected BookmarkablePageLink brandLink(String id) {return new
> BookmarkablePageLink(id, ManagementPage.class)}
> }
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 17, 2014 at 11:46 PM, Hasan Çelik 
> wrote:
> >
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
>


Re: About BasePage's BrandName setting

2015-01-01 Thread Hasan Çelik
Is there any idea?



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 29 December 2014 at 22:47, Hasan Çelik  wrote:

> Hi Martin,
>
> If I use these construction, How can I change my BasePage markup and java
> class
>
> Normally my BasePage.html
>
> https://gist.github.com/cortix/68b584310e9be62de4c6
>
> ​and BasePage.java
>
> https://gist.github.com/cortix/7a5453cddac75b90f29a
>
> According your code, I tried to create new BasePage, BasePage1, BasePage2
>
> but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
> and also java pages...
>
> If BasePage.java would be my main page, How can I edit child and extend
> tag for BasePage1, BasePage2
>
> because
>
> LoginPage extend BasePage1
> ManagmentPage extend BasePage2
>
> and
>
> BasePage1 extend BasePage
> BasePage2 extend BasePage
>
> sorry about that because I try to learn the usage of wicket
>
>
>
> Web Sitesi : www.ab-hibe.com
> E-mail: hasance...@berkadem.com
> E-mail: i...@ab-hibe.com
> Gsm1: 0 544 640 96 25
> Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
>
> On 18 December 2014 at 12:02, Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> class BasePage {
>>
>>   @Override protected void onInitialize() {super.onInitialize();
>> add(brandLink("brandLink"))}
>>
>>   protected abstract AbstractLink brandLink(String id);
>> }
>>
>> class BasePage1 extend BasePage {
>>   ...
>>   protected BookmarkablePageLink brandLink(String id) {return new
>> BookmarkablePageLink(id, IndexPage.class)}
>> }
>>
>> class BasePage2 extend BasePage {
>>   ...
>>   protected BookmarkablePageLink brandLink(String id) {return new
>> BookmarkablePageLink(id, ManagementPage.class)}
>> }
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Dec 17, 2014 at 11:46 PM, Hasan Çelik 
>> wrote:
>> >
>> > Hi,
>> >
>> > Normally I have one Base Page, but I want to create more than one..
>> >
>> > For example
>> >
>> > LoginPage extend BasePage1
>> > ManagmentPage extend BasePage2
>> >
>> > A user login in the website, redirect to ManagementPage... but  when
>> user
>> > click BrandName,  redirect to LoginPage ...Can I change the brandname
>> for
>> > other BasePages
>> >
>> > For example
>> >
>> > In the ManagmentPage brandName link may be/managementPage ,
>> > In the LoginPage brandName link may be /index
>> >
>> > Is there a way to change it ?
>> >
>>
>
>


Re: About BasePage's BrandName setting

2014-12-29 Thread Hasan Çelik
Hi Martin,

If I use these construction, How can I change my BasePage markup and java
class

Normally my BasePage.html

https://gist.github.com/cortix/68b584310e9be62de4c6

​and BasePage.java

https://gist.github.com/cortix/7a5453cddac75b90f29a

According your code, I tried to create new BasePage, BasePage1, BasePage2

but I didn't succeed to create markup for BasePage, BasePage1, BasePage2
and also java pages...

If BasePage.java would be my main page, How can I edit child and extend tag
for BasePage1, BasePage2

because

LoginPage extend BasePage1
ManagmentPage extend BasePage2

and

BasePage1 extend BasePage
BasePage2 extend BasePage

sorry about that because I try to learn the usage of wicket



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 18 December 2014 at 12:02, Martin Grigorov  wrote:

> Hi,
>
> class BasePage {
>
>   @Override protected void onInitialize() {super.onInitialize();
> add(brandLink("brandLink"))}
>
>   protected abstract AbstractLink brandLink(String id);
> }
>
> class BasePage1 extend BasePage {
>   ...
>   protected BookmarkablePageLink brandLink(String id) {return new
> BookmarkablePageLink(id, IndexPage.class)}
> }
>
> class BasePage2 extend BasePage {
>   ...
>   protected BookmarkablePageLink brandLink(String id) {return new
> BookmarkablePageLink(id, ManagementPage.class)}
> }
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 17, 2014 at 11:46 PM, Hasan Çelik 
> wrote:
> >
> > Hi,
> >
> > Normally I have one Base Page, but I want to create more than one..
> >
> > For example
> >
> > LoginPage extend BasePage1
> > ManagmentPage extend BasePage2
> >
> > A user login in the website, redirect to ManagementPage... but  when user
> > click BrandName,  redirect to LoginPage ...Can I change the brandname for
> > other BasePages
> >
> > For example
> >
> > In the ManagmentPage brandName link may be/managementPage ,
> > In the LoginPage brandName link may be /index
> >
> > Is there a way to change it ?
> >
>


About BasePage's BrandName setting

2014-12-17 Thread Hasan Çelik
Hi,

Normally I have one Base Page, but I want to create more than one..

For example

LoginPage extend BasePage1
ManagmentPage extend BasePage2

A user login in the website, redirect to ManagementPage... but  when user
click BrandName,  redirect to LoginPage ...Can I change the brandname for
other BasePages

For example

In the ManagmentPage brandName link may be/managementPage ,
In the LoginPage brandName link may be /index

Is there a way to change it ?


Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
You're awesome :) thanks a lot, I understand my mistake..In my properties
file english refers "gb" but in the codes I wrote "en" ...  Martin can I
add country's flag near the turkish and english button?? only

tr=Turkish
gb=English






Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 17 December 2014 at 16:01, Martin Grigorov  wrote:
>
> What code do you have at BasePage.java, line 209 ?
> It calls #getString() with "en" as resource key. And you have no "en" key
> in YourApplication.properties.
> Read http://wicket.apache.org/guide/guide/i18n.html about
> internationalization.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 17, 2014 at 3:54 PM, Hasan Çelik  wrote:
> >
> > I think, you can not see the images, sorry about that
> >
> >
> > https://unsee.cc/nupibero/
> >
> > https://unsee.cc/donebuga/
> >
> > https://unsee.cc/bizumaso/
> >
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On 17 December 2014 at 15:12, Martin Grigorov 
> > wrote:
> > >
> > > Try by uploading the images to some web service.
> > > It seems the mail server removes them ...
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Dec 17, 2014 at 1:58 PM, Hasan Çelik 
> > wrote:
> > > >
> > > > getCookieUtils() method... ??? Does it make sense now?
> > > >
> > > > [image: Inline images 1]
> > > >
> > > >
> > > >
> > > > Web Sitesi : www.ab-hibe.com
> > > > E-mail: hasance...@berkadem.com
> > > > E-mail: i...@ab-hibe.com
> > > > Gsm1: 0 544 640 96 25
> > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > > >
> > > > On 17 December 2014 at 13:13, Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >>
> > > >> images did not make it...
> > > >>
> > > >> On Wed, Dec 17, 2014 at 11:11 AM, Hasan Çelik  >
> > > >> wrote:
> > > >> >
> > > >> > there is a compile error on the first image..
> > > >> >
> > > >> >
> > > >> >
> > > >> > Web Sitesi : www.ab-hibe.com
> > > >> > E-mail: hasance...@berkadem.com
> > > >> > E-mail: i...@ab-hibe.com
> > > >> > Gsm1: 0 544 640 96 25
> > > >> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > > >> >
> > > >> > On 17 December 2014 at 13:03, Francois Meillet <
> > > >> francois.meil...@gmail.com
> > > >> > >
> > > >> > wrote:
> > > >> > >
> > > >> > > What is the error, any stacktrace ?
> > > >> > >
> > > >> > > François Meillet
> > > >> > > Formation Wicket - Développement Wicket
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > > Le 17 déc. 2014 à 11:55, Hasan Çelik  a
> > > écrit :
> > > >> > >
> > > >> > > > Thanks Martin,
> > > >> > > >
> > > >> > > > I am newbie for wicket... It may be easy error for you but I
> > > didn't
> > > >> > > understand...Why am I getting this error? Which dependencies
> > should
> > > I
> > > >> add
> > > >> > > in pom.xml ?
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > > If I change the codes like that, I am getting error,
> > > >> > > > ​
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > 

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
I think, you can not see the images, sorry about that


https://unsee.cc/nupibero/

https://unsee.cc/donebuga/

https://unsee.cc/bizumaso/




Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 17 December 2014 at 15:12, Martin Grigorov  wrote:
>
> Try by uploading the images to some web service.
> It seems the mail server removes them ...
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 17, 2014 at 1:58 PM, Hasan Çelik  wrote:
> >
> > getCookieUtils() method... ??? Does it make sense now?
> >
> > [image: Inline images 1]
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On 17 December 2014 at 13:13, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >>
> >> images did not make it...
> >>
> >> On Wed, Dec 17, 2014 at 11:11 AM, Hasan Çelik 
> >> wrote:
> >> >
> >> > there is a compile error on the first image..
> >> >
> >> >
> >> >
> >> > Web Sitesi : www.ab-hibe.com
> >> > E-mail: hasance...@berkadem.com
> >> > E-mail: i...@ab-hibe.com
> >> > Gsm1: 0 544 640 96 25
> >> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >> >
> >> > On 17 December 2014 at 13:03, Francois Meillet <
> >> francois.meil...@gmail.com
> >> > >
> >> > wrote:
> >> > >
> >> > > What is the error, any stacktrace ?
> >> > >
> >> > > François Meillet
> >> > > Formation Wicket - Développement Wicket
> >> > >
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > Le 17 déc. 2014 à 11:55, Hasan Çelik  a
> écrit :
> >> > >
> >> > > > Thanks Martin,
> >> > > >
> >> > > > I am newbie for wicket... It may be easy error for you but I
> didn't
> >> > > understand...Why am I getting this error? Which dependencies should
> I
> >> add
> >> > > in pom.xml ?
> >> > > >
> >> > > >
> >> > > >
> >> > > > If I change the codes like that, I am getting error,
> >> > > > ​
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > Web Sitesi : www.ab-hibe.com
> >> > > > E-mail: hasance...@berkadem.com
> >> > > > E-mail: i...@ab-hibe.com
> >> > > > Gsm1: 0 544 640 96 25
> >> > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >> > > >
> >> > > > On 17 December 2014 at 10:13, Martin Grigorov <
> mgrigo...@apache.org
> >> >
> >> > > wrote:
> >> > > > I guess his code just uses Wicket's CookieUtils class.
> >> > > > See
> >> > > >
> >> > >
> >> >
> >>
> https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
> >> > > > for example.
> >> > > >
> >> > > > Martin Grigorov
> >> > > > Wicket Training and Consulting
> >> > > > https://twitter.com/mtgrigorov
> >> > > >
> >> > > > On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik <
> hsnclk1...@gmail.com
> >> >
> >> > > wrote:
> >> > > > >
> >> > > > > Thanks for reply,
> >> > > > >
> >> > > > > Can you give detail about getCookieUtils() and
> >> > > CCA_LANGUAGE_COOKIE_NAME in
> >> > > > > your CcaWebApplication class
> >> > > > >
> >> > > > > Regards,
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > On 17 December 2014 at 09:06, Richter, Marvin <
> >> > > > > marvin.rich...@freene

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
getCookieUtils() method... ??? Does it make sense now?

[image: Inline images 1]



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 17 December 2014 at 13:13, Ernesto Reinaldo Barreiro 
wrote:
>
> images did not make it...
>
> On Wed, Dec 17, 2014 at 11:11 AM, Hasan Çelik 
> wrote:
> >
> > there is a compile error on the first image..
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On 17 December 2014 at 13:03, Francois Meillet <
> francois.meil...@gmail.com
> > >
> > wrote:
> > >
> > > What is the error, any stacktrace ?
> > >
> > > François Meillet
> > > Formation Wicket - Développement Wicket
> > >
> > >
> > >
> > >
> > >
> > > Le 17 déc. 2014 à 11:55, Hasan Çelik  a écrit :
> > >
> > > > Thanks Martin,
> > > >
> > > > I am newbie for wicket... It may be easy error for you but I didn't
> > > understand...Why am I getting this error? Which dependencies should I
> add
> > > in pom.xml ?
> > > >
> > > >
> > > >
> > > > If I change the codes like that, I am getting error,
> > > > ​
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Web Sitesi : www.ab-hibe.com
> > > > E-mail: hasance...@berkadem.com
> > > > E-mail: i...@ab-hibe.com
> > > > Gsm1: 0 544 640 96 25
> > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > > >
> > > > On 17 December 2014 at 10:13, Martin Grigorov 
> > > wrote:
> > > > I guess his code just uses Wicket's CookieUtils class.
> > > > See
> > > >
> > >
> >
> https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
> > > > for example.
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik 
> > > wrote:
> > > > >
> > > > > Thanks for reply,
> > > > >
> > > > > Can you give detail about getCookieUtils() and
> > > CCA_LANGUAGE_COOKIE_NAME in
> > > > > your CcaWebApplication class
> > > > >
> > > > > Regards,
> > > > >
> > > > >
> > > > >
> > > > > On 17 December 2014 at 09:06, Richter, Marvin <
> > > > > marvin.rich...@freenetdigital.com> wrote:
> > > > > >
> > > > > > Hey, I have something like that implemented in the following way:
> > > > > >
> > > > > > @Override
> > > > > > protected List
> > newSubMenuButtons(String
> > > > > > buttonMarkupId) {
> > > > > > List languages = new
> > > > > > ArrayList();
> > > > > >
>  languages.add(newLanguageOption(buttonMarkupId,
> > > > > "de"));
> > > > > >
>  languages.add(newLanguageOption(buttonMarkupId,
> > > > > "en"));
> > > > > > return languages;
> > > > > > }
> > > > > >
> > > > > > And the newLanguageOption method looks like this:
> > > > > >
> > > > > > private Link newLanguageOption(final String buttonMarkupId,
> > > final
> > > > > > String localeString) {
> > > > > > Link languageOptionLink = new
> > > Link(buttonMarkupId) {
> > > > > >
> > > > > > private static final long serialVersionUID =
> > > > > > -1704794810431937803L;
> > > > > >
> > > > > > @Override
> > > > > > public void onClick() {
> > > > > > Locale locale = new Locale(localeString);
> &

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
there is a compile error on the first image..



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 17 December 2014 at 13:03, Francois Meillet 
wrote:
>
> What is the error, any stacktrace ?
>
> François Meillet
> Formation Wicket - Développement Wicket
>
>
>
>
>
> Le 17 déc. 2014 à 11:55, Hasan Çelik  a écrit :
>
> > Thanks Martin,
> >
> > I am newbie for wicket... It may be easy error for you but I didn't
> understand...Why am I getting this error? Which dependencies should I add
> in pom.xml ?
> >
> >
> >
> > If I change the codes like that, I am getting error,
> > ​
> >
> >
> >
> >
> >
> >
> >
> > Web Sitesi : www.ab-hibe.com
> > E-mail: hasance...@berkadem.com
> > E-mail: i...@ab-hibe.com
> > Gsm1: 0 544 640 96 25
> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> >
> > On 17 December 2014 at 10:13, Martin Grigorov 
> wrote:
> > I guess his code just uses Wicket's CookieUtils class.
> > See
> >
> https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
> > for example.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik 
> wrote:
> > >
> > > Thanks for reply,
> > >
> > > Can you give detail about getCookieUtils() and
> CCA_LANGUAGE_COOKIE_NAME in
> > > your CcaWebApplication class
> > >
> > > Regards,
> > >
> > >
> > >
> > > On 17 December 2014 at 09:06, Richter, Marvin <
> > > marvin.rich...@freenetdigital.com> wrote:
> > > >
> > > > Hey, I have something like that implemented in the following way:
> > > >
> > > > @Override
> > > > protected List newSubMenuButtons(String
> > > > buttonMarkupId) {
> > > > List languages = new
> > > > ArrayList();
> > > > languages.add(newLanguageOption(buttonMarkupId,
> > > "de"));
> > > > languages.add(newLanguageOption(buttonMarkupId,
> > > "en"));
> > > > return languages;
> > > > }
> > > >
> > > > And the newLanguageOption method looks like this:
> > > >
> > > > private Link newLanguageOption(final String buttonMarkupId,
> final
> > > > String localeString) {
> > > > Link languageOptionLink = new
> Link(buttonMarkupId) {
> > > >
> > > > private static final long serialVersionUID =
> > > > -1704794810431937803L;
> > > >
> > > > @Override
> > > > public void onClick() {
> > > > Locale locale = new Locale(localeString);
> > > >
> > > >
> > >
> CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
> > > > locale.toString());
> > > > getSession().setLocale(locale);
> > > > }
> > > >
> > > > @Override
> > > > public void onComponentTagBody(MarkupStream
> markupStream,
> > > > ComponentTag openTag) {
> > > > replaceComponentTagBody(markupStream, openTag,
> > > > getString(localeString));
> > > > }
> > > > };
> > > > return languageOptionLink;
> > > > }
> > > >
> > > > Hope that helps.
> > > >
> > > > Best,
> > > > Marvin
> > > >
> > > > -Original Message-
> > > > From: Hasan Çelik [mailto:hsnclk1...@gmail.com]
> > > > Sent: Wednesday, December 17, 2014 7:46 AM
> > > > To: users@wicket.apache.org
> > > > Subject: submenu in NavbarDropDownButton
> > > >
> > > > Hi,
> > > >
> > > > I have a question about usage of navbar components.. I tried to make
> > > > Multilingual website, actually I did... when I put language buttons
> in a
> > > &

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
Thanks Martin,

I am newbie for wicket... It may be easy error for you but I didn't
understand...Why am I getting this error? Which dependencies should I add
in pom.xml ?


If I change the codes like that, I am getting error,
​

[image: Inline images 1]

[image: Inline images 2]



Web Sitesi : www.ab-hibe.com
E-mail: hasance...@berkadem.com
E-mail: i...@ab-hibe.com
Gsm1: 0 544 640 96 25
Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara

On 17 December 2014 at 10:13, Martin Grigorov  wrote:
>
> I guess his code just uses Wicket's CookieUtils class.
> See
>
> https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
> for example.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 17, 2014 at 10:05 AM, Hasan Çelik 
> wrote:
> >
> > Thanks for reply,
> >
> > Can you give detail about getCookieUtils() and CCA_LANGUAGE_COOKIE_NAME
> in
> > your CcaWebApplication class
> >
> > Regards,
> >
> >
> >
> > On 17 December 2014 at 09:06, Richter, Marvin <
> > marvin.rich...@freenetdigital.com> wrote:
> > >
> > > Hey, I have something like that implemented in the following way:
> > >
> > > @Override
> > > protected List newSubMenuButtons(String
> > > buttonMarkupId) {
> > > List languages = new
> > > ArrayList();
> > > languages.add(newLanguageOption(buttonMarkupId,
> > "de"));
> > > languages.add(newLanguageOption(buttonMarkupId,
> > "en"));
> > > return languages;
> > > }
> > >
> > > And the newLanguageOption method looks like this:
> > >
> > > private Link newLanguageOption(final String buttonMarkupId, final
> > > String localeString) {
> > > Link languageOptionLink = new Link(buttonMarkupId)
> {
> > >
> > > private static final long serialVersionUID =
> > > -1704794810431937803L;
> > >
> > > @Override
> > > public void onClick() {
> > > Locale locale = new Locale(localeString);
> > >
> > >
> >
> CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
> > > locale.toString());
> > > getSession().setLocale(locale);
> > > }
> > >
> > >     @Override
> > > public void onComponentTagBody(MarkupStream
> markupStream,
> > > ComponentTag openTag) {
> > > replaceComponentTagBody(markupStream, openTag,
> > > getString(localeString));
> > > }
> > > };
> > > return languageOptionLink;
> > > }
> > >
> > > Hope that helps.
> > >
> > > Best,
> > > Marvin
> > >
> > > -Original Message-
> > > From: Hasan Çelik [mailto:hsnclk1...@gmail.com]
> > > Sent: Wednesday, December 17, 2014 7:46 AM
> > > To: users@wicket.apache.org
> > > Subject: submenu in NavbarDropDownButton
> > >
> > > Hi,
> > >
> > > I have a question about usage of navbar components.. I tried to make
> > > Multilingual website, actually I did... when I put language buttons in
> a
> > > wicket panel, It works...In this example I try to put these language
> > > buttons into dropdown submenu.. First I did one Multilanguage class and
> > > this class was taking a parameter...This parameter was about Locale
> > > String(like "en")..In this way I didn't succeed to take parameter in
> the
> > > submenu declaration,like that
> > >
> > > subMenu.add(new MenuBookmarkablePageLink(new
> > > MultiLanguage("en"),
> > > Model.of("Turkish")).setIconType(GlyphIconType.refresh));
> > >
> > > I know that declaration (new MultiLanguage("en")) is wrong but I wanted
> > to
> > > do like that...Anyway After that I have changed the method construction
> > as
> > > the following.. But in this way I have to create different
> Multilanguage
> > > class for every diffent language. My question is, Is there a way to
> > create
> > > construct

Re: submenu in NavbarDropDownButton

2014-12-17 Thread Hasan Çelik
Thanks for reply,

Can you give detail about getCookieUtils() and CCA_LANGUAGE_COOKIE_NAME in
your CcaWebApplication class

Regards,



On 17 December 2014 at 09:06, Richter, Marvin <
marvin.rich...@freenetdigital.com> wrote:
>
> Hey, I have something like that implemented in the following way:
>
> @Override
> protected List newSubMenuButtons(String
> buttonMarkupId) {
> List languages = new
> ArrayList();
> languages.add(newLanguageOption(buttonMarkupId, "de"));
> languages.add(newLanguageOption(buttonMarkupId, "en"));
> return languages;
> }
>
> And the newLanguageOption method looks like this:
>
> private Link newLanguageOption(final String buttonMarkupId, final
> String localeString) {
> Link languageOptionLink = new Link(buttonMarkupId) {
>
> private static final long serialVersionUID =
> -1704794810431937803L;
>
> @Override
> public void onClick() {
> Locale locale = new Locale(localeString);
>
> CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
> locale.toString());
> getSession().setLocale(locale);
> }
>
> @Override
> public void onComponentTagBody(MarkupStream markupStream,
> ComponentTag openTag) {
> replaceComponentTagBody(markupStream, openTag,
> getString(localeString));
> }
>     };
> return languageOptionLink;
> }
>
> Hope that helps.
>
> Best,
> Marvin
>
> -Original Message-
> From: Hasan Çelik [mailto:hsnclk1...@gmail.com]
> Sent: Wednesday, December 17, 2014 7:46 AM
> To: users@wicket.apache.org
> Subject: submenu in NavbarDropDownButton
>
> Hi,
>
> I have a question about usage of navbar components.. I tried to make
> Multilingual website, actually I did... when I put language buttons in a
> wicket panel, It works...In this example I try to put these language
> buttons into dropdown submenu.. First I did one Multilanguage class and
> this class was taking a parameter...This parameter was about Locale
> String(like "en")..In this way I didn't succeed to take parameter in the
> submenu declaration,like that
>
> subMenu.add(new MenuBookmarkablePageLink(new
> MultiLanguage("en"),
> Model.of("Turkish")).setIconType(GlyphIconType.refresh));
>
> I know that declaration (new MultiLanguage("en")) is wrong but I wanted to
> do like that...Anyway After that I have changed the method construction as
> the following.. But in this way I have to create different  Multilanguage
> class for every diffent language. My question is, Is there a way to create
> construction for submenu declaration like that..(*subMenu.add(new
> MenuBookmarkablePageLink(new
> MultiLanguage("en"),
> Model.of("Turkish")).setIconType(GlyphIconType.refresh));*)
>
>
> DropDownButton dropdown = new NavbarDropDownButton(Model.of("Choose
> Language")) {
> @Override
> public boolean isActive(Component item) {
> return false;
> }
>
> @Override
> protected List newSubMenuButtons(final String
> buttonMarkupId) {
> final List subMenu = new ArrayList();
> subMenu.add(new
> MenuBookmarkablePageLink(MultiLanguage.class,
> Model.of("Turkish")).setIconType(GlyphIconType.*flag*));
> subMenu.add(new
> MenuBookmarkablePageLink(MultiLanguage2.class,
> Model.of("English")).setIconType(GlyphIconType.*flag*));
>
> return subMenu;
>  }
>  }.setIconType(GlyphIconType.book);
>
>  navbar.addComponents(new ImmutableNavbarComponent(dropdown,
> Navbar.ComponentPosition.RIGHT));
>
>  return navbar;
>
>
> --
>
>
> public class MultiLanguage extends BasePage2 {
> public MultiLanguage(){
> super(new PageParameters());
> changeUserLocaleTo("en");
> }
> private void changeUserLocaleTo(String localeString) {
> getSession().setLocale(new Locale(localeString));
>
> Cookie languageCookie = new
> Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, localeString);
> languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
> ((WebResponse)getResponse()).addCookie(languageCookie);
> }
> }
>
> public class MultiLanguage1 extends BasePage2 {
> public MultiLanguage(){
> super(new PageParameters());
>  

submenu in NavbarDropDownButton

2014-12-16 Thread Hasan Çelik
Hi,

I have a question about usage of navbar components.. I tried to make
Multilingual website, actually I did... when I put language buttons in
a wicket panel, It works...In this example I try to put these language
buttons into dropdown submenu.. First I did one Multilanguage class
and this class was taking a parameter...This parameter was about
Locale String(like "en")..In this way I didn't succeed to take
parameter in the submenu declaration,like that

subMenu.add(new MenuBookmarkablePageLink(new
MultiLanguage("en"),
Model.of("Turkish")).setIconType(GlyphIconType.refresh));

I know that declaration (new MultiLanguage("en")) is wrong but I
wanted to do like that...Anyway After that I have changed the method
construction as the following.. But in this way I have to create
different  Multilanguage class for every diffent language. My question
is, Is there a way to create construction for submenu declaration like
that..(*subMenu.add(new MenuBookmarkablePageLink(new
MultiLanguage("en"),
Model.of("Turkish")).setIconType(GlyphIconType.refresh));*)


DropDownButton dropdown = new NavbarDropDownButton(Model.of("Choose
Language")) {
@Override
public boolean isActive(Component item) {
return false;
}

@Override
protected List newSubMenuButtons(final String
buttonMarkupId) {
final List subMenu = new ArrayList();
subMenu.add(new
MenuBookmarkablePageLink(MultiLanguage.class,
Model.of("Turkish")).setIconType(GlyphIconType.*flag*));
subMenu.add(new
MenuBookmarkablePageLink(MultiLanguage2.class,
Model.of("English")).setIconType(GlyphIconType.*flag*));

return subMenu;
 }
 }.setIconType(GlyphIconType.book);

 navbar.addComponents(new ImmutableNavbarComponent(dropdown,
Navbar.ComponentPosition.RIGHT));

 return navbar;


--


public class MultiLanguage extends BasePage2 {
public MultiLanguage(){
super(new PageParameters());
changeUserLocaleTo("en");
}
private void changeUserLocaleTo(String localeString) {
getSession().setLocale(new Locale(localeString));

Cookie languageCookie = new
Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, localeString);
languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
}

public class MultiLanguage1 extends BasePage2 {
public MultiLanguage(){
super(new PageParameters());
changeUserLocaleTo("tr");
}
private void changeUserLocaleTo(String localeString) {
getSession().setLocale(new Locale(localeString));

Cookie languageCookie = new
Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, localeString);
languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
}


Re: how to use PropertyModel for saving image to database

2014-09-22 Thread hasan çelik
Hi Andrea,

i have tried your saying again and solved the  problem :) thank you so
much...

the solution is,

final FileUploadField fileUploadField = new FileUploadField("fileUpload",
new IModel>() {

public List getObject() {
return null;
}

public void setObject(List object) {

}

public void detach() {

}
});
form.add(fileUploadField);


...
.
AjaxButton submit = new AjaxButton("submit") {

@Override
protected void onError(AjaxRequestTarget target1, Form form)
{
feedbackPanel.setVisible(true);
super.onError(target1, form);   
target1.add(wrapper);
}

@Override
protected void onSubmit(AjaxRequestTarget ajaxRequestTarget,
Form form) {

user1.setPhoto(fileUploadField.getFileUpload().getBytes());
<-important
user1Dao.save(user1);
   
ajaxRequestTarget.add(wrapper);
}

};

form.add(submit);
wrapper.add(form);

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-use-PropertyModel-for-saving-image-to-database-tp4667580p4667612.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to use PropertyModel for saving image to database

2014-09-21 Thread hasan çelik
only i can use your saying this way,

final FileUploadField fileUploadField = new FileUploadField("fileUpload",
new IModel>() {

public List getObject() {
return null;
}

public void setObject(List object) {

}

public void detach() {

}
});

because i am getting error "java.lang.NullPointerException" when i use
Model(),

anyway, i didnt understand :( only i want to hold my pojo class information
into FileUploadField...

the solution works when i use  diffrent object type like these

final TextField email = new TextField("email", new
PropertyModel(user1, "email"));
email.setRequired(true);
email.add(EmailAddressValidator.getInstance());
form.add(email);
final PasswordTextField password = new PasswordTextField("password", new
PropertyModel(user1, "password"));
password.setRequired(true);
form.add(password);


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-use-PropertyModel-for-saving-image-to-database-tp4667580p4667586.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to use PropertyModel for saving image to database

2014-09-21 Thread hasan çelik
Can you show an example using with (user1, "photo")because i want to wrap
my pojo class(User1.java) information with FileUploadField

Thank you again your answer :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-use-PropertyModel-for-saving-image-to-database-tp4667580p4667583.html
Sent from the Users forum mailing list archive at Nabble.com.

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



how to use PropertyModel for saving image to database

2014-09-20 Thread Hasan Çelik
hi,

i have a file upload process for image.

fileupload.java
https://gist.github.com/cortix/9079660

User1.java
https://gist.github.com/cortix/f5fbc0a137d6acfa9b40

fileupload.html
https://gist.github.com/cortix/9082148

i got this error
https://gist.github.com/cortix/9079743

...
final FileUploadField fileUpload = new FileUploadField("fileUpload",new
PropertyModel(user1, "photo"));
form.add(fileUpload);
...

i think i should change my ProperyModel or the method for images to save
database because in my pojo class my object type is byte[]... When i use
this way, i get error... i am thinking if this PropertyModel change, i can
fix this problem but i don't know how can i use this PropertyModel for byte
type..


Web Site : www.berkadem.com
E-mail: hasance...@berkadem.com
Phone: +90 312 473 38 86
Mobile Phone: +90 544 640 96 25
Address : Öveçler 4. Cadde 1325.sokak No:5/1 Çankaya ANKARA