How to highlight Search string in JTextArea??
I have a Search utility which search for a string in JTextArea. Search utility is able to locate the search string but it does not highlight it.
Please let me know if you know what could be wrong
Thanks
Amit
You have to highlight the string yourself. Try using:
textArea.setSelectionStart( int );
textArea.setSelectionEnd ( int );
Similar Messages
-
Highlight search string in a pl/sql report
Hi all,
I followed the example of QBE by Scott Spendolini. I got it working. But I am trying to add the highlight search string functionality, in the report created. The report is created from a dynamic pl/sql query. Can you give me any ideas or an example? Thank you for your time in advance,
Rgds,
Suma.Hi Suma,
Your Search button runs a process called "RUN_REPORT". Presumably, this process picks up the values from the tabular form to construct the new SQL statement.
Given that you don't have a normal report definition - ie one that you can use the Highlight Words option - the only other possibility is to adjust the SQL query results.
Let's assume that you have in your RUN_REPORT process a variable called vJOB that holds the JOB value from your QBE grid. Your SQL statement could then be adjusted to something like:
SELECT EMPNO,
ENAME,
'<span style="color:red">' || JOB || '</span>',
etc
FROM EMPTABLE
WHERE JOB = vJOB;
Obviously, without seeing your code, I can not say exactly how it should be constructed to highlight the word(s), but the above should give you an idea of what you need to do. If you're still not sure, can you please paste into this thread the RUN_REPORT code.
Regards
Andy -
Highlighting Search Strings vs Individual Words
I am using the method on Peter Grainges site for Highlighting
Search Strings. I have completed all necessary changes and the
function works~~~~ One thing I have found that I wonder if I can
change.... As it stands now If I enter more than 1 word to search
ROBO actually separates both words and searches them as individual
words ~ I want to search as a string not individually -- is there a
fix for this?? Thanks in advance for any help that is
offered.The search has no link to the highlighting in this context,
it just makes it obvious.
I don't think you can change that other than use a different
search. ZoomSearch can be configured to work with RoboHelp and is
described on my site. -
How to highlight search term in a different color in search results?
Hi
How can I highlight search term in a different color in the search results. Currently it is black, I would like to change it to green.
Thanks in advance
Regards
VidyaDear Bhanu,
It might be possibe but i am not fully sure about it.
try with different combination and check it.
I need to check whether it is feasible or not.
Best Regards,
Arun Jaiswal -
How to define search string to update the encashment date in check register
HI experts,
I have an issue with the check . the check encashment date is not getting updated . we are using electronic bank statement and the bank statement files are MT940 format . the EBS is working fine but in case of check payment we receive a 12 digit check number i.e ( 000000001618) in the MT940 files where as in the SAP system we have maintained check lot with a 10 digit number i.e ( 0000001618) i have already defined the interpretation algorithm and the search string but the search string only works when i change the sap system check lot to 12 digits as per the MT940 files. How can i define a search string to clear the 12 digits check number in MT940 with the 10 digit in system so that it get cleared and the check encashment date get updated in check information .
could anyone help me .
ThanksHi
Try keeping the 1st two digits of search string as b;ank. i.e. ############ (12 digits) mapped to __##########. I used underscore to denote balnk space. Using this when you recevie say 000000001618 (12 digits), it will be mapped to 0000001618 (10 digits). Then your interpretation algo will use this 10 digit number.
Thanks
Nikhil -
How to make search string for the searched text containing single quote?
Hi all,
When trying to search some Contacts from Eloqua, I have to make a search string which would list out some specified EmailAddress.
Unfortunately, I meet several emails who have single quote in their spelling.
I got 'invalid format' error when both using them directly and making single quote twice.
Any suggestions?
Thanks,
BiaoWhen testing, the following examples:
GET /Api/rest/1.0/data/contacts?search=emailAddress=bm'[email protected]
GET /Api/rest/1.0/data/contacts?search='emailAddress=bm'[email protected]'
GET /Api/rest/1.0/data/contacts?search=emailAddress="bm'[email protected]"
GET /Api/rest/1.0/data/contacts?search="emailAddress=bm'[email protected]"
All return:
"elements":
"type":"Contact",
"id":"1421620",
"createdAt":"1419611518",
"depth":"minimal",
"name":"bm'[email protected]",
"updatedAt":"1419611519",
"emailAddress":"bm'[email protected]"
"page":1,
"pageSize":1000,
"total":1
Likewise, the following returns nothing:
GET /Api/rest/1.0/data/contacts?search=emailAddress='bm'[email protected]'
Hopefully this helps,
Bojan -
EBS- How to map search string using wild card
Hi Gurus
I got two similar string on bank statement which needs to be mapped to two different posting rules.
MV-WORLDPAY- 1805 MOTO
MV-WORLDPAY -1805 WEB
in above string 1805 could be any no,( it is not fix no). I have tried using different wildcards and symbols like
+,*,?,# but it is not piciking the right posting rule, also search string use is also activated. so please guide me.
Many Thanks
Sam Rathod.Hi
Try keeping the 1st two digits of search string as b;ank. i.e. ############ (12 digits) mapped to __##########. I used underscore to denote balnk space. Using this when you recevie say 000000001618 (12 digits), it will be mapped to 0000001618 (10 digits). Then your interpretation algo will use this 10 digit number.
Thanks
Nikhil -
How to highlight searched words in pdf file opens from web??
Hello fellows
I need to create a web page that holds couple controls include "search" button .When client clicks on the button the programm will search pdf file, open it in client reader with highlight on searched words ..
Is that any posibility to do it using javascript on a client or c# ,vb.net on the server ??
I'm very novice in PDF developing so any ideas or conclusions would be very usefull!Thank you for answer
But maybe you have any idea how I can do it??
This is very important feature for our project.
Some additional information : our project will hosted in SharePoint 2007
When I use adobe Ifilter for moss and set in querystring #search="searchword" I get highlights, but only in a browser.
But if a reader was configured to open client application this feature wasn't work.
Any suggestion ??? -
How to perform search string more effectively ?
Hi all,
I need to perform searching of string in the following manner where is keying by the user. Unfortunately, human typing error had caused problem in my procedure searching, so I thaught of searching the correct string no matter how the user is keying.
The correct statement is :-
SOIC TEST OUT QTY
However, the user might keying in the following pattern :-
SOICTEST OUT QTY
SOIC OUT QTY
SOIC TEST QUT
and etc.
What is the best way to deal with ? Thanks.
Rgds
LimClose but no cigar. This would return a perfect 3:
"WREXHAM SOICAL CLUB SUCCESS ATTESTS TO STOUT'S VIRTUE IN QTY" SAYS CHAIRMAN
but it's not exactly a close match is it?
Pattern matching, especially fuzzy matching, requires us to be able to specify inclusions, exclusions and degree of deviation. For instance, any number of spaces normally wouldn't affect a match, neither might a single added letter - but a dozen additional letters may mean a mismatch.
I'm intrigued by the underlying need for this functionality. Is this a data cleansing exercise or a belated attempt at imposing data integrity? Or something else?
Cheers, APC -
EBS Auto Subledger posting - Search String
Hi
Can any one give some detail on how. EBS - Search string config work.
requirement is that on customer is paying in a single payment for different invoices.
all the invoice numbers are quoted in the FINSTA, can we make FINSTA work to automatch all the invoice numbers coming in Bank statement through Search string or in some other way.
Thanks in advance
Regards,
KalyanKalyan,
For your scenario, the search string configuration won't work. Search string is usually meant to change the assignment of transaction code, cost center, profit center, etc a bit different than the configuration.
For your situation, you need to make use of user-exits, wherein you can search for open items which can be cleared based on your specified criteria.
Enhancement FEB00001 available in standard SAP can be made use of for your purposes.
Regards,
Vishal. -
How to get where the search string appears in the results
Hi every one
i am new to Oracle Text
this is my project environment "EJP 3.0+seam+JSF"
in my part i need to implement smart searches within large text objects.
So i planed to use Oracle text with context type indexing.
I my search part i need to display where the search string appears in the results
i don't know how to archive it,
is it achived by CTX_DOC.GIST ?
this is my table format
Tbl_Book
book_id Book_Title Book_description
Tbl_Author
author_id book_id author_name
in my first table i index the Book_Title and Book_description columns
EXEC CTX_DDL.DROP_PREFERENCE ('expert_concat_datastore')
drop index Tbl_Book_Index force;
BEGIN
CTX_DDL.CREATE_PREFERENCE
('expert_concat_datastore', 'MULTI_COLUMN_DATASTORE');
CTX_DDL.SET_ATTRIBUTE
('expert_concat_datastore', 'COLUMNS', 'Book_Title,Book_description');
END;
alter table Tbl_Book add (dummy varchar2(1))
begin
Ctx_Ddl.Drop_Section_Group
group_name => 'my_section_group'
exception
when others then
/* OK if DRG-12203: section group MY_SECTION_GROUP does not exist */
if instr ( SQLERRM, 'DRG-12203' ) != 0 then null;
else raise_application_error ( -20000, SQLERRM ); end if;
end;
begin
Ctx_Ddl.Create_Section_Group
group_name => 'my_section_group',
group_type => 'basic_section_group'
Ctx_Ddl.Add_Field_Section
group_name => 'my_section_group',
section_name => 'title',
tag => 'Book_Title'
Ctx_Ddl.Add_Field_Section
group_name => 'my_section_group',
section_name => 'description',
tag => 'Book_description'
end;
create index Tbl_Book_Index on Tbl_Book ( dummy )
indextype is ctxsys.context parameters (' datastore expert_concat_datastore section group my_section_group');
begin
Ctx_Ddl.Drop_Section_Group
group_name => 'my_section_group'
end;
in my second table i index the author_name column
drop index Tbl_Author_Index force;
create index Tbl_Author_Index on Tbl_Author (author_name) indextype is ctxsys.context parameters('filter ctxsys.null_filter section group ctxsys.html_section_group');
begin
Ctx_Ddl.Optimize_Index (
idx_name => 'Tbl_Author_Index',
optlevel => Ctx_Ddl.optlevel_fast
end;
my search result is only in my Tbl_Book.
Because it is my primary one.
So this is my query in EJP 3.0
select t from Tbl_Book t LEFT JOIN t.AuthorCollection c wherecontains(t.dummy, 'java within title or(java within description)',10) > 0 or contains(c.author_name ,'thiagu',20) > 0 ) ORDER BY SCORE(10), SCORE(20)
here i need to get single SCORE how to do that ?
i dont know how to highlight the search string in the result ?
is it archived by CTX_DOC.MARKUP ?
please any one help me
By
Thiagu.mWeird. I have multuple monitors and the boot stuff always appears on my main monitor.
See if smc and pram reset clears the problem.
I have multiple screens on my Mac Pro. A normal screen, a projector and a USB-to-DVI converter.
What video card are you using? And USB-to-DVI is not the usual way for connecting monitors. I wonder if that is confusing things. So out of curiousity what happens if that monitor is not connected? -
How do i search for a string in a txt file using java??
How do i search for a string in a txt file using java??
could you please help thanks
JRegular expressinos work just fine, especially when
searching for patterns. But they seem to be impying
it's a specific group of characters they're looking
for, and indexOf() is much faster than a regex.If he's reading from a file, the I/O time will likely swamp any performance hit that regex introduces. I think contains() (or indexOf() if he's not on 5.0 yet) is preferable to regex just because it's simpler. (And in the case of contains(), the name makes for a very clear, direct mapping between your intent and the code that realizes it.) -
How to get a form to send info on the referrer search string?
My friend had a DW4 site with a form that would tell him the search string, or query, that was used to get to his page... and I have no idea how to do that. Here's the form as he would receive it <http://bradmesser.com/form_string.htm> Can you send me in the right direction to find out? Thanks.
I don't have access to the page with the form, which is the root of my problem. The friend had a site that I built. Eventually he decided to sign up with some SEO outfit. They moved the site to their server and made a few changes including that Contact Us form. Then my friend decided he'd rather be hosted by GoDaddy and signed up to transfer his DNS. When the switch was made, of course his GoDaddy server contained zip. He asked whether I could upload his old site, which I did. This is the part I love: he can't remember who his SEO guys were, so we have no way of accessing that SEO-made page which is sitting on a mystery server somewhere in the tubes. And it ain't on the Wayback Machine.
-
How is it possible to use Index Seek for LIKE %search-string% case?
Hello,
I have the following SP:
CREATE PROCEDURE dbo.USP_SAMPLE_PROCEDURE(@Beginning nvarchar(15))
AS
SELECT * FROM HumanResources.Employee
WHERE NationalIDNumber LIKE @Beginning + N'%';
GO
If I run the sp first time with param: N'94', then the following plan is generated and added to the cache:
SQL Server "sniffs" the input value (94) when compiling the query. So for this param using Index Seek for AK_Employee_NationalIDNumber index will be the best option. On the other hand, the query plan should be generic enough to be able to handle
any values specified in the @Beginning param.
If I call the sp with @Beginning =N'%94':
EXEC dbo.USP_SAMPLE_PROCEDURE N'%94'
I see the same execution plan as above. The question is how is it possible to reuse this execution plan in this case? To be more precise, how
Index Seek can be used in case LIKE %search-string% case. I expected that
ONLY Index Scan operation can be used here.
AlexeyThe key is that the index seek operator includes both seek (greater than and less than) and a predicate (LIKE). With the leading wildcard, the seek is effectively returning all rows just like a scan and the filter returns only rows matching
the LIKE expression.
Do you want to say that in case of leading wildcard, expressions Expr1007 and Expr1008 (see image below) calculated such a way that
Seek Predicates retrieve all rows from the index. And only
Predicate does the real job by taking only rows matching the Like expression? If this is the case, then it explains how
Index Seek can be used to resolve such queries: LIKE N'%94'.
However, it leads me to another question: Since
Index Seek in
this particular case scans
all the rows, what is the difference between
Index Seek and Index Scan?
According to
MSDN:
The Index Seek operator uses the seeking ability of indexes to retrieve rows from a nonclustered index.
The storage engine uses the index to process
only those rows that satisfy the SEEK:() predicate. It optionally may include a WHERE:() predicate, which the storage engine will evaluate against all rows that satisfy the SEEK:() predicate (it does not use the indexes to do this).
The Index Scan operator retrieves
all rows from the nonclustered index specified in the Argument column. If an optional WHERE:() predicate appears in the Argument column, only those rows that satisfy the predicate are returned.
It seems like Index Scan is a special case of Index Seek,
which means that when we see Index Seek in the execution plan, it does NOT mean that storage engine does NOT scan all rows. Right?
Alexey -
How can I search the tree with a given string?
How can I search the tree with a given string?
I don't find any function like "search(...)".
I want to find the tree nodes which include the given string.
Thanks.Try it with .com instead of .ca - fixes it for me (corporate firewall blocks .ca here)
http://spendolini.blogspot.com/2013/09/working-with-apex-tree.html
Anyway - it links to an article of mine which describes interacting with the tree: Tom's Blog: Working with the tree in Apex. There is also a demo application on apex.oracle.com: http://apex.oracle.com/pls/apex/f?p=54687:38
Maybe you are looking for
-
Why won't my itouch sync with my windows computer?
So recently I updated from IOS 4.2.1 to IOS 5.0.1 and found my windows xp computer would not sync with my ipod touch as i kept on getting an error. Well i download itunes on my windows 7 computer and it worked fine. Now when i try to plug in my ipod
-
Indesign Script Opening Flex App / Tab Handling
Hi, I am working on a FlashBuilder 4 application that is opened from, and interacts with, an Indesign CS4 .jsx script. I have added a TitleWindow that provides for login processing (there is a backend database) to the Flex application. The login
-
I am trying to use Photoshop 10. After my catalog loads. I am told to log into my account. My user name is correct and I use a new password. That password lets me log in to my Adobe account and even allowed me to load a 30 day trial of PS14i After I
-
After installing iCloud mac does not wake up from sleep
I have all of the necessary components and software for running iCloud however my computer will not wake up from sleep. I only get the gray sceen. Any ideas?????
-
Short battery life on Macbook Pro
My friend recently bought a Macbook Pro (15") and he's having problems with the battery life. He's only getting anywhere from 2:20 to 4:30 of battery life out of the optimal 7 after a full recharge...which to me is incredibly low. He's not running an