... newer stories
Dienstag, 14. Juni 2011
jQuery On Document Ready
mattki, 14:38h
$(document).ready(function()
{
$("div").doSomething();
});
// oder kürzer:
$(function()
{
$("div").doSomething();
});
... link (0 Kommentare) ... comment
jQuery Context
mattki, 14:34h
Im Context eines Elements jQuery ausführen:
// Einen Button auswählen:
ok_button = $('button#ok');
// Innerhalb des Buttons ein 'span' Element auswählen:
$('span', ok_button)
... link (0 Kommentare) ... comment
Samstag, 7. Mai 2011
Parsing a XML file with SAX
mattki, 02:07h
// Create a JAXP "parser factory" for creating SAX parsers
SAXParserFactory spf =
SAXParserFactory.newInstance();
// Configure the parser factory for the type of parsers we require
spf.setValidating(false);
// Now use the parser factory to create a SAXParser object
// Note that SAXParser is a JAXP class, not a SAX class
SAXParser sp = spf.newSAXParser();
// Finally, tell the parser to parse the input and notify the handler
sp.parse(new InputSource(new FileInputStream(file)), defaultHandler);... link (0 Kommentare) ... comment
Freitag, 18. Februar 2011
MBean aufrufen
mattki, 18:43h
Wie kann man eine JBoss MBean aufrufen?
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
ObjectName objectName = new ObjectName("MyDomain:service=MyMBean");
RatingScreeningMBean mbean = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, objectName, MyMBeanInterface.class, false);
mbean.doSomething(args);... link (0 Kommentare) ... comment
... older stories