小编no.*_*ing的帖子

在另一个FTL文件中导入一个FTL文件

我在FTL文件中创建了一个DIV,DIV包含表单现在说我有另一个FTL文件,我想在第二个FTL文件中使用第一个FTL的div这是可能的

deepak.ftl

<div id="filterReportParameters" style="display:none">
    <form method="POST" action="${rc.getContextPath()}/leave/generateEmpLeaveReport.json" target="_blank">
    <table border="0px" class="gtsjq-master-table">
        <tr>
            <td>From</td>
            <input type="hidden" name="empId" id="empId"/>
            <td>
            <input type="text" id="fromDate" name="fromDate" class="text ui-widget-content ui-corner-all" style="height:20px;width:145px;"/>
            </td>
            <td>Order By</td>
            <td>
                <select name="orderBy" id="orderBy">
                    <option value="0">- - - - - - - Select- - - - - - - -</option>
                    <option value="1">Date</option>
                    <option value="2">Leave Type</option>
                    <option value="3">Transaction Type</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>To</td>
            <td><input type="text" id="toDate" name="toDate" class="text ui-widget-content ui-corner-all" style="height:20px;width:145px;"/>
        </tr>
        <tr>
            <td>Leave Type</td>
            <td>
                <select name="leaveType" id="leaveType">
                    <option …
Run Code Online (Sandbox Code Playgroud)

java freemarker spring-mvc

12
推荐指数
2
解决办法
1万
查看次数

如果readystate = 4且status = 200,则执行Jquery S.Ajax错误处理程序

我正在进行$ .ajax调用,它返回一个json响应,一切似乎都很好,但是调用成功处理程序,即使readystate = 4和status = 200,也会调用$ .ajax错误处理程序.

$ .ajax电话是: -

    $.ajax({
        url: 'inc/ajax_printorder.asp',
        type: "GET",
        data: data,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        cache: false,
        success: function (sendresponse) {
            var message = (typeof sendresponse.jsonresp) == 'string' ? eval('(' + sendresponse.jsonresp + ')') : sendresponse.jsonresp;
            if (message[0].ok == '1') {
                var order = window.open('', 'PrintWindow', 'width=600,height=600');
                var html = '<html><head><title>Print Your Order</title></head><body><div id="myprintorder">' + $('<div />').append(message[0].msg) + '</div></body></html>';
                order.document.open();
                order.document.write(html);
                order.document.close();
                return false;
            };
        },
        error: function (xhr, err) {
            alert("readyState: " …
Run Code Online (Sandbox Code Playgroud)

ajax jquery status readystate

7
推荐指数
1
解决办法
1万
查看次数

更改Subclipse提交行为

这看起来似乎是一个愚蠢的问题,但它让我绝对疯狂!

我使用Eclipse的Subclipse插件来检查项目的代码.当我去提交更改时,Subclipse会提示输入提交消息(如预期的那样).会发生什么,我开始输入我的提交消息,按Shift+ Enter...当然,它会提交我的更改,包括我的不完整消息.

反正有改变这种行为吗?说,Enter提交更改?如果没有一个简单的办法,只要有我不介意有要遵循的步骤修复.

eclipse subclipse

5
推荐指数
1
解决办法
631
查看次数

mouseleave事件在绝对子元素中不起作用

我有菜单列表

<ul class="systeMenus">
    <li>
        <ul>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </li>
    <li></li>
</ul>
Run Code Online (Sandbox Code Playgroud)

第一个ul标记是从onmouseover另一个框架集框架中的链接的某个其他事件打开.

2 ul将CSS打开display:block;position:absolute; left:175px;到父级li,就像一个菜单出现在父li标记内,并隐藏在onmouseout同一个标记上的事件li.

如何mouseenter在身体上隐藏这些UL .当我试着$('body').mouseenterparent $('ul.systeMenus').mouseleave.由于我在两个实现上都遇到了问题.

任何帮助表示赞赏.坚持提供解决方案.

jquery position absolute mouseenter

5
推荐指数
1
解决办法
1900
查看次数

如何在javascript switch-case函数中使用!-1

我"想"使用开关,但是当我以这种方式使用它时,我似乎无法使它工作.谁知道为什么?

var mystring='my name is johnny';  
switch (!-1) {  
          case mystring.indexOf('hello'):  
        alert('hello');  
        break;  
    case mystring.indexOf('goodbye'):  
        alert('goodbye');  
        break;  
    case mystring.indexOf('johnny'):  
        alert('johnny');  
        break;  
    default:  
        alert('default');           
}  
Run Code Online (Sandbox Code Playgroud)

它总是警告"默认",但你可以看到我希望它提醒"约翰尼"

javascript

4
推荐指数
2
解决办法
4173
查看次数

objc中的单例模式,如何保持init私有?

如何确保用户不调用init,而客户端应该调用sharedSingleton来获取共享实例.

@synthesize delegate;

- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here.
    }

    return self;
}

+ (LoginController *)sharedSingleton
{
    static LoginController *sharedSingleton;

    @synchronized(self)
    {
        if (!sharedSingleton)
            sharedSingleton = [[LoginController alloc] init];
        CdtMiscRegisterConnectionChangeListenerObjc(test_ConnectionChangeListenerCallback);
        return sharedSingleton;
    }
}
Run Code Online (Sandbox Code Playgroud)

singleton objective-c

3
推荐指数
2
解决办法
4113
查看次数

如何在ActionListener中添加Swing组件?

我在一个扩展JFrame的类中有一个名为newMI的JMenuItem.我想在单击JMenuItem时将Swing组件添加到我的JFrame中.出于测试目的,我尝试添加JPanel并将JPanel的背景颜色设置为红色.

这是我的ActionListener:

newMI.addActionListener(new ActionListener() {
   public void actionPerformed(ActionEvent e) {
        JPanel p = new JPanel();
        p.setBackground(Color.red);
        add(p);
   }
}
Run Code Online (Sandbox Code Playgroud)

但这不起作用.如果我在其他Swing组件的初始化期间将它添加到JFrame,我可以更改JPanel的背景颜色.但我无法直接在ActionListener内部将Swing组件添加到JFrame.有人可以帮忙吗?

非常感谢.

java swing actionlistener

2
推荐指数
1
解决办法
3309
查看次数

javascript计时器

我试图让以下javascript计时器执行两个功能,只需单击一个按钮 - 单击一次计时器启动; 再次点击; 它停了 再次点击它再次启动,依此类推.我在这里做错了什么?非常感谢你提前.

    <html>
<head>
    <script type="text/javascript">
        var c=0;
        var t;
        var timer_is_on=0;

        function timedCount()
        {
            document.getElementById('txt').value=c;
            c=c+1;
            t=setTimeout("timedCount()",1000);
        }

        function doTimer()
        {
            if (!timer_is_on)
            {
                timer_is_on=1;
                timedCount();
            }
        }

        function stopCount()
        {
            clearTimeout(t);
            timer_is_on=0;
        }
        function both(){
            doTimer();
            stopCount();
        }
    </script>
</head>

<body>
    <form>
        <input type="button" value="Start count!" onclick="doTimer" />
        <input type="text" id="txt" />
        <input type="button" value="Stop count!" onclick="stopCount()" />
    </form>
<p>
Click on the "Start count!" button above to start the timer. The input field …
Run Code Online (Sandbox Code Playgroud)

javascript

1
推荐指数
1
解决办法
2万
查看次数