You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinay <vi...@mdp.net> on 2003/03/10 22:41:09 UTC

[OT]:Hiding layers in HTML

Thank you all for your replies. I think I will have to get some good hold on
regular expressions

I found a site which lists possible regular expressions . This should help
me, anyway even buying book should do

http://demo.freshwater.com/SiteScope/docs/regexp.htm

Now I have another question , which I think shouldn't be in this list but
was curious if anybody knows.

I have HTML page  with certain number of tables, in kind of different
layers(I have put them in field sets).

On triggering of event(liking selecting a certain checkbox) the different
layers should be hidden or visible. I think it should be possible be
JavaScript I think, but don't know how.

Help appreciated,

Thanks in advance
Vinay






----- Original Message -----
From: "Dan Allen" <da...@mojavelinux.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<da...@mymobile.info>
Sent: Monday, March 10, 2003 3:46 PM
Subject: Re: Regular Expressions


> > Not that I have seen per se.  There is a site that has some pre-built
> > regexs but Im sorry I cant remember the URL.  Your best bet is to go buy
> > the Oreilly book "Mastering Regular Expressions"  It is pretty much the
> > bible of regex and well worth the investment.
>
> KDE 3.1 has an awesome regular expression GUI editor, good for
> people just learning how to create them.  One thing to watch out
> for:
>
> In the validator, Perl regular expressions are used.  Normally, when
> you make a Perl regular expressions you have to use a delimiter,
> which is typically '/'
>
> However, in the validator definition file, you can exclude the
> delimiter as the validator automatically adds it for you.  However,
> this means that you must escape and instance of '/' in your regular
> expression.
>
> I have filed a bug report about this in bugzilla because the
> validator should automatically escape any delimiter used in the
> definition file so that this "ghost" delimiter does not have to be
> accounted for.
>
> In short, I mean
>
> The following would be accepted:
>
> <var-name>mask</var-name>
> <var-value>^http://[^ ]*$</var-value>
>
> instead of the current syntax
>
> <var-name>mask</var-name>
> <var-value>^http:\/\/[^ ]*$</var-value>
>
> Since behind the scenes the regexp becomes
>
> /^http:\/\/[^ ]*$/
>
> I rest my case.
>
> Dan
>
> --
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Daniel Allen, <da...@mojavelinux.com>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "I used to herd dairy cows.  Now I herd linux users.  Apart
> from the isolation, I think I preferred the cows.  They were
> better in conversation, easier to milk, and if they annoyed me
> enough, I could shoot them and eat them."
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT]:Hiding layers in HTML

Posted by Dan Allen <da...@mojavelinux.com>.
> Thank you all for your replies. I think I will have to get some good hold on
> regular expressions
> 
> I found a site which lists possible regular expressions . This should help
> me, anyway even buying book should do
> 
> http://demo.freshwater.com/SiteScope/docs/regexp.htm
> 
> Now I have another question , which I think shouldn't be in this list but
> was curious if anybody knows.
> 
> I have HTML page  with certain number of tables, in kind of different
> layers(I have put them in field sets).
> 
> On triggering of event(liking selecting a certain checkbox) the different
> layers should be hidden or visible. I think it should be possible be
> JavaScript I think, but don't know how.

First, don't change the topic without changing the subject on a list
like this or else no one will ever find your new question.

Second, if you are going to discuss a topic which is not directly
related to struts, be sure to include a mark in the subject, such as
[OT] for off-topic.

Just helping you to get better responses.

Now back to the question at hand...

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"I'm old enough to know better, but still too young to care."
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Logic tags and collections?

Posted by Marco Tedone <m_...@hotmail.com>.
First of all I would suggest you to reverse the if order so that, it the
first if returns true, you don't' have to perform the other if
statements(Like now, to get to a consistent result, you should perform all
the three if statements); secondly, you could iterate trough the Collection
retrieved from the session[by means of
(java.util.YourCollection)session.getAttribute? By means of <bean:define
id="yourInternal" name="yourSessionScopeCollectionName"
type="java.util.YourCollection"?]

and, depending on how many if are satisfied by <logic:present>, you could
show the consistent links.

My 2 cents.

Marco

> -----Original Message-----
> From: niksa_os [mailto:niksa_os@hotmail.com] 
> Sent: Tuesday, March 11, 2003 4:37 PM
> To: Struts Users Mailing List
> Subject: Logic tags and collections?
> 
> 
> How can I make something like this with Struts or someone 
> have better idea?
> 
> I have few Admin: MainAdmin, UserAdmin, EmailAdmin.
> MainAdmin can do anything, UserAdmin manage users and emails, 
> and EmailAdmin make emails only.
> 
> So, I need this:
> -without Struts, I make Collection in session and
> 
> If session.getAdminTypeCollection contain MainAdmin {
>     do something
> If session.getAdminTypeCollection contain UserAdmin OR MainAdmin {
>     do something
> If session.getAdminTypeCollection contain EmailAdmin OR 
> UserAdmin OR MainAdmin {
>     do something
> } End EmailAdmin
> } End UserAdmin
> } End MainAdmin
> 
> For MainAdmin Collection:
> Collection.add(MainAdmin)
> Collection.add(UserAdmin)
> Collection.add(EmailAdmin)
> 
> For UserAdmin Collection:
> Collection.add(UserAdmin)
> Collection.add(EmailAdmin)
> 
> For EmailAdmin Collection:
> Collection.add(EmailAdmin)
> 
> -do something are links
> 
> MainAdmin see all links
> UserAdmin see UserAdmin and EmailAdmin links
> EmailAdmin only EmailAdmin links
> 
> I can't use role or principal or anything from JAAS.
> 
> So, I need somehow to check Coolection with logic:present or 
> some others tags?
> 
> Thanks.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Logic tags and collections?

Posted by niksa_os <ni...@hotmail.com>.
How can I make something like this with Struts or someone have better idea?

I have few Admin: MainAdmin, UserAdmin, EmailAdmin.
MainAdmin can do anything, UserAdmin manage users and emails, and EmailAdmin
make emails only.

So, I need this:
-without Struts, I make Collection in session and

If session.getAdminTypeCollection contain MainAdmin {
    do something
If session.getAdminTypeCollection contain UserAdmin OR MainAdmin {
    do something
If session.getAdminTypeCollection contain EmailAdmin OR UserAdmin OR
MainAdmin {
    do something
} End EmailAdmin
} End UserAdmin
} End MainAdmin

For MainAdmin Collection:
Collection.add(MainAdmin)
Collection.add(UserAdmin)
Collection.add(EmailAdmin)

For UserAdmin Collection:
Collection.add(UserAdmin)
Collection.add(EmailAdmin)

For EmailAdmin Collection:
Collection.add(EmailAdmin)

-do something are links

MainAdmin see all links
UserAdmin see UserAdmin and EmailAdmin links
EmailAdmin only EmailAdmin links

I can't use role or principal or anything from JAAS.

So, I need somehow to check Coolection with logic:present or some others
tags?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT]:Hiding layers in HTML

Posted by Mark Lowe <ml...@officinedigitali.it>.
Start by creating a load of absolute positioned layers with a linked or 
emmbedded stype sheet.. Use id's to identify each div etc. and if you 
are using a linked style sheet place an empty id'ed attribute at the 
top off the css

i.e
/* quirck bug */
#dummy{

}

#div1 {
	position:absolute;
	etc
	visability:hidden;
	visibility:hide; //ns 4
}

etc

you can manipluate you css defined stuff in js like this


document.getElementById("div1").style.visability = "visible";


You'll also have to look for the reference for document.all and 
document.layers for ie and ns 4..

My advise you be use innerHTML and innerText and don't use this type of 
DHTML.. You'lll only have to write div code of ns4 this way.. Absolute 
positioned divs are really fiddly .. InnerHTML on table cells much 
nicer..

hope this helps

mark


Lunedì, 10 mar 2003, alle 22:41 Europe/Rome, Vinay ha scritto:

> Thank you all for your replies. I think I will have to get some good 
> hold on
> regular expressions
>
> I found a site which lists possible regular expressions . This should 
> help
> me, anyway even buying book should do
>
> http://demo.freshwater.com/SiteScope/docs/regexp.htm
>
> Now I have another question , which I think shouldn't be in this list 
> but
> was curious if anybody knows.
>
> I have HTML page  with certain number of tables, in kind of different
> layers(I have put them in field sets).
>
> On triggering of event(liking selecting a certain checkbox) the 
> different
> layers should be hidden or visible. I think it should be possible be
> JavaScript I think, but don't know how.
>
> Help appreciated,
>
> Thanks in advance
> Vinay
>
>
>
>
>
>
> ----- Original Message -----
> From: "Dan Allen" <da...@mojavelinux.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
> <da...@mymobile.info>
> Sent: Monday, March 10, 2003 3:46 PM
> Subject: Re: Regular Expressions
>
>
>>> Not that I have seen per se.  There is a site that has some pre-built
>>> regexs but Im sorry I cant remember the URL.  Your best bet is to go 
>>> buy
>>> the Oreilly book "Mastering Regular Expressions"  It is pretty much 
>>> the
>>> bible of regex and well worth the investment.
>>
>> KDE 3.1 has an awesome regular expression GUI editor, good for
>> people just learning how to create them.  One thing to watch out
>> for:
>>
>> In the validator, Perl regular expressions are used.  Normally, when
>> you make a Perl regular expressions you have to use a delimiter,
>> which is typically '/'
>>
>> However, in the validator definition file, you can exclude the
>> delimiter as the validator automatically adds it for you.  However,
>> this means that you must escape and instance of '/' in your regular
>> expression.
>>
>> I have filed a bug report about this in bugzilla because the
>> validator should automatically escape any delimiter used in the
>> definition file so that this "ghost" delimiter does not have to be
>> accounted for.
>>
>> In short, I mean
>>
>> The following would be accepted:
>>
>> <var-name>mask</var-name>
>> <var-value>^http://[^ ]*$</var-value>
>>
>> instead of the current syntax
>>
>> <var-name>mask</var-name>
>> <var-value>^http:\/\/[^ ]*$</var-value>
>>
>> Since behind the scenes the regexp becomes
>>
>> /^http:\/\/[^ ]*$/
>>
>> I rest my case.
>>
>> Dan
>>
>> --
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> Daniel Allen, <da...@mojavelinux.com>
>> http://www.mojavelinux.com/
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> "I used to herd dairy cows.  Now I herd linux users.  Apart
>> from the isolation, I think I preferred the cows.  They were
>> better in conversation, easier to milk, and if they annoyed me
>> enough, I could shoot them and eat them."
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: [OT]:Hiding layers in HTML

Posted by Richard Mixon <rn...@custco.biz>.
Matt Raible's "struts-resume" application has a neat combination of
style-sheet and javascript/DHTML that might do what you want. It's a small
toggle control that alternately hides/displays the README.txt for the
application. It could easily be adapted to be triggered by a checkbox.

HTH: Its at: http://www.raibledesigns.com/downloads/index.html


-----Original Message-----
From: Vinay [mailto:vinay@mdp.net]
Sent: Monday, March 10, 2003 2:41 PM
To: Struts Users Mailing List
Subject: [OT]:Hiding layers in HTML


Thank you all for your replies. I think I will have to get some good hold on
regular expressions

I found a site which lists possible regular expressions . This should help
me, anyway even buying book should do

http://demo.freshwater.com/SiteScope/docs/regexp.htm

Now I have another question , which I think shouldn't be in this list but
was curious if anybody knows.

I have HTML page  with certain number of tables, in kind of different
layers(I have put them in field sets).

On triggering of event(liking selecting a certain checkbox) the different
layers should be hidden or visible. I think it should be possible be
JavaScript I think, but don't know how.

Help appreciated,

Thanks in advance
Vinay






----- Original Message -----
From: "Dan Allen" <da...@mojavelinux.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<da...@mymobile.info>
Sent: Monday, March 10, 2003 3:46 PM
Subject: Re: Regular Expressions


> > Not that I have seen per se.  There is a site that has some pre-built
> > regexs but Im sorry I cant remember the URL.  Your best bet is to go buy
> > the Oreilly book "Mastering Regular Expressions"  It is pretty much the
> > bible of regex and well worth the investment.
>
> KDE 3.1 has an awesome regular expression GUI editor, good for
> people just learning how to create them.  One thing to watch out
> for:
>
> In the validator, Perl regular expressions are used.  Normally, when
> you make a Perl regular expressions you have to use a delimiter,
> which is typically '/'
>
> However, in the validator definition file, you can exclude the
> delimiter as the validator automatically adds it for you.  However,
> this means that you must escape and instance of '/' in your regular
> expression.
>
> I have filed a bug report about this in bugzilla because the
> validator should automatically escape any delimiter used in the
> definition file so that this "ghost" delimiter does not have to be
> accounted for.
>
> In short, I mean
>
> The following would be accepted:
>
> <var-name>mask</var-name>
> <var-value>^http://[^ ]*$</var-value>
>
> instead of the current syntax
>
> <var-name>mask</var-name>
> <var-value>^http:\/\/[^ ]*$</var-value>
>
> Since behind the scenes the regexp becomes
>
> /^http:\/\/[^ ]*$/
>
> I rest my case.
>
> Dan
>
> --
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Daniel Allen, <da...@mojavelinux.com>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "I used to herd dairy cows.  Now I herd linux users.  Apart
> from the isolation, I think I preferred the cows.  They were
> better in conversation, easier to milk, and if they annoyed me
> enough, I could shoot them and eat them."
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org