User defined CSS
Developing our help system we have endeavored as far as possible to have the webhelp as usable as possible for those with various sight impairments. However on visiting a number of web sites where we have pulled accessibility requirements I've notice a natty option where the user can choose the appearance of the site, selecting high vis, colour blind options etc. I've tried getting this to work within our webhelp output but have had little success. Does anyone know how this can be done? What I would like is two or more buttons in the skin that the user can select and a new CSS is applied from then on.
You may be able to find a javascript method of doing that for topics by searching the web. However, it will not change the toolbar and navigation pane.
RoboHelp 8 will not change the options for this problem.
See www.grainge.org for RoboHelp and Authoring tips
Similar Messages
-
4.1EA2 User-Defined-Report strips CRLF when using PL/SQL DBMS Output
Hi,
I have a report with a child report.
That child report uses pl/sql to print to the screen. (dbms output)
When i use the procedure manually it prints fine.
When i copy this output to a text editor i can see the CRLF in there.
If i call the same procedure tru the reports section of SQLDeveloper the output is stripped of any CRLF characters.
This is causing it to be useless for me: i am using it to generate code and it all appears as one big line on the screen.
Copying this to a text editor indeed shows all CRLFs gone.
Is this intentional or a bug ?Jeff,
Thnx for the answer.
I don't have a problem writing html in my code being a former webdeveloper with experience in apex as well.
The problem is that the option presents itself as a standard plsql dbmsoutput, which suggests identical output as a dbmsoutput pane in sqldeveloper.
From your answer i gather it really is supposed to do html formatting.
Your "solution" of inserting br tags would be fine if it weren't for the fact that when i do a copy of the output in this report pane sqldeveloper strips away the br tags but doesn't replace them with crlf's.
And since the crlfs that were in the output are also stripped in this result pane i get a single line of text when i copy over a page of text from the result pane into a normal texteditor.
As such it behaves differently then say a browser when i copy a page of text from the browser and paste it in a text editor. There i see the crlfs that were present in the original source.
Is there a listing somewhere that explains what tags are supported?
Or CSS ?
Does it support stuff like white-space: pre ?
I understand the usefullness of a html-aware plsql dbmsoutput output option in the reports list of a user-defined report.
However i would like to use this opportunity to advocate to include , as an extra option or tick box etc., an option to just display the output as the normal dbmsoutput pane displays it.
That is without extra formatting.
I like the idea of being able to click in the table section above and to have bottom pane generate the appropriate code as output.
That use-case can not happen right now since it formats as html (and not even the correct way) or, when going along with this route, strips everything to a single line of text when copying the data from the result pane.
rgrds mike -
Repost: User-Defined Access Keys Script (PHP)
Hey guys -
I'm in need of a *PHP 5* script that will allow users to set
their own
access keys for predefined pages. I found this script and
neither like the
fact that it's in PHP 4 and the way the output looks (e.g.,
needing to check
the checkbox) -
http://juicystudio.com/article/user-defined-accesskeys.php
I've also run across this one which has the output format
that I want;
however, his only directions, which are only comments in his
script, are
extremely vague and unclear - for a _learner_ in PHP. Here is
his link -
http://cms.elfden.co.uk/2005/12/20/access-keys-revisted/#more-72
If someone has a solution for new learners and would be
willing to share it,
that would be wonderful. I'm hoping you can point me in a
good direction
with directions that are clear to understand. And just incase
you're
wondering, I did run across this one too - yet still, lacking
in directions
it's quite hard to follow and understand if you don't really
know a plethora
of PHP code -
http://www.blether.com/archives/2006/02/userdefined_acc.php
Again - if someone can take the time and find me a good
indepth tutorial
explanation or something along those lines (perhaps you may
even have a
script you wish to share), I'd be very grateful.
Thanks to everyone who has been helping me along the way with
my PHP.
Shane H
[email protected]
http://www.avenuedesigners.comI'm not too keen on creating my own PHP script, but perhaps
in the
near-future you should write up a PHP5 solution...
Thanks though, Thierry.
Shane H
[email protected]
http://www.avenuedesigners.com
===============================
Proud GAWDS Member
http://www.gawds.org
===============================
"Thierry | www.TJKDesign.com" <[email protected]>
wrote in message
news:e52o7i$3bc$[email protected]..
> "Shane H" <[email protected]> wrote
in message
> news:e52gqc$nvh$[email protected]..
>> Hey guys -
>>
>> I'm in need of a *PHP 5* script that will allow
users to set their own
>> access keys for predefined pages. I found this
script and neither like
>> the
>> fact that it's in PHP 4 and the way the output looks
(e.g., needing to
> check
>> the checkbox) -
>>
>>
http://juicystudio.com/article/user-defined-accesskeys.php
>
> I wrote an ASP solution using a different logic:
>
http://www.tjkdesign.com/articles/user_defined_accesskeys.asp
> It may help you create a PHP version...
>
> --
> Thierry
> Articles and Tutorials:
http://www.TJKDesign.com/go/?0
> The perfect FAQ page:
http://www.TJKDesign.com/go/?9
> CSS-P Templates:
http://www.TJKDesign.com/go/?1
> CSS Tab Menu:
http://www.TJKDesign.com/go/?3
>
>
> -
Wanted: User-Defined Access Keys Script (PHP)
Hey guys -
I'm in need of a *PHP 5* script that will allow users to set
their own
access keys for predefined pages. I found this script and
neither like the
fact that it's in PHP 4 and the way the output looks (e.g.,
needing to check
the checkbox) -
http://juicystudio.com/article/user-defined-accesskeys.php
I've also run across this one which has the output format
that I want;
however, his only directions, which are only comments in his
script, are
extremely vague and unclear - for a _learner_ in PHP. Here is
his link -
http://cms.elfden.co.uk/2005/12/20/access-keys-revisted/#more-72
If someone has a solution for new learners and would be
willing to share it,
that would be wonderful. I'm hoping you can point me in a
good direction
with directions that are clear to understand. And just incase
you're
wondering, I did run across this one too - yet still, lacking
in directions
it's quite hard to follow and understand if you don't really
know a plethora
of PHP code -
http://www.blether.com/archives/2006/02/userdefined_acc.php
Again - if someone can take the time and find me a good
indepth tutorial
explanation or something along those lines (perhaps you may
even have a
script you wish to share), I'd be very grateful.
Thanks to everyone who has been helping me along the way with
my PHP.
Shane H
[email protected]
http://www.avenuedesigners.comI'm not too keen on creating my own PHP script, but perhaps
in the
near-future you should write up a PHP5 solution...
Thanks though, Thierry.
Shane H
[email protected]
http://www.avenuedesigners.com
===============================
Proud GAWDS Member
http://www.gawds.org
===============================
"Thierry | www.TJKDesign.com" <[email protected]>
wrote in message
news:e52o7i$3bc$[email protected]..
> "Shane H" <[email protected]> wrote
in message
> news:e52gqc$nvh$[email protected]..
>> Hey guys -
>>
>> I'm in need of a *PHP 5* script that will allow
users to set their own
>> access keys for predefined pages. I found this
script and neither like
>> the
>> fact that it's in PHP 4 and the way the output looks
(e.g., needing to
> check
>> the checkbox) -
>>
>>
http://juicystudio.com/article/user-defined-accesskeys.php
>
> I wrote an ASP solution using a different logic:
>
http://www.tjkdesign.com/articles/user_defined_accesskeys.asp
> It may help you create a PHP version...
>
> --
> Thierry
> Articles and Tutorials:
http://www.TJKDesign.com/go/?0
> The perfect FAQ page:
http://www.TJKDesign.com/go/?9
> CSS-P Templates:
http://www.TJKDesign.com/go/?1
> CSS Tab Menu:
http://www.TJKDesign.com/go/?3
>
>
> -
Error while processing a user defined screen
Dear Experts,
We have developed an add on for our client in which we have a user defined screen before adding the GRPO. While adding that we are getting the error to generate this document first define the numbering series in the administration module.
this is happening only after we upgraded to the 2007 B PL 10 version. till that there was no problem. We are unable to remove and replace the UDO and UDT as we have data in it.
due to this we are unable to proceed with the GRPO.
Please help us.
thanks and regards,
Yeshwanth PrakashHi,
Please search the forum before posting a new message.
There are endless posts about that error.
Regards,
Vítor Vieira -
Issue with xsd Data type mapping for collection of user defined data type
Hi,
I am facing a issue with wsdl for xsd mapping for collection of user defined data type.
Here is the code snippet.
sample.java
@WebMethod
public QueryPageOutput AccountQue(QueryPageInput qpInput)
public class QueryPageInput implements Serializable, Cloneable
protected Account_IO fMessage = null;
public class QueryPageOutput implements Serializable, Cloneable
protected Account_IO fMessage = null;
public class Account_IO implements Serializable, Cloneable {
protected ArrayList <AccountIC> fintObjInst = null;
public ArrayList<AccountIC>getfintObjInst()
return (ArrayList<AccountIC>)fintObjInst.clone();
public void setfintObjInst(AccountIC val)
fintObjInst = new ArrayList<AccountIC>();
fintObjInst.add(val);
Public class AccountIC
protected String Name;
protected String Desc;
public String getName()
return Name;
public void setName(String name)
Name = name;
For the sample.java code, the wsdl generated is as below:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions
name="SimpleService"
targetNamespace="http://example.org"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://example.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>
<wsdl:types>
<xs:schema version="1.0" targetNamespace="http://examples.org" xmlns:ns1="http://example.org/types"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://example.org/types"/>
<xs:element name="AccountWSService" type="ns1:accountEMRIO"/>
</xs:schema>
<xs:schema version="1.0" targetNamespace="http://example.org/types" xmlns:ns1="http://examples.org"
xmlns:tns="http://example.org/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://examples.org"/>
<xs:complexType name="queryPageOutput">
<xs:sequence>
<xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="accountEMRIO">
<xs:sequence>
<xs:element name="fIntObjectFormat" type="xs:string" minOccurs="0"/>
<xs:element name="fMessageType" type="xs:string" minOccurs="0"/>
<xs:element name="fMessageId" type="xs:string" minOccurs="0"/>
<xs:element name="fIntObjectName" type="xs:string" minOccurs="0"/>
<xs:element name="fOutputIntObjectName" type="xs:string" minOccurs="0"/>
<xs:element name="fintObjInst" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="queryPageInput">
<xs:sequence>
<xs:element name="fPageSize" type="xs:string" minOccurs="0"/>
<xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
<xs:element name="fStartRowNum" type="xs:string" minOccurs="0"/>
<xs:element name="fViewMode" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org" xmlns:ns1="http://example.org/types">
<import namespace="http://example.org/types"/>
<xsd:complexType name="AccountQue">
<xsd:sequence>
<xsd:element name="arg0" type="ns1:queryPageInput"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AccountQue" type="tns:AccountQue"/>
<xsd:complexType name="AccountQueResponse">
<xsd:sequence>
<xsd:element name="return" type="ns1:queryPageOutput"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AccountQueResponse" type="tns:AccountQueResponse"/>
</schema>
</wsdl:types>
<wsdl:message name="AccountQueInput">
<wsdl:part name="parameters" element="tns:AccountQue"/>
</wsdl:message>
<wsdl:message name="AccountQueOutput">
<wsdl:part name="parameters" element="tns:AccountQueResponse"/>
</wsdl:message>
<wsdl:portType name="SimpleService">
<wsdl:operation name="AccountQue">
<wsdl:input message="tns:AccountQueInput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
ns1:Action=""/>
<wsdl:output message="tns:AccountQueOutput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
ns1:Action=""/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSoapHttp" type="tns:SimpleService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="AccountQue">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SimpleService">
<wsdl:port name="SimpleServicePort" binding="tns:SimpleServiceSoapHttp">
<soap:address location="http://localhost:7101/WS-Project1-context-root/SimpleServicePort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
In the above wsdl the collection of fintObjInst if of type xs:anytype. From the wsdl, I do not see the xsd mapping for AccountIC which includes Name and Desc. Due to which, when invoking the web service from a different client like c#(by creating proxy business service), I am unable to set the parameters for AccountIC. I am using JAX-WS stack and WLS 10.3. I have already looked at blog http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html but unable to solve this issue. However, at run time using a tool like SoapUI, when this wsdl is imported, I am able to see all the params related to AccountIC class.
Can some one help me with this.
Thanks,
Sudha.Did you try adding the the XmlSeeAlso annotation to the webservice
@XmlSeeAlso({<package.name>.AccountIC.class})
This will add the schema for the data type (AccountIC) to the WSDL.
Hope this helps.
-Ajay -
Error in conditional map using User Defined Function
All,
In my mapping I basically have a user defined function that returns the filename of my inbound file from the adapter-specific message attributes (file adapter). I know this is coded properly because if I simply assign this function to my destination field I can see the filename in the payload XML.
However if I conditionally check that returned value using if,then,else I get an error message stating:
"During the application mapping com/sap/xi/tf/_MaterialData2ZcustProdMastMulti_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformation"
Essentially in my if I'm checking if the value returned by my user defined function is equal to the constant "SOMECONSTANT" then I'm setting my destination field to some other constant value. Otherwise it's equal to a different constant value.
Any thoughts?Claus,
Thanks for the help. I actually had figured the problem out on my own. Sorry for not updating the thread sooner. What happened was this (as I suspected it wasn't related to my user defined function). For the newbies out there (of which I'm one) the problem was I was comparing strings in the graphical mapping tool using the Boolean "EQUALS" rather than the Text "EQUALSS".
Can you give yourself points for solving -
Using user-defined data types in Forms 6i
When I use the following code in Oracle Forms 6i
PROCEDURE test IS
prcl prcl_ty;
BEGIN
prcl := prcl.setParcel('xxx-xx-xxxx');
END;
I get 'Error 801'. However the above does work in SQL editor. The online help says PL/SQL8 client-side program units cannot support Oracle 8 object-related functionality and I suspect this is the reason I get the error from Forms. Is there a work-around for this.
The TYPE is defined as:
CREATE OR REPLACE
TYPE PRCL_TY AS OBJECT
(parcel VARCHAR2(11),
MEMBER FUNCTION getBook RETURN VARCHAR2,
MEMBER FUNCTION getMap RETURN VARCHAR2,
MEMBER FUNCTION getItem RETURN VARCHAR2,
MEMBER FUNCTION getItem_NS RETURN VARCHAR2,
MEMBER FUNCTION getSplit RETURN VARCHAR2,
MEMBER FUNCTION find RETURN VARCHAR2,
MEMBER FUNCTION find (yr in VARCHAR2) RETURN VARCHAR2,
MEMBER FUNCTION isValid RETURN BOOLEAN,
MEMBER FUNCTION toString RETURN VARCHAR2,
MEMBER FUNCTION toString (par IN VARCHAR2) RETURN VARCHAR2,
STATIC FUNCTION setParcel (istr IN VARCHAR2 DEFAULT '000-00-000A') RETURN prcl_ty) -- to be used as a constructor
NOT FINAL
CREATE OR REPLACE
TYPE BODY PRCL_TY AS
MEMBER FUNCTION getBook RETURN VARCHAR2 IS
BEGIN
return substr(self.parcel,1,3);
END;
MEMBER FUNCTION getMap RETURN VARCHAR2 IS
BEGIN
return substr(self.parcel,4,2);
END;
MEMBER FUNCTION getItem RETURN VARCHAR2 IS
BEGIN
return substr(self.parcel,6);
END;
MEMBER FUNCTION getItem_NS RETURN VARCHAR2 IS
BEGIN
return substr(self.parcel,6,3);
END;
MEMBER FUNCTION getSplit RETURN VARCHAR2 IS
BEGIN
return substr(self.parcel,9,1);
END;
MEMBER FUNCTION find RETURN VARCHAR2 IS
found varchar2(1);
BEGIN
begin
select 'x'
into found
from casrp
where cp_book_num = self.getBook
and cp_map_num = self.getMap
and cp_item_num = self.getItem
and rownum = 1;
return 'CASRP';
exception
when NO_DATA_FOUND then
begin
select 'x'
into found
from pro_prop
where pp_book_num = self.getBook
and pp_map_num = self.getMap
and pp_item_num = self.getItem
and rownum = 1
and NOT EXISTS (select 'x'
from cncl_prcl
where cr_book_num = self.getBook
and cr_book_num = self.getMap
and cr_book_num = self.getItem
and rownum = 1);
return 'PRO_PROP';
exception
when NO_DATA_FOUND then
return '';
end;
end;
END;
MEMBER FUNCTION find (yr IN VARCHAR2) RETURN VARCHAR2 IS
found varchar2(1);
BEGIN
begin
select 'x'
into found
from casrp
where cp_book_num = self.getBook
and cp_map_num = self.getMap
and cp_item_num = self.getItem
and cp_tax_yr = yr
and rownum = 1;
return 'CASRP';
exception
when NO_DATA_FOUND then
begin
select 'x'
into found
from pro_prop
where pp_book_num = self.getBook
and pp_map_num = self.getMap
and pp_item_num = self.getItem
and pp_tax_yr = yr
and rownum = 1
and NOT EXISTS (select 'x'
from cncl_prcl
where cr_book_num = self.getBook
and cr_book_num = self.getMap
and cr_book_num = self.getItem
and cr_tax_yr = yr
and rownum = 1);
return 'PRO_PROP';
exception
when NO_DATA_FOUND then
return '';
end;
end;
END;
MEMBER FUNCTION isValid RETURN BOOLEAN IS
i number;
BEGIN
for i in 1..8 loop
if substr(parcel,i,1) not between '0' and '9' then
return FALSE;
end if;
end loop;
if nvl(substr(parcel,9,1),'#') not between 'A' and 'Z' and
nvl(substr(parcel,9,1),'#') != '#' then
return FALSE;
end if;
return TRUE;
END;
MEMBER FUNCTION toString RETURN VARCHAR2 IS
BEGIN
return self.toString('-');
END;
MEMBER FUNCTION toString (par IN VARCHAR2) RETURN VARCHAR2 IS
BEGIN
return self.getBook||par|| self.getMap||par|| self.getItem;
END;
STATIC FUNCTION setParcel (istr IN VARCHAR2 DEFAULT '000-00-000A') RETURN prcl_ty IS
len number;
pos number;
lastch varchar2(1);
temp varchar2(30);
invalid_format exception;
pragma exception_init(invalid_format,-9001);
BEGIN
temp := upper(istr);
-- Find 1st occurance of '-'. If not in correct postion, pad book num with zeros.
pos := instr(temp,'-',1,1);
if pos > 0 then
if pos != 4 then
temp := lpad(substr(temp,1,pos-1),3,'0')||substr(temp,pos);
end if;
-- Find 2nd occurance of '-'. If not in correct postion, pad map num with zeros.
pos := instr(temp,'-',1,2);
if pos != 7 then
temp := substr(temp,1,4)||lpad(substr(temp,5,1),2,'0')||substr(temp,pos);
end if;
-- Pad item num
len := length(temp);
lastch := substr(temp,len);
temp := substr(temp,1,7)||lpad(substr(temp,8,len-1),3,'0');
if lastch between 'A' and 'Z' then
temp := temp||lastch;
end if;
end if;
temp := replace(temp,'-','');
if prcl_ty(temp).isValid then
return (prcl_ty(temp));
else
raise invalid_format;
end if;
END;
END;
Rich Hall
[email protected]You are correct in your assumptions. Client side PLSQL does not support user defined types like the one you are trying to use.
There are no workarounds I am afraid. -
How to pop-up a text box for a grid item on a user defined table?
Hello,
I have a user defined table with a grid & one of the columns is for comments. What I'm trying to do is to pop up a text box when double clicking in the column field. This would be the same as the Item Details column in the Sales Order ittems grid.
Thanks,
RonPlease post your question on SDK forum. Only SDK could meet your need.
Thanks,
Gordon -
Adding user-defined number of text fields.
Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 20 and then okay in the first window.
The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
Feel free to run the program, the problem lies in the method setTextFields(). Help please!
import javax.swing.*; //FOR SWING COMPONENT CLASSES
import java.awt.*; //FOR CONTAINER CLASS
import java.awt.event.*; //FOR EVENT HANDLING
public class RegressInput extends JFrame
private JComboBox listJComboBox; //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
private JButton answerButton; //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
private JPanel textFieldTopPanel; //TEXT FIELD TOP PANEL
private JPanel textFieldBottomPanel; //TEXT FIELD BOTTOM PANEL
private JPanel textFieldPanel; //TEXT FIELD PANEL
private CardLayout cardSelector; //DECLARE CARD LAYOUT OBJECT
private JPanel cardDeck; //DECLARE CARD PANEL OBJECT
public RegressInput(String title)
super(title); //CALL SUPERCLASS CONSTRUCTOR
//CREATE A CONTAINER
Container container = getContentPane();
//INSTANTIATE CARD LAYOUT OBJECT
cardSelector = new CardLayout();
//INSTANTIATE PANEL OBJECT
cardDeck = new JPanel();
//SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
cardDeck.setLayout(cardSelector);
//DEFINE LABEL FOR FIRST CARD
Label question = new Label("How many PAIRS of data would you like to enter?");
//BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
answerButton = new JButton("OK");
listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
listJComboBox.setMaximumRowCount(10); //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
Label xValues = new Label("X Values"); //LABEL FOR X values
Label yValues = new Label("Y Values"); //LABEL FOR Y values
//BUILD CARD DECK
JPanel comboBoxCard = new JPanel(); //CREATE FIRST CARD
comboBoxCard.add(question); //ADD question LABEL TO FIRST CARD
comboBoxCard.add(listJComboBox); //ADD listJComboBox TO FIRST CARD
comboBoxCard.add(answerButton); //ADD answerButton TO FIRST CARD
textFieldTopPanel = new JPanel(); //CREATE TOP PANEL OF SECOND CARD
textFieldTopPanel.add(xValues); //ADD xValues Label TO SECOND CARD
textFieldTopPanel.add(yValues); //ADD yValues Label TO SECOND CARD
textFieldBottomPanel = new JPanel(); //CREATE BOTTOM PANEL OF SECOND CARD
textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10)); //SET LAYOUT FOR BOTTOM PANEL
textFieldPanel = new JPanel(); //CREATE PANEL FOR SECOND CARD
textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
textFieldPanel.add(textFieldBottomPanel, "South"); //ADD textFieldBottomPanel TO SOUTH
cardDeck.add(comboBoxCard, "Step 1"); //ADD FIRST CARD TO DECK
cardDeck.add(textFieldPanel, "Step 2"); //ADD SECOND CARD TO DECK
container.add(cardDeck); //ADD CARD DECK TO CONTAINER
//DEFINE BUTTON HANDLER OBJECT
ButtonHandler buttonHandler = new ButtonHandler();
//ADD ACTION LISTENER FOR BUTTONS
answerButton.addActionListener(new ButtonHandler());
}//END RegressInput() CONSTRUCTOR
//METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
private String[] getArray()
//CREATE ARRAY TO HOLD 30 VALUES
int numbers[] = new int[29];
//CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
int number = 2;
//ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
for(int count=0; count < 29; ++count)
numbers[count] = number; //SETS EACH INDEX TO number
number++; //INCREMENTS number
}//END for LOOP
//CREATE pairs[] ARRAY TO HOLD 30 STRINGS
String pairs[] = new String[29];
//ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
for(int count = 0; count < 29; ++count)
pairs[count] = "" + numbers[count];
}//END for LOOP
return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
}//END getArray() METHOD8
//RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
private int getValue()
//ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
Integer v = new Integer((String) listJComboBox.getSelectedItem());
//ASSIGNS WRAPPER VALUE TO int
int value = v.intValue();
//RETURN VALUE OF SELECTED ITEM
return value;
}//END getValue()
private void setTextFields()
{//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
for(int count = 0; count < (2 * getValue()); ++count)
}//END setTextFields()
//BUTTON EVENT HANDLER CLASS
private class ButtonHandler implements ActionListener
//PROCESS EVENT
public void actionPerformed(ActionEvent e)
//WHICH BUTTON CAUSED THE EVENT?
if(e.getSource() == answerButton)
cardSelector.last(cardDeck);
cardDeck.setSize(600,600);
}//END if STATEMENT
}//END actionPerformed()
}//END ButtonHandler CLASS
}//END RegressInput CLASSHere is main:
import javax.swing.JFrame;
public class TestSharpStats
public static void main(String[] args)
//DEFINE FRAME OBJECT
RegressInput window = new RegressInput("Hi"); //SETS TITLE BAR
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //CLOSES WINDOW
window.setSize(400, 600); //SET FRAME SIZE
window.setResizable(true); //PREVENTS USER FROM RESIZING WINDOW
window.setVisible(true); //SETS window TO VISIBLE
}//END main()
}//END TestSharpStats CLASSmuit-post: http://forum.java.sun.com/thread.jspa?messageID=4442652
-
How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?
How to let the user define the colors for each plots in the graph (I
use LabVIEW 7)?Hi,
Take a look at this example, it uses property nodes to select tha
active plot and then changes the color of that plot.
If you want to make the number of plots dynamic you could use a for
loop and an array of color boxes.
I hope this helps.
Regards,
Juan Carlos
N.I.
Attachments:
Changing_plot_color.vi 38 KB -
How do you use user defined error messages in Value Help?
Hi,
I'm currently working on a Modifiable Value Help Selector in Web Dynpro Java, and I want to use a user defined error message when I validate the values entered by a user. Currently, it's returning its default error message ("Character <string> does not match...").
Since the project requires a different error message, is there a way to override the default error message and use my defined error message instead?
Thanks!Hi Angelo,
I am not sure why message area is showing both Custom and inbuilt messages but you can try the following:
i guess you must be using reportContextAttribute exception for showing Error messages on the input fields as well.in that case you can disable the message area so messages will appear only on the Context level ie; on input fields.
For other messages apart from validation messages you can enable the message area before reporting the exception.
make sure the boolean context variable which will be used for enabling and disabling the message area should have Readonly property set as true.
I am not sure whether this is the only solution for this but you can try and see if it works.
Siddharth -
How to provide value to a User Defined field thru java code
I am using OIM 11.1.1.5.
I have a user defined field called Unique-Customer-Number. This field need to be pre-populated during user creation (using OIM Web UI) and the value comes from a java code.
Can any of you tell me the high level steps to implement this.
Thanks!
KabiThanks Rajiv,
I just followed everything on metalink 1262803.1. My console shows the followings during Metadata import.
weblogicImportMetadata.bat :-
Starting import metadata script ....
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :t3://10.10.99.99:7001
Connecting to t3://10.10.99.99:7001 with userid weblogic ...
Successfully connected to Admin Server 'adm_server01' that belongs to domain 'server01'.
Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.For more help, use help(domainRuntime)
Disconnected from weblogic server: adm_eimsdv1s01
End of importing metadata script ...
Exiting WebLogic Scripting Tool.
How I will I know that my plugin/ event-Handler is registered successfully. Is there any screen where I can see all registered plugins ? -
Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 30 and then okay in the first window.
The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
Feel free to run the program, the problem lies in the method setTextFields(). Help please!
import javax.swing.*; //FOR SWING COMPONENT CLASSES
import java.awt.*; //FOR CONTAINER CLASS
import java.awt.event.*; //FOR EVENT HANDLING
public class RegressInput extends JFrame
private JComboBox listJComboBox; //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
private JButton answerButton; //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
private JPanel textFieldTopPanel; //TEXT FIELD TOP PANEL
private JPanel textFieldBottomPanel; //TEXT FIELD BOTTOM PANEL
private JPanel textFieldPanel; //TEXT FIELD PANEL
private CardLayout cardSelector; //DECLARE CARD LAYOUT OBJECT
private JPanel cardDeck; //DECLARE CARD PANEL OBJECT
public RegressInput(String title)
super(title); //CALL SUPERCLASS CONSTRUCTOR
//CREATE A CONTAINER
Container container = getContentPane();
//INSTANTIATE CARD LAYOUT OBJECT
cardSelector = new CardLayout();
//INSTANTIATE PANEL OBJECT
cardDeck = new JPanel();
//SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
cardDeck.setLayout(cardSelector);
//DEFINE LABEL FOR FIRST CARD
Label question = new Label("How many PAIRS of data would you like to enter?");
//BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
answerButton = new JButton("OK");
listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
listJComboBox.setMaximumRowCount(10); //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
Label xValues = new Label("X Values"); //LABEL FOR X values
Label yValues = new Label("Y Values"); //LABEL FOR Y values
//BUILD CARD DECK
JPanel comboBoxCard = new JPanel(); //CREATE FIRST CARD
comboBoxCard.add(question); //ADD question LABEL TO FIRST CARD
comboBoxCard.add(listJComboBox); //ADD listJComboBox TO FIRST CARD
comboBoxCard.add(answerButton); //ADD answerButton TO FIRST CARD
textFieldTopPanel = new JPanel(); //CREATE TOP PANEL OF SECOND CARD
textFieldTopPanel.add(xValues); //ADD xValues Label TO SECOND CARD
textFieldTopPanel.add(yValues); //ADD yValues Label TO SECOND CARD
textFieldBottomPanel = new JPanel(); //CREATE BOTTOM PANEL OF SECOND CARD
textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10)); //SET LAYOUT FOR BOTTOM PANEL
textFieldPanel = new JPanel(); //CREATE PANEL FOR SECOND CARD
textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
textFieldPanel.add(textFieldBottomPanel, "South"); //ADD textFieldBottomPanel TO SOUTH
cardDeck.add(comboBoxCard, "Step 1"); //ADD FIRST CARD TO DECK
cardDeck.add(textFieldPanel, "Step 2"); //ADD SECOND CARD TO DECK
container.add(cardDeck); //ADD CARD DECK TO CONTAINER
//DEFINE BUTTON HANDLER OBJECT
ButtonHandler buttonHandler = new ButtonHandler();
//ADD ACTION LISTENER FOR BUTTONS
answerButton.addActionListener(new ButtonHandler());
}//END RegressInput() CONSTRUCTOR
//METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
private String[] getArray()
//CREATE ARRAY TO HOLD 30 VALUES
int numbers[] = new int[29];
//CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
int number = 2;
//ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
for(int count=0; count < 29; ++count)
numbers[count] = number; //SETS EACH INDEX TO number
number++; //INCREMENTS number
}//END for LOOP
//CREATE pairs[] ARRAY TO HOLD 30 STRINGS
String pairs[] = new String[29];
//ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
for(int count = 0; count < 29; ++count)
pairs[count] = "" + numbers[count];
}//END for LOOP
return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
}//END getArray() METHOD8
//RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
private int getValue()
//ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
Integer v = new Integer((String) listJComboBox.getSelectedItem());
//ASSIGNS WRAPPER VALUE TO int
int value = v.intValue();
//RETURN VALUE OF SELECTED ITEM
return value;
}//END getValue()
private void setTextFields()
{//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
for(int count = 0; count < (2 * getValue()); ++count)
}//END setTextFields()
//BUTTON EVENT HANDLER CLASS
private class ButtonHandler implements ActionListener
//PROCESS EVENT
public void actionPerformed(ActionEvent e)
//WHICH BUTTON CAUSED THE EVENT?
if(e.getSource() == answerButton)
cardSelector.last(cardDeck);
cardDeck.setSize(600,600);
}//END if STATEMENT
}//END actionPerformed()
}//END ButtonHandler CLASS
}//END RegressInput CLASS
Here is main:
import javax.swing.JFrame;
public class TestSharpStats
public static void main(String[] args)
//DEFINE FRAME OBJECT
RegressInput window = new RegressInput("Hi"); //SETS TITLE BAR
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //CLOSES WINDOW
window.setSize(400, 600); //SET FRAME SIZE
window.setResizable(true); //PREVENTS USER FROM RESIZING WINDOW
window.setVisible(true); //SETS window TO VISIBLE
}//END main()
}//END TestSharpStats CLASSIf your teacher taught you to program like this they should be shot. There is no need to comment every single line (especially in upper case). The comments stand out more that the code does and doesn't add any usefull information. Obviously comments are important, but you need to pick and choose when to use them.
Swing related questions should be posted in the Swing forum.
Also, don't use AWT components in a Swing application. Label is AWT. JLabel is Swing.
I would use a JTable to input the matching pairs of data. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Table to get started. -
User defined report with bind variable
How can I create an user defined report using a bind variable?
We currently do not support bind variables in User Defined Reports. We are looking at adding that function before production but I can't promise.
-- Sharon
Maybe you are looking for
-
I was in Font Book, verified all font and have 35 minor issues, yellow question mark. How do I fix them. It appears all my fonts are in \Library\Fonts \System\Library\Fonts I have no fonts in \User\Name\Fonts but have collections in FontCollection 1.
-
Is it possible write code inside pdf form when click submit button in pdf form
can write code to pdf form for eg: we have to write code in Excel sheet using Macro features Like that any possible to write code in pdf form when i downloaded pdf form from site then filled up the details then click the save button the pdf form will
-
Can we have two admin instances while performing Dynamic clustering?
Can we have two admin instances while performing Dynamic clustering?
-
This is ticking me off to no end. When I click on a movie it won't play in the little video viewer in the lower left corner. Also when I click to play a movie and it shows up in a separate window it won't let me view it full screen. What the heck is
-
CS3/CS4 - Plugin deletes user-defined keyboard shortcuts?
Hi, I have users complaining that my plugin deletes their keyboard shortcuts. My plugin does not mess with any keyboard shortcuts, so how can this happen? Hope somebody can shed some light on this problem Kind regards Toke