× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike,

I followed the instructions and did not get a color chg.



1. for the WF 'Appearance and Text' I have these values;
wf_default wf_field


2. added file myFunctions.js into the
WebContent/webfacing/ClientScript/usr
folder and it includes only these lines of code;
function myFunction(myobj,mystyle)
{
myobj.classname = mystyle;
}
I noticed that file webface7002.ja is in folder
WebContent/webfacing/ClientScript/



3. value for the HTML Inside Web Setting is;
<onFocus="myFunction(this,'myRed');">

also tried this code
onFocus="myFunction(this,'myRed');"



4. I added these two lines of code to the end of
WebContent/webfacing/styles/apparea/apparea.css file;
.myRed{background-color:red;}
.myNormal{background-color:white;}





Is any of this incorrect?




Lupe Galvan

////////////////////////////////////////////////////////////////////////
///////////////////




-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Hockings
Sent: Thursday, July 03, 2008 4:55 AM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] WebFacing subfile selected record/field color chg

Hi Lupe,

So what you are telling me is that it is working exactly as I had
intended
;-) I misunderstood what you meant by "selected", you are talking
about
the end user clicking on the field at runtime whilst I had been thinking

that you meant the field that you selected in Code/Designer.

If that is the case you could simply use the HTML overrides and set a
value for the HTML Inside Web Setting. Something like the following.
This adds JavaScript function calls when the field gets focus and looses

focus. If you want it to be one-way (i.e., gets set when the field gets

focus then remove the onBlur() call.

onFocus="myFunction(this,'myRed');"
onBlur="myFunction(this,'myNormal');"

Then define the myFunction() function in a file. For simplicity you
can
create myFunctions.js in the WebContent/webfacing/ClientScript/usr
directory of your project and in that file put something simple like
this.
Your WF app will need to be stopped then restarted in WAS to pick up
this
change. If you want to get real fancy you can use a myFunctions.jsp and

dynamically generate content in it.

function myFunction(myobj,mystyle)
{
myobj.classname = mystyle;
}

Then finally add a couple of style classes to the
WebContent/webfacing/styles/apparea/apparea.css file. These will need
to
match the style names that you use in the HTML Inside

.myRed{background-color:red;}

.myNormal{background-color:white;} // or whatever you want

Keep in mind that I have not tested all this so it may have undetected
typo's but I think it should all work.

Let us know how it goes

Mike


Mike Hockings, P.Eng.
System i Application Development Tools - CODE/Designer & WebFacing !
IBM Canada Ltd. Laboratory
hockings@xxxxxxxxxx
voice 1-905-413-3199 T/L 313-3199 ITN 23133199

wdsci-l-bounces@xxxxxxxxxxxx wrote on 07/02/2008 04:34:49 PM:

Mike,

1. tried the 'Select the field and then enable the "Appearance"
Web Setting' as suggested and all fields that are selectable' were
chged
in color

2. tried the "Override style class" checkbox
and use style classes such as wf_default wf_field wf_ri_red
suggestion
and the test result was as in #1 (above).

3. I tried the HTML Overrides and insert HTML Inside like
style="background:red" and again had a test result as in #1.



It that the color chg has to be applicable to the selected' field and
I
think that entails the use of some java script w/in the Web Settings
option, perhaps an <onClick = "this.JNPINQS.ONAMEP.setAttribute
(bgcolor, red") >

--- JNPINQS is my display file, ONAMEP is the field I select w/in the
subfile record.

My java script experience is very light on my best day.



I have the following products installed;

IBM(r) Rational(r) Application Developer
V 7.0.0.6 (7.0.0.6_20080320_1728)


IBM(r) Rational(r) Business Developer Extension
V 7.0.0.5 (7.0.0.5_20071130_1455)

IBM(r) WebSphere(r) HATS
V 7.0.0 (7.0.0.200702062321)

IBM(r) WebSphere(r) Development Studio Client for iSeries(r)
V 7.0.0.4 (7.0.0.20071003_2001)

IBM(r) Rational(r) Business Developer
V 7.1 (7.1.0.20080317_2156)



If you have any other suggestions... thanks

Lupe Galvan

-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx
[mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Hockings
Sent: Wednesday, July 02, 2008 7:07 AM
To: Websphere Development Studio Client for iSeries
Subject: Re: [WDSCI-L] webfacing subfile selected record/field color
chg

Hi Lupe,

What version of WebFacing are you using? If you are using a more
current
version then it is better to use the editor in the IDE rather than
Code/DSU then you will have access to the Web Settings that are
available
in your version of WebFacing.

I am not entirely sure what you intend with "<BG=red />", it is not
JavaScript as I understand it ;-)

I can think of two ways to possibly achieve the goal that you want.
One

thing that you might try is using the Web Settings tab when you open
the

source in your project. Select the field and then enable the
"Appearance"
Web Setting. There you could check the "Override style class"
checkbox

and use style classes such as wf_default wf_field wf_ri_red.
Alternatively you could use HTML Overrides and insert HTML Inside like

style="background:red" or define a custom style class and use
something
like class="myclass" instead.

Let us know how it works out.

Mike

Mike Hockings, P.Eng.
System i Application Development Tools - CODE/Designer & WebFacing !
IBM Canada Ltd. Laboratory
hockings@xxxxxxxxxx
voice 1-905-413-3199 T/L 313-3199 ITN 23133199

wdsci-l-bounces@xxxxxxxxxxxx wrote on 07/01/2008 06:57:10 PM:

Question: Within the WebFacing tool I have a subfile type of file
opened
with CODE DESIGNER; how do I chg the color of a selected subfile
record
field? After selecting the subfile record the user has an Fn key to
clickon to have a succeeding screen display info related to the
selected' subfile record/field. I have tried the java script
command
<BG=red /> within the Web Settings option and this command did not
work.

Lupe Galvan
Programmer/Analyst II
Douglas County Nevada
Information Systems
1616 8th Street
Minden, NV 89423
775.782.9852


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.