RE: Show textfield as plaintext when disabled?

2014-03-03 Thread Stijn de Witt
It is fairly easy to style a textfield as plain text by disabling the border 
and giving it a transparent background color:

input[readonly=readonly] {
border: none;
background: transparent;
}

-Stijn

-Original Message-
From: Entropy [mailto:blmulholl...@gmail.com] 
Sent: vrijdag 28 februari 2014 20:33
To: users@wicket.apache.org
Subject: Show textfield as plaintext when disabled?

Is there a way to have my textfield show as plain text when in a readonly mode 
rather than as a disabled textbox?

Backup question: I can imagine making a panel to do this...having a textfield 
and label and hiding whichever I didn't want, but I would want my panel to bind 
to a textbox in the parent page and replace that tag (otherwise I would have 
two textboxes, right).  How would I go about that?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723.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


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



RE: Show textfield as plaintext when disabled?

2014-03-03 Thread Stijn de Witt
I wouldn't call it cludgy... 'pragmatic' is the word that comes to mind  :)

Big advantage of styling the input as regular text instead of completely 
replacing the HTML element is that all other behavior remains as expected. The 
field is still submitted with the form etc.

-Stijn


-Original Message-
From: Chris Snyder [mailto:chris.sny...@biologos.org] 
Sent: zaterdag 1 maart 2014 17:54
To: Wicket users mailing list mailing list
Subject: Re: Show textfield as plaintext when disabled?

I also ended up going the panel route for this.

An alternative - perhaps a bit cludgy - would be to style the input fields as 
plain text using CSS (remove the border  outline, alter the padding, etc.).

-Chris

On Sat, Mar 1, 2014 at 6:35 AM, Andrea Del Bene an.delb...@gmail.comwrote:

 Hi, l've tried to do a similar thing a couple of months ago but it was 
 very tricky and l ended up using a panel with two components (text 
 field and a label).
 You can use methods oncomponenttag and onxomponenttagbody to 
 dynamically change the tag and the body depending on component status (view 
 or edit)...
 Good luck :).
 On Feb 28, 2014 8:34 PM, Entropy blmulholl...@gmail.com wrote:

  Is there a way to have my textfield show as plain text when in a 
  readonly mode rather than as a disabled textbox?
 
  Backup question: I can imagine making a panel to do this...having a 
  textfield and label and hiding whichever I didn't want, but I would 
  want
 my
  panel to bind to a textbox in the parent page and replace that tag 
  (otherwise I would have two textboxes, right).  How would I go about
 that?
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext
 -when-disabled-tp4664723.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 set meta tags prroperty for facebook and Open Graph?

2014-03-03 Thread Stijn de Witt
Have a look at the .html file corresponding to your Page class. You should be 
able to just add it there.

-Stijn


-Original Message-
From: - [mailto:irresistible...@gmail.com] 
Sent: zondag 2 maart 2014 16:01
To: users@wicket.apache.org
Subject: How to set meta tags prroperty for facebook and Open Graph?

I need to set meta tag property as I want for facebook and OpenGraph with 
wicket.

meta property=fb:app_id content=117243945141208 / meta 
property=og:site_name content=site.com / meta property=og:type 
content=website / meta property=og:title content=title variable / 
meta property=og:url content=http://www.site.com/..; / meta 
property=og:description content=Description variable / meta 
property=og:image content=http://www.site.com/images/; /

An example code is welcomed because I am a newbie. Thanks.

-
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: Register Wicket Components @ Runtime

2014-03-03 Thread Decebal Suiu
Maybe wicket-plugin [1] help you.

Best regards,
Decebal

[1] https://github.com/decebals/wicket-plugin 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Register-Wicket-Components-Runtime-tp4664724p4664743.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: Show textfield as plaintext when disabled?

2014-03-03 Thread Chris Snyder
One potential issue: Depending on where you're using the technique, it
could lead to problems. For instance, if you are implementing in-place-edit
functionality on a public-facing page, having a lot of your content in
input/ tags could make the content invisible to search engines (I'm just
guessing here - it would make sense for search engines to ignore form
content, but I don't know if this is true). Even if search engines aren't a
concern, it's contrary to semantic HTML, and could lead to problems for
non-graphical browsers.

Nevertheless, it's easy, and certainly acceptable for many situations.
Still, I stand by my initial cludgy assertion. :-)

-Chris


On Mon, Mar 3, 2014 at 4:04 AM, Stijn de Witt 
stijn.dew...@planonsoftware.com wrote:

 I wouldn't call it cludgy... 'pragmatic' is the word that comes to mind  :)

 Big advantage of styling the input as regular text instead of completely
 replacing the HTML element is that all other behavior remains as expected.
 The field is still submitted with the form etc.

 -Stijn


 -Original Message-
 From: Chris Snyder [mailto:chris.sny...@biologos.org]
 Sent: zaterdag 1 maart 2014 17:54
 To: Wicket users mailing list mailing list
 Subject: Re: Show textfield as plaintext when disabled?

 I also ended up going the panel route for this.

 An alternative - perhaps a bit cludgy - would be to style the input fields
 as plain text using CSS (remove the border  outline, alter the padding,
 etc.).

 -Chris

 On Sat, Mar 1, 2014 at 6:35 AM, Andrea Del Bene an.delb...@gmail.com
 wrote:

  Hi, l've tried to do a similar thing a couple of months ago but it was
  very tricky and l ended up using a panel with two components (text
  field and a label).
  You can use methods oncomponenttag and onxomponenttagbody to
  dynamically change the tag and the body depending on component status
 (view or edit)...
  Good luck :).
  On Feb 28, 2014 8:34 PM, Entropy blmulholl...@gmail.com wrote:
 
   Is there a way to have my textfield show as plain text when in a
   readonly mode rather than as a disabled textbox?
  
   Backup question: I can imagine making a panel to do this...having a
   textfield and label and hiding whichever I didn't want, but I would
   want
  my
   panel to bind to a textbox in the parent page and replace that tag
   (otherwise I would have two textboxes, right).  How would I go about
  that?
  
   --
   View this message in context:
  
  http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext
  -when-disabled-tp4664723.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: View page not updating after Edit page makes changes

2014-03-03 Thread jchappelle
On your View page your ListView should have a LoadableDetachableModel passed
to it instead of the Article.getArticles() list. In fact you could use the
same model that you have feeding your DropDownChoice in your edit page. Just
refactor that model out into a separate class and use in both cases.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/View-page-not-updating-after-Edit-page-makes-changes-tp4664739p4664745.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: View page not updating after Edit page makes changes

2014-03-03 Thread lytrean
Thanks for your reply!  This change got me part of the way there.  The
behavior is like this now:

1) Select second item from drop-down (edit fields auto-populate with correct
data)
2) Edit description and submit
3) Display view in second tab -- view displays updated description correctly
4) Switch back to edit tab
5) Modify description again (without clicking on drop-down because it
already has correct item selected) and submit.  Note: after the page
refreshes from the submit the drop-down defaults back to the first item in
the drop-down instead of the one that was selected.  I suspect my session or
something has lost which Article it should be updating.
6) Switch back to view tab and refresh -- description does NOT update
7) Switch back to the edit tab and change drop-down to the second item. 
Indeed, the description was NOT updated -- it did not save from step 5

Updated code (note: there is duplicate code that could be re-factored --
just wanted to keep the change simple):
Edit Page: http://pastebin.com/qk4jGNrv
View Page: http://pastebin.com/a4DyWwSm

Thanks for your help!!!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/View-page-not-updating-after-Edit-page-makes-changes-tp4664739p4664746.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



Ajax Update failing because of model

2014-03-03 Thread Hobbes00uk
I have a text-field component that has an
AjaxFormComponentUpdatingBehavior(onchange) behaviour attached. I've hived
it off into a separate component as I'm reusing it in various places across
my app.

Everything works fine most of the time, but I've discovered that on a
particular page it doesn't perform an Ajax update, it falls back to using a
regular update and I can't work out why.

As far as I can tell it appears to be linked to the model being supplied to
the component. In other places, I'm using a fairly standard model, it just
gets and sets a field on the model object. But in this implementation, it
takes the supplied value and uses it to update another part of the system -
so the getter always returns a null. If I comment this out and replace it
with a standard way of using a getter and setter then everything works
fine after that.

There are no errors being reported anywhere, nothing is changed except the
backing model. Is there some reason why this might cause an Ajax update to
fail and fall back on a regular update? I'm not even sure where to look now
to try and work out what might be going wrong.

Matt Pennington

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Update-failing-because-of-model-tp4664749.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: Ajax Update failing because of model

2014-03-03 Thread Sven Meier

I can't think of a reason for this.

A quickstart would help to identify the problem.

Regards
Sven

On 03/03/2014 07:51 PM, Hobbes00uk wrote:

I have a text-field component that has an
AjaxFormComponentUpdatingBehavior(onchange) behaviour attached. I've hived
it off into a separate component as I'm reusing it in various places across
my app.

Everything works fine most of the time, but I've discovered that on a
particular page it doesn't perform an Ajax update, it falls back to using a
regular update and I can't work out why.

As far as I can tell it appears to be linked to the model being supplied to
the component. In other places, I'm using a fairly standard model, it just
gets and sets a field on the model object. But in this implementation, it
takes the supplied value and uses it to update another part of the system -
so the getter always returns a null. If I comment this out and replace it
with a standard way of using a getter and setter then everything works
fine after that.

There are no errors being reported anywhere, nothing is changed except the
backing model. Is there some reason why this might cause an Ajax update to
fail and fall back on a regular update? I'm not even sure where to look now
to try and work out what might be going wrong.

Matt Pennington

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Update-failing-because-of-model-tp4664749.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




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



Re: View page not updating after Edit page makes changes

2014-03-03 Thread jchappelle
I took your code and I could reproduce it but then I realized that my
Article.getArticles() method was returning a new ArrayList every time it was
called. I changed it to be static and it fixed it. I did omit the
article.getSmallThumbImageResource() method though.

Can you post the code for your Article class please? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/View-page-not-updating-after-Edit-page-makes-changes-tp4664739p4664751.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: Does wicket:link tag work inside pages in different packages?

2014-03-03 Thread Alberto Brosich

Yes, you are right. I will do in that way.
The fact is I have a similar problem with some menu panels with several
links. I just wanted to do the easiest thing.

Now I have another problem with subclasses and subpackages but I will
send a new mail to the list with another topic.

Many thanks

Alberto


On Sun, 2014-03-02 at 13:57 -0500, Paul Bors wrote:
 Instead of using in-line wicket:link why not use a a wicket:id=“homePage” 
 and then add(new Link(“homePage”, HomePage.class)); to your parent class? 
 That will resolve no matter where its used from.
 
 After all wicket:link is just a Link class at the end of the day.
 Also see the examples page:
 http://www.wicket-library.com/wicket-examples/linkomatic/home
 
 
 On Feb 27, 2014, at 11:03 AM, Alberto Brosich abros...@ogs.trieste.it wrote:
 
  
  Yes, I read it.
  Does it mean that have to do a different header panel for every
  suppages level (using ../(../)HomePage.html link)? 
  
  Alberto
  
  
  On Thu, 2014-02-27 at 16:30 +0100, Sven Meier wrote:
  Have you read http://wicket.apache.org/guide/guide/urls.html#urls_3
  ?
  
  Sven
  
  On 02/27/2014 03:44 PM, Alberto Brosich wrote:
  Hi,
  
  I have an header panel with a link to the homepage of the site.
  This panel is included in every page of the site.
  If I use the wicket:link tag for that link it works fine (for example,
  it is disabled in the homepage) for the pages in the same package of the
  Homepage class.
  If I am on a page inside another package (subpackage in my case) the
  link became the name of that package plus the href specified in the html
  panel. For example:
  
  wicket:linka href=HomePage.html...//wicket:link
  
  In a page inside package subpackage the link is:
  subpackage/HomePage.html and not ../.
  
  What I'm doing wrong?
  
  Regards
  
  Alberto
  
  
  -
  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
  
 
 
 -
 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: View page not updating after Edit page makes changes

2014-03-03 Thread lytrean
Article class: http://pastebin.com/pNy8FUJQ
Article instantiation in WebApplication constructor:
http://pastebin.com/j92mF3Fs
ByteImageResource class: http://pastebin.com/G4rC3DgG


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/View-page-not-updating-after-Edit-page-makes-changes-tp4664739p4664753.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



Best practices with subclassing and subpackaging

2014-03-03 Thread Alberto Brosich

Hi,

I have an application with several pages, mounted in webapplication,
that do not have markup file associated. The markup file is selected
using variations in the parent class. I would like to split pages in
subpackages but if I move the markup file
(ParentPageClass_variation.html) in the subpackages too, it doesn't
work, obviously.

So, some questions.

Is it a good practice in wicket this kind of subclassing?

Is there a way to override the resolving of the markup filename?
I took a look to the apidocs without success.

Best regards

Alberto


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



Re: How to set meta tags prroperty for facebook and Open Graph?

2014-03-03 Thread -
On Monday 03 March 2014 10:05:55 Stijn de Witt wrote:
 Have a look at the .html file corresponding to your Page class. You should be 
 able to just add it there.

Sorry, I am newbe but not so stupid!
I did it, my html file already have meta tags for facebook, but i want change 
content in the correspond page class.
I want use wicket to make dinamic page, not simple static html pages.
For examples now I have a link to og:image that is always the same, but I want 
change it dinamically.
It is similar to tag title in the header, you can set it in the html as 
static, of manage it with wicket dinamically
as in this example:

html page:

   head
title wicket:id=pageTitleLogin Page/title
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
meta name=viewport content=width=device-width /
/head
.
java class page:

 @Override 
protected void onInitialize() { 
super.onInitialize(); 
Label pageTitle = new Label(pageTitle, Login Page); 
this.add(pageTitle);
} 

I didn't test it, I just read it on 
http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-page-title-td4662372.html

 

 -Stijn
 
 
 -Original Message-
 From: - [mailto:irresistible...@gmail.com] 
 Sent: zondag 2 maart 2014 16:01
 To: users@wicket.apache.org
 Subject: How to set meta tags prroperty for facebook and Open Graph?
 
 I need to set meta tag property as I want for facebook and OpenGraph with 
 wicket.
 
 meta property=fb:app_id content=117243945141208 /
 meta property=og:site_name content=site.com / 
meta property=og:type content=website / 
meta property=og:title content=title variable /
meta property=og:url content=http://www.site.com/..; /
 meta property=og:description content=Description variable / 
meta property=og:image content=http://www.site.com/images/; /
 
 An example code is welcomed because I am a newbie. Thanks.
 
 -
 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



How does Wicket know when to make a new session?

2014-03-03 Thread eaglei22
My company uses a webgate to verify the user before redirecting to the
application. Wicket works fine outside of this webgate and retains one user
session for each tab opened in the browser or new browser window. But when
accessed through this webgate, wicket creates a new session and expires the
old one. So anything running in the original opened tab gets terminated.
What are some things I can look for to work around this through Wicket?

Thanks. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-does-Wicket-know-when-to-make-a-new-session-tp4664756.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 set meta tags prroperty for facebook and Open Graph?

2014-03-03 Thread Shengche Hsiao
Hello

Check official user guide page 121!

http://wicket.apache.org/guide/guide/single.pdf


On Tue, Mar 4, 2014 at 8:19 AM, - irresistible...@gmail.com wrote:

 On Monday 03 March 2014 10:05:55 Stijn de Witt wrote:
  Have a look at the .html file corresponding to your Page class. You
 should be able to just add it there.

 Sorry, I am newbe but not so stupid!
 I did it, my html file already have meta tags for facebook, but i want
 change content in the correspond page class.
 I want use wicket to make dinamic page, not simple static html pages.
 For examples now I have a link to og:image that is always the same, but I
 want change it dinamically.
 It is similar to tag title in the header, you can set it in the html as
 static, of manage it with wicket dinamically
 as in this example:

 html page:
 
head
 title wicket:id=pageTitleLogin Page/title
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 /
 meta name=viewport content=width=device-width /
 /head
 .
 java class page:

  @Override
 protected void onInitialize() {
 super.onInitialize();
 Label pageTitle = new Label(pageTitle, Login Page);
 this.add(pageTitle);
 }

 I didn't test it, I just read it on
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-page-title-td4662372.html



  -Stijn
 
 
  -Original Message-
  From: - [mailto:irresistible...@gmail.com]
  Sent: zondag 2 maart 2014 16:01
  To: users@wicket.apache.org
  Subject: How to set meta tags prroperty for facebook and Open Graph?
 
  I need to set meta tag property as I want for facebook and OpenGraph
 with wicket.
 
  meta property=fb:app_id content=117243945141208 /
  meta property=og:site_name content=site.com /
 meta property=og:type content=website /
 meta property=og:title content=title variable /
 meta property=og:url content=http://www.site.com/..; /
  meta property=og:description content=Description variable /
 meta property=og:image content=http://www.site.com/images/; /
 
  An example code is welcomed because I am a newbie. Thanks.
 
  -
  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




-- 

---
We do this not because it is easy. We do this because it is hard.
---
ShengChe Hsiao
---
front...@gmail.com
front...@tc.edu.tw
---
VoIP : 070-910-2450
---


Re: View page not updating after Edit page makes changes

2014-03-03 Thread jchappelle
I tried using your code with wicket 6 and it wasn't working so I'm guessing
you are using something earlier than wicket 6. ByteImageResource could not
be resolved. 

I did make a change to the Article class and the TestView class that seemed
to make it work. I changed Article to have a url String instead of storing
the byte array of the image. I think that is better from a design standpoint
as well. But I'll try not to muddy the waters with my design
recommendations. Once I did that I changed the TestView to display the image
like this:

item.add(new Image(thumbImg, new
UrlResourceReference(Url.parse(item.getModelObject().getUrl();

Once I did that it seemed to work. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/View-page-not-updating-after-Edit-page-makes-changes-tp4664739p4664758.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