powered by Jive Software

Adding A FormExtension to a SearchExtension in an IQ

I’m trying to send an IQ like this:

Fill in this form for xyz


blah blah

I use code similar to the way ‘configure’ works in the room class, but using the SearchExtension rather than the MucOwnerExtension:

var iq:IQ = new IQ( “search.server”, IQ.TYPE_SET, null, success_callback, error_callback );

var searchExtension:SearchExtension = new SearchExtension();

var form:FormExtension = new FormExtension();

var fieldmap:Object = new Object();

form.type = FormExtension.TYPE_SUBMIT;

fieldmap[ “FORM_TYPE” ] = [ SearchExtension.NS ];

form.setFields( fieldmap );



My IQ gets sent but there is no form anywhere. However, if I change to use the MucOwnerExtension my form does get included in the XML.

I’m convinced it’s to do with the serilaize in SearchExtension - it doesn’t serialize the nodes that are underneath it. When I swap it out with the serialize method in MucBaseExtension, my from is sent correctly…




I think I’m seeing this (and other people aren’t) because I am creating and sending a search form that is pre-filled out, i.e. making this a one stage process rather than a two stage process.

Normal process:

  • ask for search form

  • receive search form and fill out

  • get results

Our process

  • create filled out search form

  • get results

As we control the form itself we’re just doing this to save some bandwidth and openfire resources

Hi, Mikey, I don’t know how to user SearchExtendsion. Do know how add “admin” to the SearchExtendsion?