Re: Hiding Components based on style

2009-07-01 Thread Andrew Berman
Cool that's what I was looking for Igor.  Thank you!

Also, thank you Richard.  I know of the CSS route, but I really wanted to
not have it show up in the actual HTML as I didn't want someone hacking the
form or being able to turn on the link using something like Web Developer in
Firefox.

Thanks guys!

On Fri, Jun 26, 2009 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 so you want to include all possible components in the class, but
 exclude some in the markup and not have an error? fine, just turn off
 componentusecheck in debug settings.

 -igor

 On Fri, Jun 26, 2009 at 11:13 AM, Andrew Bermanatber...@gmail.com wrote:
  Right, I know that way, but I don't want to I don't want to do that
 though
  Igor.  That seems like really bad practice as I add styles constantly and
 I
  don't want to have to make a code change every time I add a style.  It's
  much better for me to just modify the HTML and be done with it without
  having to make code changes.  I really think there should be a way to do
  this with some sort of comment tag or something.  Maybe there needs to be
 a
  wicket:comment tag where the code inside is evaluated so there are no
  errors but that the component is hidden.
 
  Thanks for your help,
 
  Andrew
 
  On Thu, Jun 25, 2009 at 8:47 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  add(new textfield(..) { isvisible() { return
  getsession.getstyle().equals(foo); }});
 
  -igor
 
  On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com
 wrote:
   I am using Wicket 1.3 and was wondering if there is a way to hide
  components
   in the HTML itself.  Here's the issue, say I have two forms and two
   different styles.  In one style I want to display all the form fields,
   however in the other one I want to display only a couple of them.  I
   currently have two HTML files, one for each style, but I can't seem to
  find
   a way to hide the form fields aside from using CSS and adding
  display:none.
   Is that the only way to do it?
  
   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: Hiding Components based on style

2009-06-26 Thread Andrew Berman
Right, I know that way, but I don't want to I don't want to do that though
Igor.  That seems like really bad practice as I add styles constantly and I
don't want to have to make a code change every time I add a style.  It's
much better for me to just modify the HTML and be done with it without
having to make code changes.  I really think there should be a way to do
this with some sort of comment tag or something.  Maybe there needs to be a
wicket:comment tag where the code inside is evaluated so there are no
errors but that the component is hidden.

Thanks for your help,

Andrew

On Thu, Jun 25, 2009 at 8:47 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 add(new textfield(..) { isvisible() { return
 getsession.getstyle().equals(foo); }});

 -igor

 On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com wrote:
  I am using Wicket 1.3 and was wondering if there is a way to hide
 components
  in the HTML itself.  Here's the issue, say I have two forms and two
  different styles.  In one style I want to display all the form fields,
  however in the other one I want to display only a couple of them.  I
  currently have two HTML files, one for each style, but I can't seem to
 find
  a way to hide the form fields aside from using CSS and adding
 display:none.
  Is that the only way to do it?
 
  Thanks!
 

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




RE: Hiding Components based on style

2009-06-26 Thread Rowe, Richard A.
Andrew-

I use an attribute modifier to change styles on the fly. I create a css
with all my styles as classes. Then I use the AttributeModifier class
to change the class attribute to be the style I want. Hope this helps.

Richard Rowe


-Original Message-
From: users-return-39080-richard.a.rowe=saic@wicket.apache.org
[mailto:users-return-39080-richard.a.rowe=saic@wicket.apache.org] On
Behalf Of Andrew Berman
Sent: Friday, June 26, 2009 2:13 PM
To: users@wicket.apache.org
Subject: Re: Hiding Components based on style

Right, I know that way, but I don't want to I don't want to do that
though
Igor.  That seems like really bad practice as I add styles constantly
and I
don't want to have to make a code change every time I add a style.  It's
much better for me to just modify the HTML and be done with it without
having to make code changes.  I really think there should be a way to do
this with some sort of comment tag or something.  Maybe there needs to
be a
wicket:comment tag where the code inside is evaluated so there are no
errors but that the component is hidden.

Thanks for your help,

Andrew

On Thu, Jun 25, 2009 at 8:47 PM, Igor Vaynberg
igor.vaynb...@gmail.comwrote:

 add(new textfield(..) { isvisible() { return
 getsession.getstyle().equals(foo); }});

 -igor

 On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com
wrote:
  I am using Wicket 1.3 and was wondering if there is a way to hide
 components
  in the HTML itself.  Here's the issue, say I have two forms and two
  different styles.  In one style I want to display all the form
fields,
  however in the other one I want to display only a couple of them.  I
  currently have two HTML files, one for each style, but I can't seem
to
 find
  a way to hide the form fields aside from using CSS and adding
 display:none.
  Is that the only way to do it?
 
  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: Hiding Components based on style

2009-06-26 Thread Rowe, Richard A.
Andrew-

One more thing. I have already added my style sheet to the page like
this:

add(HeaderContributor.forCss(pathto/styles.css));

Richard


-Original Message-
From: users-return-39080-richard.a.rowe=saic@wicket.apache.org
[mailto:users-return-39080-richard.a.rowe=saic@wicket.apache.org] On
Behalf Of Andrew Berman
Sent: Friday, June 26, 2009 2:13 PM
To: users@wicket.apache.org
Subject: Re: Hiding Components based on style

Right, I know that way, but I don't want to I don't want to do that
though
Igor.  That seems like really bad practice as I add styles constantly
and I
don't want to have to make a code change every time I add a style.  It's
much better for me to just modify the HTML and be done with it without
having to make code changes.  I really think there should be a way to do
this with some sort of comment tag or something.  Maybe there needs to
be a
wicket:comment tag where the code inside is evaluated so there are no
errors but that the component is hidden.

Thanks for your help,

Andrew

On Thu, Jun 25, 2009 at 8:47 PM, Igor Vaynberg
igor.vaynb...@gmail.comwrote:

 add(new textfield(..) { isvisible() { return
 getsession.getstyle().equals(foo); }});

 -igor

 On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com
wrote:
  I am using Wicket 1.3 and was wondering if there is a way to hide
 components
  in the HTML itself.  Here's the issue, say I have two forms and two
  different styles.  In one style I want to display all the form
fields,
  however in the other one I want to display only a couple of them.  I
  currently have two HTML files, one for each style, but I can't seem
to
 find
  a way to hide the form fields aside from using CSS and adding
 display:none.
  Is that the only way to do it?
 
  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: Hiding Components based on style

2009-06-26 Thread Igor Vaynberg
so you want to include all possible components in the class, but
exclude some in the markup and not have an error? fine, just turn off
componentusecheck in debug settings.

-igor

On Fri, Jun 26, 2009 at 11:13 AM, Andrew Bermanatber...@gmail.com wrote:
 Right, I know that way, but I don't want to I don't want to do that though
 Igor.  That seems like really bad practice as I add styles constantly and I
 don't want to have to make a code change every time I add a style.  It's
 much better for me to just modify the HTML and be done with it without
 having to make code changes.  I really think there should be a way to do
 this with some sort of comment tag or something.  Maybe there needs to be a
 wicket:comment tag where the code inside is evaluated so there are no
 errors but that the component is hidden.

 Thanks for your help,

 Andrew

 On Thu, Jun 25, 2009 at 8:47 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 add(new textfield(..) { isvisible() { return
 getsession.getstyle().equals(foo); }});

 -igor

 On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com wrote:
  I am using Wicket 1.3 and was wondering if there is a way to hide
 components
  in the HTML itself.  Here's the issue, say I have two forms and two
  different styles.  In one style I want to display all the form fields,
  however in the other one I want to display only a couple of them.  I
  currently have two HTML files, one for each style, but I can't seem to
 find
  a way to hide the form fields aside from using CSS and adding
 display:none.
  Is that the only way to do it?
 
  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



Hiding Components based on style

2009-06-25 Thread Andrew Berman
I am using Wicket 1.3 and was wondering if there is a way to hide components
in the HTML itself.  Here's the issue, say I have two forms and two
different styles.  In one style I want to display all the form fields,
however in the other one I want to display only a couple of them.  I
currently have two HTML files, one for each style, but I can't seem to find
a way to hide the form fields aside from using CSS and adding display:none.
Is that the only way to do it?

Thanks!


Re: Hiding Components based on style

2009-06-25 Thread Igor Vaynberg
add(new textfield(..) { isvisible() { return
getsession.getstyle().equals(foo); }});

-igor

On Thu, Jun 25, 2009 at 8:41 PM, Andrew Bermanatber...@gmail.com wrote:
 I am using Wicket 1.3 and was wondering if there is a way to hide components
 in the HTML itself.  Here's the issue, say I have two forms and two
 different styles.  In one style I want to display all the form fields,
 however in the other one I want to display only a couple of them.  I
 currently have two HTML files, one for each style, but I can't seem to find
 a way to hide the form fields aside from using CSS and adding display:none.
 Is that the only way to do it?

 Thanks!


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