Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Does Insert icon (+) generate any event.
Sachin_Gajanan
Hello everybody,
I wanted to know whether the insert icon "+" generates any event.
Suppose in a DCT we specify one container to be having min="1" and max="8" and combination="and" , and suppose that the container is having three instances of text boxes.
<container name="address" location="address" min="1" max="8" combination="and">
<item name="user" pathid="user">
<text/>
</tem>
<item name="id" pathid="id">
<text/>
</tem>
<item name="pwd" pathid="pwd">
<text/>
</tem>
</container>
So that after filling the values in the first replicant instances, the insert icon "+" will be active and will be so till the 7 replcant.and once the 8 replicant is added the insert icon "+" is no more active but the delete icon "x" is active
My question is when we click the "+" does it generate any event, i want to show an alert box when the insert icon is pressed 7 times indicating that the user can only add one more replicant.
The user might enter values in the first replicant and go without entering any values till the 7 replicant, so that at that time when he presses the insert icon i want to show an alert box telling this is the last replicant allowed.
Can any body suggest me a solution please , i would be thankful, its a bit urgent.
thanks
Sachin.
Find more posts tagged with
Comments
Adam Stoller
If you're running 6.5 - yes, there is an event that you can place a handler on - read the FormAPI manual.
If you're running 6.1 or earlier - no, there is no event - you might be able to hack something, but it would be better / simpler (in the long run, if not the short run) to upgrade.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
brandon1
If you are interested in the hack here it is:
parent.IWDCEventRegistry.addListener( 'onItemAdded', handleItemAdded);
The issue with this as you can see is that it is generic to ALL replicants, you need to code in handleItemAdded a check for the specific replicant.
Current Project: TS 6.1
Environment: Solaris
maggi
There are bunch of events related to replicants in 6.5 and they are extremely useful.
Post-operation Events
--------------------------------
-- onReplicantAdded
replicantAddedHandler(replicant_instance) {}
-- onReplicantMoved
replicantMovedHandler(replicant_instance, old_index) {}
Pre-operation Events
----------------------------------
-- onReplicantDelete
replicantDeleteHandler(container, delete_index) {
return false; }
-- onReplicantBeforeAdd
replicantAddHandler(container, add_index) {
return false; }
-- onReplicantBeforeMove
replicantMoveHandler(container, from_index, to_index) {
return false; }
Maggi
ECM Architect
Teamsite 6.5 / Unix