« Return to Thread: Hiding Components based on style

Re: Hiding Components based on style

by igor.vaynberg :: Rate this Message:

Reply to Author | View in Thread

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 Berman<atberman@...> 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.vaynberg@...>wrote:
>
>> add(new textfield(..) { isvisible() { return
>> getsession.getstyle().equals("foo"); }});
>>
>> -igor
>>
>> On Thu, Jun 25, 2009 at 8:41 PM, Andrew Berman<atberman@...> 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-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Hiding Components based on style