logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

how to activate alerts during revalidation: msg#00047

Subject: how to activate alerts during revalidation

Hello,

 

I am trying to modify chiba code in order to perform the following

 

  1. when triggering revalidate, to show the alert messages of invalid nodes (similarly to what happens when submitting).

 

I am running one of the sample files (orderlist.xhtml) and have modified the code a little (Container.class) in order

to throw exception when the event to be dispatched is “xforms-invalid “ which happens when a node is not valid (e.g. when putting “aaa” for amount)

---

public boolean dispatch(EventTarget eventTarget, String eventType, Object info) throws XFormsException {

 ….      

if (event.getType().equals("xforms-invalid")){

          throw new XFormsException("Invalid node");

}

---

 

however, nothing happens except that chiba prints the exception.

 

DEBUG org.chiba.xml.xforms.events.EventFactory : creating event xforms-invalid

DEBUG org.chiba.xml.xforms.Container : dispatch: xforms-invalid to [xforms:input

: null]

DEBUG org.chiba.xml.xforms.Container : dispatch: cancelable: false

DEBUG org.chiba.xml.xforms.Container : dispatch: bubbles: true

DEBUG org.chiba.xml.xforms.Container : [xforms:input: null]

org.chiba.xml.xforms.exception.XFormsException: Invalid node

  at org.chiba.xml.xforms.Container.dispatch(Container.java:364)

…..

 

I wonder if I should create some event to activate the alert of the invalid node or to focus on it e.g.

 

--

public boolean dispatch(EventTarget eventTarget, String eventType, Object info) throws XFormsException {

 ….      

 

if (event.getType().equals("xforms-invalid")){

          event.getTarget().dispatchEvent(EventFactory.createEvent(EventFactory.FOCUS));

}

--

 

however the above does not do anything either.

 

I am new to chiba so forgive me if I am missing something really obvious here.

 

Thank you

 

Giota


Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo